12.07.2015 Views

Simulator Configuration Guide for Synopsys Models

Simulator Configuration Guide for Synopsys Models

Simulator Configuration Guide for Synopsys Models

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 6: Using NC-VHDL with <strong>Synopsys</strong> <strong>Models</strong><strong>Simulator</strong> <strong>Configuration</strong> <strong>Guide</strong>For NC-VHDL Version 3 or LowerFollow these steps to create an NC-VHDL (version 3 or lower) compatible libfmi.sodynamic library <strong>for</strong> use with VERA and DWMM models.1. Create a C source file named sim_user.c in which to put the fmiLibraryTable, orcopy the sim_user.c file from the VERA tree to use as a template:cp $VERA_HOME/lib/nc_vhdl/sim_user.c .2. Add the following lines to the new sim_user.c:#include extern fmiModelTableT vera_mtbl;extern fmiModelTableT CpipeModelTable;/*** Add externs <strong>for</strong> the fmiModelTables of any other C code modules** included in your custom libfmi.(so|sl) dynamic library*/fmiLibraryTableT fmiLibraryTable = {{ "vera", vera_mtbl }, /* mapping <strong>for</strong> VERA C code */{ "Cpipe", CpipeModelTable }, /* mapping <strong>for</strong> DWMM model C code *//*** Add map entries <strong>for</strong> any other C code modules included in your custom** libfmi.(so|sl) dynamic library. Refer to vendor documentation** to determine the names needed <strong>for</strong> each product.*/{ 0, 0 }, /* null entry to mark the table end */};3. Compile sim_user.so, as in this example <strong>for</strong> Solaris:/opt/SUNWspro/bin/cc -c -KPIC -o sim_user.o \-I$CDS_INST_DIR/tools.sun4v/inca/include sim_user.c4. Combine the sim_user.o and object files <strong>for</strong> each product included in the libfmi.sofile:/opt/SUNWspro/bin/cc -G -o libfmi.so \sim_user.o \${VERA_HOME}/lib/vera_user.o \${VERA_HOME}/lib/libVERA.a \${VERA_HOME}/lib/nc_vhdl/libVERAbr.a${LMC_HOME}/lib/sun4Solaris.lib/libfmi_ar.a118 <strong>Synopsys</strong>, Inc. October 6, 2003

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!