Comments (7)
Get it! There is something wrong with my elf file, I ignore AT>ROM
in rsd-ld.script.
Thanks for your reply :)
from rsd.
Check what instruction code is fetched from address 0x80000000. It may not be the AUIPC you placed. Also, as mentioned in issue #73, check the contents of code.hex.
Thank you.
from rsd.
So you mean it's permissible to put Instruction at RAM in RSD?
I will check code.hex right away.
from rsd.
I modify my program, putting all instructions and data in RAM(starts with 0x80000000, ends with 0x80008000). And successfully generate the right code.hex.
However, I find that RSD doesn't support mainMemWordSize
=0x80008000/4. The mainMemWordSize
is 0x800000 getting from the following code.
size_t mainMemWordSize = sizeof(top->Main_Zynq_Wrapper->main->memory->body->body__DOT__ram->array) / sizeof(uint32_t);
Could you please tell me how to modify RSD to let mainMemWordSize
be 0x80008000/4? In other words, how to set TOP__Main_Zynq_Wrapper__main__memory__body__body__DOT__ram.array
?
from rsd.
As I wrote previously, the part of code.hex after 64KB is loaded into the RAM area started from 0x80000000. Thus, I think that you do not need to change mainMemWordSize.
I suspect that the issue is due to the placement in code.hex. Check the contents of your generated code.hex. The first 64KB of code.hex is loaded into the ROM area and the rest into the RAM area (0x8000000000>=). You need to be aware of this when creating binaries.
Check the implementation of load_hex(). It does not use mainMemWordSize.
Also, when you put all your instructions in the RAM area, you may need to change the initial values when the PC is reset.
from rsd.
I'm glad to hear your issue was resolved.
If you have any more questions, please don't hesitate to ask.
I may be busy at times and it may take me a while to respond, but I will do my best to accommodate you.
Thank you.
from rsd.
Thanks a lot!
Actually if i want access PC/addr at RAM, I must pad code.bin to 128KB(64KB for ROM and 64KB for RAM). That's the underlying reason. AT>ROM
is insignificant.
from rsd.
Related Issues (20)
- error running the Makefile.verilator.mk HOT 3
- Off by one error in leading 0 count loop? HOT 1
- cannot convert ‘const VlWide<92>’ to ‘const uint32_t (&)[92]’ {aka ‘const unsigned int (&)[92]’} HOT 10
- wrong pointer used for poping btb queue HOT 2
- Wiki issue HOT 2
- Error when run in verilator: no viable conversion from 'const VlWide<92>' to 'const uint32_t [92]' HOT 2
- Report 'Memory address 0x1e38 is invalid' when running helloworld.elf in spike HOT 4
- [Bug Report] SD bit in mstatus doesn't update when FS=11 HOT 3
- [Bug Report] RSD doesn't update mstatus after `mret` instruction HOT 3
- [Bug Report] `fflags` records the accumulated status incorrectly HOT 1
- [Bug Report] Incorrect upward rounding result of fsub.s instruction HOT 3
- Cache and BP Disable Possible Way HOT 6
- [Bug Report] OF flag bit in fflags is not set correctly after fdiv.s instruction HOT 1
- [Bug Report] RSD didn't update fflags.NX correctly after fnmadd.s instruction HOT 1
- [Bug Report] `fflags.NV` is not set correctly after `fsqrt.s` instruction HOT 1
- [Bug Report] `fflags.UF` is not set correctly after `fdiv.s` instruction HOT 1
- [Bug Report] `fflags.DZ` set incorrectly after `fdiv.s` instruction HOT 3
- [Bug Report] Wrong sign bit when 0 is multiplied by a negative number HOT 3
- [Bug Report] Wrong result of `+0` minus `+0` HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rsd.