|
|
|
|
|
|
|
|
|
|
|
Interfacing with simulator
|
|
|
In Verilog linking any foreign language is through PLI, and in VHDL is FLI. Since e language is a foreign language, it has to go though PLI of Verilog and FLI of VHDL. We can interface simulator to specman either statically or dynamically. Simulator like Modelsim and Verilog-XL can only dynamically link, where as simulators like VCS, NCverilog can link both in statically and dynamically. We can have e code in compiled mode or run in interpreted mode. Here we will use interpreted mode. You can always refer to specman user manual for details on compiled e mode.
|
|
|
|
|
|
Here we will be looking only dynamically linking (or correctly dynamically loading the specman lib).
|
|
|
|
|
|
Compiling e Files
|
|
|
First step for any testbench is to make sure that your e code is compilable, to check this, you need to execute command as below.
|
|
|
|
|
|
specman -c "load my_top_tb.e"
|
|
|
|
|
|
This will basically check your code of syntax, but will not check any null objects (no run time errors are checked). You can always refer to specman reference manual for details.
|
|
|
|
|
|
|
|
|
|
|
|
Linking Specman Elite with Simulators
|
|
|
Once we have checked syntax of e code, we can proceed to linking. We will seeing following version of linkings
|
|
|
|
|
|
- VCS : Dynamic Linking with VCS and sn_compile.sh
- NcVerilog : Loading a Shared Library Dynamically into NC Simulator
- Modelsim : Compiling e Code for ModelSim (Loading a Shared Library Dynamically)
|
|
|
|
|
|
Interfacing with VCS
|
|
|
For interfacing with VCS we use sn_compile.sh script as follows.
|
|
|
|
|
|
sn_compile.sh -sim vcs -vcs_flags "verilog-file-list" e-file-list
|
|
|
|
|
|
When linking VCS and Specman Elite without compiled e code, the sn_compile.sh script creates an integrated executable named vcs_specman that contains the simulator, Specman Elite, and the user Verilog code. Specman Elite finds the appropriate adapter library based on the following environment variables in system.specman:
|
|
|
|
|
|
SPECMAN_VCS_ADAPTER = "$SPECMAN_HOME/platform/libvcs_sn_adapter.ext";
|
|
|
|
|
|
The integrated executable contains the simulator, Specman Elite, user Verilog code and user e code. The default name of the executable is the top-level e module named prefixed with "vcs".
|
|
|
|
|
|
Interfacing with NCVerilog
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Interfacing with Modelsim
|
|
|
In order to run Specman Elite with ModelSim, you must load the ModelSim Specman Elite boot library into the simulator at run time. The boot library is available at:
|
|
|
|
|
|
$SPECMAN_HOME/platform/libmti_sn_boot.ext
|
|
|
|
|
|
To load libmti_sn_boot.ext into the ModelSim simulator
|
|
|
|
|
|
- vsim -c -pli $SPECMAN_HOME/platform/libmti_sn_boot.ext hdl_file_list
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|