-
Notifications
You must be signed in to change notification settings - Fork 240
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
Rework bus system and memory map #647
Comments
this is quite exciting, and i'm anxious to merge your PR with my own experiments with compressed addresses.... one immediate question is the alignment requirements of each of these sections.... this is important for me, as i'm planning to pack everything into a 17-bit space.... clearly there are some challenges with XIP, which typically opens up a very wide window.... since i'm executing out of IMEM and ROM, i'm not using XIP at all; my bootloader uses the standard SPI block to copy code from the FLASH to IMEM.... does your proposal allow me to opt-out of XIP altogether, meaning no part of my address space is used as a FLASH window and hence doesn't need to be decoded???? (seperately, i'll open a discussion on an alternative XIP design which could support a compressed address space....) as for IO space, 256 bytes per device is quite generous -- and is only used today by CFS, which could have easily been realized as CFS0, CFS1, etc using fewer bytes per device.... since this effectively determines the width of the address portion of the IO bus, there are opportunities to save LUTs.... i would favor 32 bytes per device, to minimize the internal fragmentation of address space; and if we can support "byte-level" addresses that still read/write 32-bits of data, we're really not looking much difference at all.... in practice, you'd like to limit the number of "top-level" IO devices to (say) 32.... indeed, many devices like SPI and I2C are in fact controllers for a sub-bus that contains many more devices.... currently, we deal with a relatively small number of "top-level" interrupts from these devices anyhow.... you could imagine a centralized IO bus decoder which splits the address into a < finally, my latest work on compressed addresses has led me to the following map:
with this rather strange mapping, the lower 17-bits of the 32-bit addresses remain unique.... most important, though, is whether your proposed design can handle this specific configuration.... |
One of the goals of that PR is to make the entire address mapping as configurable as possible. Finally, there will be one (big?) address table in the package file that can be altered while all possible side-effect are resolved by the (new) bus infrastructure. At least that is the plan 😅
The memory-mapped XIP flash access will be mapped to a fixed address space (
True, but right we already have two modules with such a big address space: the CFS and the on-chip debugger. Sure, we could split the CFS into smaller portions, but splitting the debugger modules would be quite hard...
That is exactly what I am planning. A maximum of 32 devices in the IO space so they can be accesses with a 5-bit portion of the address.
This is also exactly what I am working on 😉 Here is the my proposal for the upcoming address map consisting of 5 main address regions (again, the base addresses of these regions can be customized):
All accesses that do not match any of these regions will end up in the "void" (being redirected to the external memory interface if enabled; otherwise an exception is raised). |
In order to tackle #629 and #576 I am experimenting with a new processor-internal bus system. Right now we have a single bus (high fan-out!) and all the modules to the address check by themselves. A more-centralized address decoding (at least for specific address sections) might be more efficient as the synthesis tool has more freedom for optimizations. Furthermore, this would also simplify customization (@biosbob).
So this is my idea:
The address sections would be defined by package constants or maybe even by a single (huge) table (record) to allow easy customization. The decoding would be done by a centralized interconnect.
In order to simplify the address decoding of the IO modules I would like to...
ADDR_BASE
andADDR_MASK
generics to each module (RFC: [rtl] Replace peripheral's direct access to XXX_base_c constants with a generic #576) to the modules can be re-used by the user (for example to add several SPIs cores); the individual IO address decoding would still be implemented by the devices themselvesAny thoughts?
The text was updated successfully, but these errors were encountered: