Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RISCy sim functions #692

Open
wants to merge 3 commits into
base: staging
Choose a base branch
from
Open

RISCy sim functions #692

wants to merge 3 commits into from

Conversation

lmbollen
Copy link
Contributor

@lmbollen lmbollen commented Dec 4, 2024

Debug some designs with a risc processor more easily by simulating it in your terminal

@lmbollen lmbollen force-pushed the lucas/add-riscv-sims branch 3 times, most recently from 98ee602 to 6fb0f86 Compare December 4, 2024 11:12
@@ -26,11 +28,34 @@ import Bittide.ProcessingElement
import Bittide.Wishbone
import Protocols.Idle

-- Simulation imports
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it's super overkill, but this sounds like LANGUAGE CPP could be nice for conditional imports and also later down in the file for the memory contents?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added two flags, one to include the binaries in the compilation named cpu-include-binaries, and sim-baud-rate that sets the baud rate to the maximum allowed by the domain for faster simulation.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know I'm on holiday 👀, but couldn't we use clashSimulation for this? CPP is somewhat terrible in the sense that it's very hard to keep all combinations of CPP compiling / testable.

`cpu-include-binaries` includes the corresponding riscv binary(if there is one) in the compilation process. This way we don't need to program the cpu over JTAG.

`sim-baud-rate` sets the baud rate of the uart component to the maximum value allowed by its clock domain. This makes for faster simulation of softcore CPUs
@lmbollen lmbollen force-pushed the lucas/add-riscv-sims branch from 6fb0f86 to 217b405 Compare December 16, 2024 11:13
@lmbollen lmbollen requested a review from hydrolarus December 16, 2024 11:15
@lmbollen lmbollen force-pushed the lucas/add-riscv-sims branch from 217b405 to 36554f8 Compare December 16, 2024 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants