Giter Site home page Giter Site logo

Comments (7)

zhangkanqi avatar zhangkanqi commented on July 22, 2024 1

Get it! There is something wrong with my elf file, I ignore AT>ROM in rsd-ld.script.

Thanks for your reply :)

from rsd.

shioyadan avatar shioyadan commented on July 22, 2024

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.

zhangkanqi avatar zhangkanqi commented on July 22, 2024

So you mean it's permissible to put Instruction at RAM in RSD?
I will check code.hex right away.

from rsd.

zhangkanqi avatar zhangkanqi commented on July 22, 2024

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.

shioyadan avatar shioyadan commented on July 22, 2024

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.

auto loadHexFile = [&](

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.

shioyadan avatar shioyadan commented on July 22, 2024

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.

zhangkanqi avatar zhangkanqi commented on July 22, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.