SyncReadMem initalised to 7?

12 views
Skip to first unread message

zhe jiang

unread,
Jun 5, 2025, 12:27:01 PMJun 5
to chisel-users
Hi all,

I have a strange bug while initialising the SyncReadMem, here is my code

  val ref_table = SyncReadMem(2048, UInt((2 + 2).W))

  when (io.cfg_ref_inst_valid === 0x1.U){
      ref_table.write(Cat(io.cfg_ref_inst_func, io.cfg_ref_inst_opcode), // Address
                      Cat(io.cfg_ref_inst_index(1,0),io.cfg_ref_inst_sel_d(1,0)))
  }
 
  mem_data                                     := ref_table.read(mem_raddr, mem_ren)

Here is my waveform, all data is initialised to 7

Anybody knows what happend?
9b574854e24c6a150124723166fbaec4.jpg

Reply all
Reply to author
Forward
0 new messages