Skip to content

Conversation

@keesj
Copy link

@keesj keesj commented Jan 30, 2019

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.

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)
Copy link
Author

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)
Copy link
Member

@sbourdeauducq sbourdeauducq Feb 6, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style issues:

  • != and not not ==
  • 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.

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

Successfully merging this pull request may close these issues.

2 participants