Skip to content

Commit

Permalink
[P2] Installation and Data Preloading Issue tancheng#11 - read const…
Browse files Browse the repository at this point in the history
… from ConstQueueDynamicRTL.py
  • Loading branch information
yuqisun committed Jan 11, 2025
1 parent 5ea7ac7 commit 86fc83f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mem/const/ConstQueueDynamicRTL.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ def load_const():
s.reg_file.wen[0] @= 1
# s.recv_const.rdy @= 0(consumer: self) will stop receive const from inport immediately even there's rdy @= 1(self) in @update
# so will avoid receiving new data when regs full
# can NOT do this by comparing cur > AddrType(const_mem_size - 1)
# for example: mem size=8, cur will be Bits3(0x0) once it reaches Bits3(0x7) + AddrType(1) in loop
# and can NOT use bigger AddrType for cur as it will be used to update waddr: (s.reg_file.waddr[0] @= s.cur), waddr is binded with mem size
if s.cur == AddrType(const_mem_size - 1):
s.recv_const.rdy @= 0

Expand Down

0 comments on commit 86fc83f

Please sign in to comment.