2

Mem への構造化読み取りポートを実装しようとしています。

class TagType() extends Bundle()
{
    import Consts._

    val valid = Bool()
    val dirty = Bool()
    val tag   = UInt(width = ADDR_MSB - ADDR_LSB + 1)
}

object TagType
{
    def apply() = new TagType()
}

val tag_read   = TagType()
//val tag_read   = Reg(TagType())
val tag_read_port   = UInt(width = TagType().getWidth)
val tag_ram    = Mem(UInt(width = TagType().getWidth), num_lines , seqRead = false )

when (tag_read) {
    tag_read_port   := tag_ram(line_no)
    tag_read.toBits := tag_read_port

}

コンビネーションを使うとき

val tag_read   = TagType()

シーケンシャルの代わりに

val tag_read   = Reg(TagType())

エラーが発生する

Cache.scala:39: error: NO DEFAULT SPECIFIED FOR WIRE: /*? in class cache.Cache*/ Chisel.Bool(width=1, connect to 0 inputs: ()) in component class cache.Cache in class cache.TagType
Cache.scala:40: error: NO DEFAULT SPECIFIED FOR WIRE: /*? in class cache.Cache*/ Chisel.Bool(width=1, connect to 0 inputs: ()) in component class cache.Cache in class cache.TagType
Cache.scala:41: error: NO DEFAULT SPECIFIED FOR WIRE: /*? in class cache.Cache*/ Chisel.UInt(width=28, connect to 0 inputs: ()) in component class cache.Cache in class cache.TagType

このエラー メッセージの意味は何ですか?

2 番目の質問:

SystemVerilog の構造化された赤いポートを持つことは可能ですか。つまり、直接読み取ります。

tag_read.toBites   := tag_ram(line_no)

それ以外の

    tag_read_port   := tag_ram(line_no)
    tag_read.toBits := tag_read_port

ありがとう!

4

1 に答える 1