Quantcast
Channel: Cadence Functional Verification Forum
Viewing all articles
Browse latest Browse all 1074

How do I pass a string from irun to my DPI-C codes?

$
0
0

I use DPI-C to compile a C code and run with irun. 

Assume I wish to pass a testcase directory to my C and Verilog codes. I managed to do it for Verilog but not my C code. 

#!/bin/ksh

#TC=$2
TC=TEST_1

irun -64bit -access +rwC -g \
-gui \
other flags \
-DMYTC="TEST_1" \
other flags


IN my C code I would use
sprintf(str_filename, "%s/my_testcase.txt", MYTC);


Viewing all articles
Browse latest Browse all 1074

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>