You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to RISC-V Teach
Hi,
Is there anyone to who has implemented RISC-V (5 stage pipelined architecture) in C++ for simulation purpose? I have to implement RISC-V architecture in C++ so i have no idea how to start it. If it possible then please share your code.
Regards,
Awais Ahmed
Stef O'Rear
unread,
Feb 14, 2018, 6:02:33 AM2/14/18
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Stef O'Rear, Awais Ahmed, RISC-V Teach
Hi Awais,
As Stef says, you might want to take a look at gem5. gem5 includes both simple in-order microarchitectural timing models as well as more complex out-of-order microarchitectural timing models. It may or may not be suitable for teaching depending on the scope of what you are trying to achieve.
Alec Roelke and Mircea Stan at the University of Virginia took the lead on the initial RISC-V gem5 port with support for single-threaded syscall emulation. This should currently be available in the master branch for gem5:
My own research group at Cornell has been taking the lead on the RISC-V gem5 port with support for multi-threaded syscall emulation. We are in the process of upstreaming our patches and going through the corresponding code review.
Best,
Chris
----------------------
Christopher F. Batten
Associate Professor @ ECE, Cornell University
Visiting Scholar @ The Computer Laboratory, University of Cambridge
Visiting Fellow @ Clare Hall, University of Cambridge
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to riscv...@groups.riscv.org, Graham Markall
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Awais,
Here is another approach which may be of interest. Depends what you
want to use your simulation for.
We generate a cycle accurate C++ model from the Verilog of the PULP
project's RI5CY core using Verilator (although I think they have a 4
stage pipeline). This model is used for nightly GNU tool chain
regression testing. It runs at around 400KHz on a modern laptop.
You will need a very up-to-date version of verilator.
I'm not sure the instructions in the README are correct. You might
need to run "make" just from the verilator-model directory. I'm OoO,
so I've copied in my colleague, Graham Markall who may be able to
clarify this.
There is a simple testbench to exercise the model. There is a separate
repository with a GDB server to wrap around the model so you can
connect from GDB to load and run programs.
HTH,
Jeremy
>
> Regards, Awais Ahmed
>
> -- You received this message because you are subscribed to the
> Google Groups "RISC-V Teach" group. To unsubscribe from this group
> and stop receiving emails from it, send an email to
> riscv-teach...@groups.riscv.org
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to RISC-V Teach, graham....@embecosm.com, jeremy....@embecosm.com
We submitted the Verilator model back to the upstream pulp-platform project, so it would be best to use that version instead, which will have all the latest fixes and changes to the core - to use it, see the README in the upstream repo: https://github.com/pulp-platform/riscv/tree/master/verilator-model
The testbench demonstrates how to put a program in memory and step the CPU, and to read debug registers, so you needn't use a gdbserver etc. just for trying it out and running simple programs.
Best regards,
Graham.
Peiqi Chen
unread,
Nov 30, 2022, 12:16:47 PM11/30/22
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to RISC-V Teach, Awais Ahmed
Hi,
If you have implementation about RISC-V (5 stage pipeline version), mind sharing with me? Just need to do it and have no idea how to implement 5 stage core:/ Just done with single core.