echo47
Advanced Member level 6
In my ModelSim testbench, I'm trying to drive a 16-bit bus with the results of a tcl expression. For example:
force mybus [expr int(10000*sin(4.0))]
ModelSim complains that -7568 is unacceptable. Well yes, "force" expects a format such as -16'd7568 or 1110001001110000. What do I add to my expression to do the necessary format conversion?
force mybus [expr int(10000*sin(4.0))]
ModelSim complains that -7568 is unacceptable. Well yes, "force" expects a format such as -16'd7568 or 1110001001110000. What do I add to my expression to do the necessary format conversion?