Customer developed a bus OVC, but needs each agent (driver) to be clocked with a different clock

Contributor: Jim McGrath  
Date: October 22, 2008  
Description:

Customer developed a bus OVC, but needs each agent (driver) to be clocked with a different clock

There are two solutions. One is to use an array of bits or logic and pass that as part of the interface. Use the agent ID (set via set_config_int()) to select the correct clock bit in each driver instance. An alternate solution is to use two interfaces - one which represents the common bus pins, and one which represents the clock. Then have a unique instance of the clock interface for each agent(driver) interface. The solution of having a separate interface for the clock is presented below. Using an interface allows the "virtual interface" mechanism to be used at the driver level. There are pro's and con's to each solution. I presented both to the user, and he indicated he preferred the solution presented below.

The example below will compile and run, and is only a VERY SIMPLE example of the implementation of the concept - not a complete UVC. You can add all four interfaces to simvision and see that the various clocks do work, and the individual drivers activate and drive when triggered.

NOTE: This example is coded to work with OVM-2.0

 
Download: bus_0.sv