RoCC working example

504 views
Skip to first unread message

Alaa Salman

unread,
Aug 12, 2020, 9:39:58 AM8/12/20
to RISC-V HW Dev
Hi all,

is there any working example for connecting accelerator to RocketChip?

Thanks

Tung Hoang

unread,
Aug 12, 2020, 2:33:21 PM8/12/20
to Alaa Salman, RISC-V HW Dev
Check Chipyard, there are SHA3 and Gemini (systolic array) examples 

/T

--


You received this message because you are subscribed to the Google Groups "RISC-V HW Dev" group.


To unsubscribe from this group and stop receiving emails from it, send an email to hw-dev+un...@groups.riscv.org.


To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/hw-dev/8fc3ae2d-a04c-4257-99f0-6e32acbc4df2n%40groups.riscv.org.


Schuyler Eldridge

unread,
Aug 12, 2020, 2:52:39 PM8/12/20
to Alaa Salman, RISC-V HW Dev
On Wed, Aug 12, 2020 at 06:39:58AM -0700, Alaa Salman wrote:
> is there any working example for connecting accelerator to RocketChip?

Rocket Chip has three toy RoCC accelerators written in Chisel and one
toy RoCC accelerator written in Verilog:

- AccumulatorExample: src/main/scala/tile/LazyRoCC.scala
- TranslatorExample: src/main/scala/tile/LazyRoCC.scala
- CharacterCountExample: src/main/scala/tile/LazyRoCC.scala
- RoccBlackBox: src/main/resources/vsrc/RoccBlackBox.v

You can build a Verilator-based simulation of this with (assuming that
you have built rocket-tools and set your RISCV environment variable
appropriately):

cd rocket-chip
RISCV=<set this> make CONFIG=freechips.rocketchip.system.RoccExampleConfig -C emulator

There is example software for talking to the AccumulatorExample
located here:

- https://github.com/seldridge/rocket-rocc-examples

Note: that I haven't run this in some time and I never setup CI for
it. YMMV

Assembly macros (used by above) for building software to exercise your
RoCC (without hacking binutils) can be found:

- https://github.com/ibm/rocc-software/

Alaa Salman

unread,
Aug 14, 2020, 8:23:52 AM8/14/20
to Schuyler Eldridge, RISC-V HW Dev
Thanks a lot. I got the accumulator example working. 


Reply all
Reply to author
Forward
0 new messages