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

Do we really need start address from ocd to mcu? #11

Open
howard0su opened this issue Aug 13, 2019 · 3 comments
Open

Do we really need start address from ocd to mcu? #11

howard0su opened this issue Aug 13, 2019 · 3 comments

Comments

@howard0su
Copy link
Contributor

pretty much it is hard coded as 0x80000000 anywhere from what I see. Shall we remove it?

@PulseRainmaker
Copy link
Member

Every processor has its own address space mapping. For Reindeer, it is 0x20000000 as base for Memory Mapped registers, and 0x80000000 as base for RAM. In fact, for compilers, their link script should be set to reflect such address space mapping.

@howard0su
Copy link
Contributor Author

Is it said that 0x80000000 is something we can hardcoded in the MCU instead of passing from OCD? or we can make OCD write to PC_REG directly?

@PulseRainmaker
Copy link
Member

We don't have to hard-code 0x80000000 as start address, but 0x80000000 is already hard-coded as the base address for RAM.

In the current verilator testbench, https://github.com/PulseRain/Reindeer/blob/master/sim/verilator/tb_PulseRain_RV2T.cpp

start_address' default value is 0x80000000. However, if _start label is found in the elf file, the start_address will be set to the address of _start label.

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

2 participants