How to pass the compilation values from command line to verilog?

Status
Not open for further replies.

u24c02

Advanced Member level 1
Joined
May 8, 2012
Messages
404
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,298
Activity points
4,101
I have some problem.

once, look at this codes.

Runit-
#!/bin/csh -f
ncverilog +access+w+r ₩
-f ff.list ₩
+define+LEVEL=$1

text.txt- (so many define value is defined in here)
....
Blar~Blar~
...
....
`LEVEL

xx.v-
Blar blar $fopen text.txt
$sscanf(filename, "%h", read_value);

Top.v-
...
....
defparam i_read.file_name = "../text.txt";

xx u_inst (
....
.read_value (read_value)
....
);


as far here my code.

The problem is the read_value is different when I commanded in linux command line.

Runit c0
Then readed value is 7 not c0.

What am I missing?
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…