Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

simplify address decoder #11

Open
bieganski opened this issue Feb 27, 2022 · 0 comments
Open

simplify address decoder #11

bieganski opened this issue Feb 27, 2022 · 0 comments

Comments

@bieganski
Copy link
Owner

bieganski commented Feb 27, 2022

What happens?

Currently address decoder allows for whole 32-bit space to be used, which is a killer for FPGA resources.
Relevant code:

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),
            matches[i].eq(1),
        ]

32-bit comparators are used.
Instead we should force some address space restrictions on periph. devices registration and simplify decoder's logic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant