litex-hub / linux-on-litex-rocket

Run 64-bit Linux on LiteX + RocketChip
BSD 2-Clause "Simplified" License
181 stars 18 forks source link

genesys2: full4q CPU variant not supported #37

Closed newinnovations closed 10 months ago

newinnovations commented 10 months ago

Following the instructions for building for the Digilent Genesys2 ...

litex-boards/litex_boards/targets/digilent_genesys2.py --build \
    --cpu-type rocket --cpu-variant full4q --sys-clk-freq 100e6 \
    --with-ethernet --with-sdcard

... I get the following error:

1.057 ERROR:SoC:full4q CPU variant not supported, supported are:
1.057  - full
1.057  - linux
1.057  - medium
1.057  - small

I am wondering whether I should use full or linux instead of full4q? Or maybe I made some error installing litex.

Your help is greatly appreciated.

gsomlo commented 10 months ago

Have a look here: https://github.com/litex-hub/pythondata-cpu-rocket/commit/ef6cf0a11f4a5d384f72b9b3661c85ad81d5e942

The variants have been renamed so on genesys2 you should probably use --cpu-variant linux --cpu-num-cores 4 --cpu-mem-width 4.

The genesys2 has a 256-bit wide LiteDRAM port, hence --cpu-mem-width 4. You can pick the --cpu-num-cores you want, might be able to fit 8 of them on a large FPGA, not exactly sure (but there should be room enough for 4).

NOTE: I'd like to eliminate support for the various --cpu-mem-width options in the long term, but first I (or someone) would have to fix the LiteX AXI up-converter (https://github.com/enjoy-digital/litex/issues/1753 warning: the comment thread goes a bit off topic :) )

newinnovations commented 10 months ago

Thanks for the quick reply!