-
Notifications
You must be signed in to change notification settings - Fork 85
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
soc_core:allocate correct size for ROM. #97
base: master
Are you sure you want to change the base?
Conversation
The wishbone and memory allocation code for ROM validated that the CPU reset address was witin the ROM address range. This however only really worked when the cpu_reset_address was 0. A second issue was that the size of the allocated memory mapping was wrongly calculated. Signed-off-by: Kees Jongenburger <[email protected]>
raise ValueError( | ||
"CPU reset address 0x{:x} is not equal to the rom start addres 0x{:x}" | ||
.format(self.cpu_reset_address,self.mem_map["rom"])) | ||
self.add_memory_region("rom", self.mem_map["rom"],rom_size) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I validated that this code now allows to map the rom section to a different address and that the code still works and believe all comments stated where resolved.
raise ValueError( | ||
"CPU reset address 0x{:x} is not equal to the rom start addres 0x{:x}" | ||
.format(self.cpu_reset_address,self.mem_map["rom"])) | ||
self.add_memory_region("rom", self.mem_map["rom"],rom_size) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style issues:
!=
and notnot ==
- space after comma
I believe that many targets and ARTIQ in particular have a reset address within the ROM (beginning of the ROM is the FPGA bitstream), so your change will break them.
If the reset address was always the ROM start, we would not need two parameters.
Discussed in #96
The wishbone and memory allocation code for ROM validated that the CPU
reset address was witin the ROM address range. This however only really
worked when the cpu_reset_address was 0. A second issue was that the
size of the allocated memory mapping was wrongly calculated.