24.03.2013 Views

ModelSim SE User's Manual - Electrical and Computer Engineering

ModelSim SE User's Manual - Electrical and Computer Engineering

ModelSim SE User's Manual - Electrical and Computer Engineering

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

For DPI imports<br />

64-bit IBM RS/6000 platform<br />

Compiling <strong>and</strong> linking C applications for PLI/VPI/DPI UM-573<br />

When linking the shared objects, be sure to specify -bE: option on the link<br />

comm<strong>and</strong> line. is the name of the file generated by the-isymfile argument to the<br />

vlog (CR-358) comm<strong>and</strong>. Once you have created the , it contains a complete list<br />

of all imported tasks <strong>and</strong> functions expected by <strong>ModelSim</strong>.<br />

DPI special flow for exported tasks <strong>and</strong> functions<br />

Since the RS6000 platform lacks the necessary runtime linking capabilities, you must<br />

perform an additional manual step in order to prepare shared objects containing calls to<br />

exported SystemVerilog tasks or functions shared object file. You need to invoke a special<br />

run of vsim (CR-373). The comm<strong>and</strong> is as follows:<br />

vsim -dpiexportobj <br />

The -dpiexportobj generates the object file that contains "glue" code for<br />

exported tasks <strong>and</strong> functions. You must add that object file to the link line, listed after the<br />

other object files. For example, a link line would be:<br />

ld -o app.so app.o <br />

-bE: -bI://modeltech/rs6000/mti_exports -bM:SRE<br />

-bnoentry -lc<br />

Only versions 4.3 <strong>and</strong> later of AIX support the 64-bit platform. A gcc 64-bit compiler is not<br />

available at this time.<br />

VisualAge cc compiler<br />

cc -c -q64 -I//modeltech/include app.c<br />

ld -o app.s1 app.o -b64 -bE:app.exports \<br />

-bI://modeltech/rs64/mti_exports -bM:SRE -bnoentry -lc<br />

For DPI imports<br />

When linking the shared objects, be sure to specify -bE: option on the link<br />

comm<strong>and</strong> line. is the name of the file generated by the-isymfile argument to the<br />

vlog (CR-358) comm<strong>and</strong>. Once you have created the , it contains a complete list<br />

of all imported tasks <strong>and</strong> functions expected by <strong>ModelSim</strong>.<br />

DPI special flow for exported tasks <strong>and</strong> functions<br />

Since the RS6000 platform lacks the necessary runtime linking capabilities, you must<br />

perform an additional manual step in order to prepare shared objects containing calls to<br />

exported SystemVerilog tasks or functions shared object file. You need to invoke a special<br />

run of vsim (CR-373). The comm<strong>and</strong> is as follows:<br />

vsim -dpiexportobj <br />

The -dpiexportobj generates the object file that contains "glue" code for<br />

exported tasks <strong>and</strong> functions. You must add that object file to the link line, listed after the<br />

other object files. For example, a link line would be:<br />

ld -o app.dll app.o <br />

-bE: -bI://modeltech/rs6000/mti_exports -bM:SRE<br />

-bnoentry -lc<br />

<strong>ModelSim</strong> <strong>SE</strong> User’s <strong>Manual</strong>

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

Saved successfully!

Ooh no, something went wrong!