In this approach the test specific code is written in VHDL. It is stored in a file separate from the transactor code. To set up the transactor for a specific test, a pre-processor will insert that file into the transactor code and then the transactor is recompiled. The place where the file is inserted is marked with a special comment e.g. "--insert_file inp.cmd" where inp.cmd is the file name.
In Unix the pre-processor would be run like this:
awk -f insert.awk < transactor.vhd > precompiled_transactor.vhd vcom precompiled_transactor.vhd
The file test_code.vhd is assumed to be in the current directory. (The compilation command would be appropriate for the MTI simulator, it needs to be replaced by an equivalent command for other simulators.)
Some problems of this approach are:
Some of the benefits are:
Below are the files which have been executed in this section:
insert.awk | test_code.vhd | transactor.vhd |