APB Testbench Top

The Top-level of our APB Testbench

With the environment class implemented as part of the last module, we completed implementing all of the dynamic class based components for the testbench. In this module, we would be implementing the top level for our testbench. The top level module has the following responsibilities:

  • Instantiate the design under test
  • Create and instantiate the actual interface which would connect the DUT and TB
  • Create the environment class and start it by calling the run() method
  • Generate clocks which would be passed to both the testbench and the DUT

Testbench_Architecture_Top

Given the top module is where the environment gets built, it is also responsible for any overrides for the transaction class. Remember, in the generator module we had discussed that using the generator allows us to override the base transaction class with any of the child instances. The top module is where the child transaction class can be instantiated and then connected (in simpler terms assigned) to the blueprint object created in the generator class. This can be done as part of the top module since it has the entire TB hierarchy accessible. Apart from this

Loading the interactive workspace...