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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Simulator</strong> <strong>Configuration</strong> <strong>Guide</strong>Chapter 1: Using <strong>Synopsys</strong> <strong>Models</strong> with <strong>Simulator</strong>su1.TimingVersion = "pcimaster",u1.DelayRange = "MAX";For both of these examples, the C testbench file must have the same instance name,as follows:int Id_1, status;char *sInstName = "modelId_1";/* Get the instance handle */flex_get_inst_handle(sInstName,&Id_1, &status);2. Create a working directory and run flexm_setup to make a copy of the model’s Cobject file there, as shown in the following example:% $LMC_HOME/bin/flexm_setup -dir workdir model_fxYou must run flexm_setup every time you update your FlexModel installation witha new model version. Table 4 lists the files that flexm_setup copies to your workingdirectory.Table 4: FlexModel C-only Command Mode FilesFile Name Description Locationmodel_pkg.o Model-specific functions <strong>for</strong> UNIX. workdir/src/C/3. Compile the C object files in with the C program that you write to drive commandsinto the model (represented in the following examples as your_C_file.c). Note thatthese examples include creation of a working directory (workdir) and runningflexm_setup, as explained in the previous step. The compile line differs based onyour plat<strong>for</strong>m:a. <strong>for</strong> HP-UX 32-bit systems, you need to link in the -LBSD library as shown inthe following example:% mkdir workdir% flexm_setup -dir workdir model_fx% /bin/c89 -o executable_name \your_C_file.c \workdir/src/C/hp700/model_pkg.o \$LMC_HOME/lib/hp700.lib/flexmodel_pkg.o \-I$LMC_HOME/sim/C/src \-Iworkdir/src/C \-lBSDb. For Solaris 32-bit systems, you need to link in the -lsocket library as shown inthe following example:October 6, 2003 <strong>Synopsys</strong>, Inc. 27

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

Saved successfully!

Ooh no, something went wrong!