Interfacing With Simulators Part-I

Print

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).

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

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 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

Bạn Có Đam Mê Với Vi Mạch hay Nhúng      -     Bạn Muốn Trau Dồi Thêm Kĩ Năng

Mong Muốn Có Thêm Cơ Hội Trong Công Việc

Và Trở Thành Một Người Có Giá Trị Hơn

Bạn Chưa Biết Phương Thức Nào Nhanh Chóng Để Đạt Được Chúng

Hãy Để Chúng Tôi Hỗ Trợ Cho Bạn. SEMICON  

Last Updated ( Tuesday, 29 March 2022 00:05 )