chipyard icon indicating copy to clipboard operation
chipyard copied to clipboard

How to drive custom TopLevel signals/pins in the testbench.

Open Rodiot opened this issue 5 years ago • 4 comments

Lets assume we have added a custom module to our design and this module has some dedicated top level pins like explained in the docs 6.6. MMIO Peripherals. These signals, gcd_busy in the example, are routed to the ChipTop module in the generated verilog code. But how can I drive these custom signals during simulation. I am not able to find any documentation for this. The docs 8.2. Communicating with the DUT only explain the concepts on a very high level, but not further information for custumization is provided.

KR Robert

Rodiot avatar Aug 19 '21 15:08 Rodiot

The HarnessBinder interface provides a hook for attaching arbitrary test-harness widgets to chip pins.

jerryz123 avatar Aug 23 '21 08:08 jerryz123

Thanks @jerryz123. You are right but what I am missing is a bit of documentation how the vpi interface works behind the scenes. For example what are the serial commands used to load the program and start the processor. One would need these to build a own Verilog testbench. Or how can I introduce my own C code into the testbench and do something after the program was loaded. That would be nice to have in the Docs in the future.

Rodiot avatar Aug 26 '21 07:08 Rodiot

A bit belated.... but @doihead is writing some great documentation on ChipTop / TestHarness / custom ChipTops / IO Cells etc for our Berkeley classes:

(Currently only available for internal use.) Leaving this issue as an enhancement i.e. once the semester ends, we should consider generalizing and upstreaming some of that documentation. (Thanks as always Ethan!!)

Fi50 avatar Mar 30 '25 20:03 Fi50

We've moved the current documentation to here for now: https://ucb-ee290c.github.io/tutorials/chipyard/chipyard-toplevel/chipyard-toplevel.html

Leaving open as a reminder that we should write more for this.

Fi50 avatar May 30 '25 05:05 Fi50