Skip to content

Getting Started run RiscvTimingSimpleCPU or any other RISCV in 32 Bit? #513

Closed Answered by rogerchang23424
filipcoja asked this question in Q&A
Discussion options

You must be logged in to vote

https://stackoverflow.com/questions/52023721/build-gem5-in-32-bit-mode/77385130#77385130

The user should not change the default parameter of riscv_type to "RV32". If the config are under example/gem5_library, you can manually add section following the processor=SimpleProcessor(...) to set riscv mode to 32 bits for both SE and FS mode.

if args.riscv_32bits:
    for simple_core in processor.cores:
        for i in range(len(simple_core.core.isa)):
            simple_core.core.isa[i].riscv_type = "RV32"

Reference: https://github.com/gem5/gem5/blob/06bf783a8533fb1f78c041d2d49492b53eed26b4/tests/gem5/asmtest/configs/riscv_asmtest.py

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@filipcoja
Comment options

@rogerchang23424
Comment options

Answer selected by BobbyRBruce
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants