The test harness is a module with arbitrary inputs and outputs and arbitrary functionality that can be instantiated as other modules. It is,
in fact, just a predefined module meeting the standard API as any other C++ module does.
The inputs and outputs are specified at instantiation time by string options to the module:
the option string 'inputs' gives a string list of the inputs for the module;
the option string 'outputs' gives a string list of the outputs for the module.
The module is always clocked, and has a single clock. The name of this is specified with a string option 'clock' at instantiation time.
The functionality of the module comes from an 'exec_file' whose name is passed in to the instantiation with the string option 'filename'. This exec_file
supports the standard functions, plus those described in the section below.
All the options (the above named ones and any others given to the instance) are available inside the exec_file, so additional arguments may be passed to
the functionality section of the module by using these options. For example, many of the regression tests pass a string to
their test harness that contains the name of the particular test to run, and that test data is gathered from a memory which can be preloaded with
a MIF file derived from that test name.
|