Merge branch 'bug56' into eb_dev

This commit is contained in:
2025-07-31 11:01:38 +08:00
2 changed files with 3 additions and 2 deletions

View File

@@ -85,10 +85,11 @@ abstract class SMUnitBase(depth: Int = 4) extends Module {
( (rPtr(log2Ceil(depth)-1, 0)) === i.U ) -> io.sram(i).rd.datar ( (rPtr(log2Ceil(depth)-1, 0)) === i.U ) -> io.sram(i).rd.datar
}) })
val cnt = RegInit(0.U((log2Ceil(depth)).W)); io.cnt := cnt val cnt = RegInit(0.U((log2Ceil(depth+1)).W)); io.cnt := cnt
when( io.enq & ~isFull ){ when( io.enq & ~isFull ){
cnt := cnt + 1.U cnt := cnt + 1.U
assert(cnt =/= depth.U)
} .elsewhen( io.deq & ~isEmpty ){ } .elsewhen( io.deq & ~isEmpty ){
cnt := cnt - 1.U cnt := cnt - 1.U
assert(cnt =/= 0.U) assert(cnt =/= 0.U)

View File

@@ -44,7 +44,7 @@ if __name__ == '__main__':
ebmmu.tc12() ebmmu.tc12()
ebmmu.tc13() ebmmu.tc13()
ebmmu.tc14() ebmmu.tc14()
add_tc_2_runlist(ebmmu.tc15()) #add_tc_2_runlist(ebmmu.tc15())
add_tc_2_runlist(ebmmu.tc16()) add_tc_2_runlist(ebmmu.tc16())
watchdog.tc1() watchdog.tc1()