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

Changing Naxriscv instructions - command #92

Open
mdmriscv opened this issue Apr 10, 2024 · 1 comment
Open

Changing Naxriscv instructions - command #92

mdmriscv opened this issue Apr 10, 2024 · 1 comment

Comments

@mdmriscv
Copy link

Hi,

I am a starter in this code and would like to initially change some Naxriscv instructions.

To provide some context, I was able to successfully compile and run litex, flash the board, and even boot Linux using Naxriscv as below:

python3 -m litex_boards.targets.digilent_nexys_video --cpu-type=naxriscv --bus-standard axi-lite --with-video-framebuffer --with-spi-sdcard --with-ethernet --xlen=64 --scala-args='rvc=true,rvf=true,rvd=true' --build --load

All good, thanks for those.

It seems that a way to change via changing the files located at pythondata/verilog/ext/NaxRiscv/src/main/scala/naxriscv/riscv because there are *.scala files and for example, the Rvi.scala file has the definitions of the instructions. Am I correct?
Let's say that the following is possible: I want to remove one of the instructions (e.g. AMOADD) generate a riscv without this instruction. Let's say I comment all *.scala files in this folder and related usage.

What is the command I have to use to regenerate the bitstream?

I am not sure, but it seems that I have to add --scala-file=.../python-cpu-naxriscv/verilog/configs gen.scala to the command above? Anyway, it seems that if I do that that it still uses the verilog files (under verilog folder) and not the *.scala files I meant before.

Any help is more than welcome!
Thanks much

@Dolu1990
Copy link
Member

Hi,

Removing the AMOADD from that list would work :

What is the command I have to use to regenerate the bitstream?

you will have to :

  • delete the pythondata-cpu-naxriscv/pythondata_cpu_naxriscv/verilog/NaxRiscvLitex_*.v files
  • run the commend you used with an additional --update-repo=no

but it seems that I have to add --scala-file=.../python-cpu-naxriscv/verilog/configs gen.scala to

Naa not realy, it is the default if i remember well.

Also, note enjoy-digital/litex#1923 :)

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

No branches or pull requests

2 participants