Giter Site home page Giter Site logo

Comments (4)

zhangkanqi avatar zhangkanqi commented on July 3, 2024 1

Thanks a lot.
I have modified spike, now it can run instructions in ROM.

from rsd.

shioyadan avatar shioyadan commented on July 3, 2024

Hello,
Apologies for the delayed response.

I believe the error you're encountering stems from a difference between the memory address map used by RSD and one assumed by Spike.

The binaries for RSD are compiled based on the address map defined in the linker script found here: https://github.com/rsd-devel/rsd/blob/master/Processor/Src/Verification/TestCode/rsd-ld.script. However, it seems Spike utilizes a different address map.

If you're looking to run RSD binaries on Spike, it would be advisable to check and align with the address map that Spike assumes.

In case your goal is simply to execute RSD binaries on an emulator, I suggest using an older version of QEMU (around 2017). Recent versions of QEMU appear to have adopted a different address map. However, the memory address map RSD assumes aligns with that of the older QEMU versions. For instance, we previously ran binaries on QEMU as demonstrated in this Makefile: https://github.com/rsd-devel/rsd/blob/master/Processor/Tools/QEMU_SimDriver/Makefile.

from rsd.

zhangkanqi avatar zhangkanqi commented on July 3, 2024

Can I put the instructions to be executed in the RAM area(pc>=0x8000 0000)? I tried and failed.
I think that might due to the width of pc. Because in rsd, the pc is 19-bit, but RAM starts with 0x8000 0000.

from rsd.

shioyadan avatar shioyadan commented on July 3, 2024

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.

In the case of Verilator, code.hex is loaded at the following location. (Sorry, the comment is written in Japanese...)

loadHexFile(codeFileName, mainMem, 0, true);

code.hex is generated by the following makefile.
https://github.com/rsd-devel/rsd/blob/3d13af1bc14d2b34a546754973d832d0309d118e/Processor/Src/Verification/TestCode/Makefile.inc

Note that, RSD has 19-bit compressed logical addresses by default, but RSD can use 0x8000000000 >= space with a hack that treats the most significant bit specially.

Also, you can disable this compression feature by disabling the macro on the following line:

`define RSD_NARROW_PC

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.