chipyard icon indicating copy to clipboard operation
chipyard copied to clipboard

How to test RoCC Accelerator alone

Open xiaolingyi opened this issue 5 years ago • 4 comments

Hi, I designed a custom accelerator using the RoCC interface. And now I want to test the accelerator independently on an FPGA board, so I need to write a test driver and only instantiate one custom accelerator. But I am confused about how to just instantiate a custom accelerator without the rocket core. I instantiated a custom accelerator like this : image

But I got this error: image

And I found that the RoCC accelerators are Mount on Rocket core using this grammar. image

So it seems that I need to give the custom accelerator a "parameter p", but how should I instantiate a custom accelerator clearly without other modules? And what is the logic behind these parameters?

Thanks.

xiaolingyi avatar Sep 18 '21 14:09 xiaolingyi

The parameters object passed in contains global configuration information that may be relevant to the accelerator.

If you want to create an accelerator-only testharness, I would copy+modify TestHarness.scala to have a version which directly instantiates the accelerator, passing in the Parameters object which is available in TestHarness.

jerryz123 avatar Sep 18 '21 19:09 jerryz123

I would copy+modify TestHarness.scala to have a version which directly instantiates the accelerator

Thanks. And how can I get this specific TestHarness.scala file?

xiaolingyi avatar Sep 19 '21 02:09 xiaolingyi

TestHarness.scala is available in the chipyard source code, but you'll have to make some modifications to produce an accelerator-only TestHarness.

jerryz123 avatar Oct 02 '21 22:10 jerryz123

[Closing as stale+answered. Feel free to reopen if needed!]

Fi50 avatar Mar 29 '25 09:03 Fi50