-
Notifications
You must be signed in to change notification settings - Fork 90
soc_core:allocate correct size for ROM. #97
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -135,9 +135,11 @@ def register_mem(self, name, origin, length, interface): | |
|
||
def register_rom(self, interface, rom_size=0xa000): | ||
self.add_wb_slave(self.mem_map["rom"], rom_size, interface) | ||
assert self.cpu_reset_address < rom_size | ||
self.add_memory_region("rom", self.cpu_reset_address, | ||
rom_size-self.cpu_reset_address) | ||
if not self.mem_map["rom"] == self.cpu_reset_address: | ||
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 commentThe 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. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Style issues:
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. |
||
|
||
def get_memory_regions(self): | ||
return self._memory_regions | ||
|
Uh oh!
There was an error while loading. Please reload this page.