Zorro
|
hello Andrew,
thanks for the link. I've tried the $table_model function and it worked fine. I loaded a simple table describing the behavior of a resistor
# this is the file resistor.tbl file # using r = 5 Ohms # V(a, b) I(a, b) 1 0.2 2 0.4
// resistor_table.vams module resistor_table (a, b ); inout a, b; electrical a, b; analog begin I(a, b) <+ $table_model(V(a, b), "resistor.tbl", "L"); end endmodule
I would like to know if you or somebody has used the fscanf function (va or vams). It's the form:
$fscanf (multi_channel_descriptor , "format" { , storage_arg } )
The problem I have is that the multi_chanel_descriptor must have a value associated with a currently open file. If a use for example:
integer i; i = $fopen("file.txt"); ... $fscanf (i, "format" { , storage_arg } )
the information in file.txt will be erased because of the $fopen but I need to open this file in read only mode.
Thanks for any suggestion.
|