Skip to content

Commit

Permalink
revert comparators removal on arbiter
Browse files Browse the repository at this point in the history
  • Loading branch information
bieganski committed Aug 27, 2024
1 parent db21baa commit e174c78
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion mtkcpu/units/loadstore.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,13 @@ def elaborate(self, platform):
start_addr = addr_scheme.first_valid_addr_incl
max_legal_addr = start_addr + self.word_size * (num_words - 1)
req_addr : Signal = self.bus.adr
with m.If(req_addr.word_select(7, 4) == (start_addr >> 28)):

# TODO: the longest critical path here.
# can't get rid of it yet, as removing comparators fails test_exception.py
#
# with m.If(req_addr.word_select(7, 4) == (start_addr >> 28)):
#
with m.If((req_addr >= start_addr) & (req_addr <= max_legal_addr)):
m.d.comb += [
slv_bus.connect(self.bus, exclude=["adr"]),
slv_bus.adr.eq(req_addr - start_addr),
Expand Down

0 comments on commit e174c78

Please sign in to comment.