openrisc / mor1kx

mor1kx - an OpenRISC 1000 processor IP core
Other
490 stars 146 forks source link

How to run mor1kx with verilator? #156

Closed zhangkanqi closed 10 months ago

zhangkanqi commented 11 months ago

Hi! I want to run mor1kx with verilator, but I dodn't get the results I want directly from the document and readme.

Specifically, in order to run with verilator, I need only one verilog file rather than many verilog files. But I don't know how to complie whole mor1kx project to one verilog file. Could u give me some hints, please?

Looking forward to your reply:)

juliusbaxter commented 10 months ago

I wonder if one of the FuseSoC builds of mor1kx has a Verilator target?

@stffrdhrn or @olofk do you know? Thanks!

stffrdhrn commented 10 months ago

Hello, yes we can run mor1kx with verilator using the fusesoc build. For example https://github.com/stffrdhrn/mor1kx-generic/blob/master/mor1kx-generic.core

This supports both verilator and Icarus. You can run it with fusesoc, there are some examples in the mor1kx CI if you want to dig.

juliusbaxter commented 10 months ago

Nice one, thanks Stafford, indeed that does contain support for building mor1kx with Verilator in an example SoC.