I'm trying to implement a structured read port to 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
}
When I use combinational
val tag_read = TagType()
instead of sequential
val tag_read = Reg(TagType())
I get errors
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
What is the meaning of this error message?
The second question:
Is it possible to have a structured red port a la SystemVerilog, i.e. read directly
tag_read.toBites := tag_ram(line_no)
instead of
tag_read_port := tag_ram(line_no)
tag_read.toBits := tag_read_port
Thanks!