lib.fifo: fix level on fifo full
This commit is contained in:
parent
781a3aa767
commit
c7014f84ea
2 changed files with 34 additions and 3 deletions
|
|
@ -380,8 +380,8 @@ class AsyncFIFO(Elaboratable, FIFOInterface):
|
|||
r_empty.eq(consume_r_gry == produce_r_gry),
|
||||
]
|
||||
|
||||
m.d[self._w_domain] += self.w_level.eq((produce_w_bin - consume_w_bin)[:self._ctr_bits-1])
|
||||
m.d.comb += self.r_level.eq((produce_r_bin - consume_r_bin)[:self._ctr_bits-1])
|
||||
m.d[self._w_domain] += self.w_level.eq((produce_w_bin - consume_w_bin))
|
||||
m.d.comb += self.r_level.eq((produce_r_bin - consume_r_bin))
|
||||
|
||||
storage = Memory(width=self.width, depth=self.depth)
|
||||
w_port = m.submodules.w_port = storage.write_port(domain=self._w_domain)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue