HDLmaker supports most popular simulators including

finsim
modelsim
ncsim/ncverilog
vcs

 _v.cmd File

HDLmaker generates a component list file called xxx_v.cmd, where xxx is the name of the top file, which is usable by most simulators.  The _v.cmd file is an ordered list starting with the top of the hierarchy and proceeding down. As an example consider a testbench where the top level is called sys.top. To run ncverilog you would do the following,

hdlmaker -simulate sys.top
cp v/*.v* sim
cp scripts/sys_v.cmd sim
cd sim
ncverilog +access+r -f sys_v.cmd

where the sys_v.cmd contains:

sys.v clkgen.v  global.v  pcb_rev_1_13.v  capacitor_100nf.v  capacitor_10nf.v ...

The env variable HDLMAKER_VERILOG_CMD specifies a preamble that is inserted into the start of the of the _v.cmd file. For example,

setenv HDLMAKER_VERILOG_CMD "ncverilog +access+r"

hdlmaker -simulate sys.top
cp v/*.v* sim
cp scripts/sys_v.cmd sim
cd sim
sys_v.cmd

In this case the sys_v.cmd is an executable script that contains:

ncverilog +access+r sys.v clkgen.v  global.v  pcb_rev_1_13.v  capacitor_100nf.v ...

Generally it's better to set HDLMAKER_VERILOG_CMD to an empty string, i.e. "", and to rely on a script to invoke the simulator.

 Simulation Scripts
Several scripts are included in HDLMAKER_LIB/csh which are useful for simulation, these are

hdl_sim runs hdlmaker and creates the sim directory,

 hdl_sim sys

run_vcs, run_finsim, run_ncsim invoke the vcs, finsim and ncverilog simulators respectively,

 run_vcs sys
 run_ncsim sys
 run_finsim sys

 Importing Models
Most testbenchs will include some components that were written without the aid of HDLmaker. HDLmaker builds _v.cmd files from the _v.cmd files of the lower level components. For each imported component you must build a _v.cmd file by hand and place it in the scripts subdirectory. For example if you have a a model called foo.v which consists of the files, foo.v, bar.v and foo_pads.v then you must create a _v.cmd file called foo_v.cmd that contains the following:

foo.v bar.v foo_pads.v

HDLmaker will then include the contents of foo_v.cmd in the top level _v.cmd file.


 ModelSim
ModelSim requires a .do file. HDLmaker generates a ModelSim .do file when the -modeltech switch is used.

hdlmaker -modeltech sys.top

Generates the file

scripts/sys_mt.cmd (ModelSim command line script)
scripts/sys.mpf (ModelSim project file)

 Simulation Specific Top File Directives
There are a couple of HDLmaker top file directives are useful for testbench code, these are

#initial
#timescale