Most effective way to put value in nets using VPI (Question) #913
-
So according to the VPI book, the most effective way to drive some multi bit register with value using vpi_put_value is using the format of vpiVectorVal and its corresponding aval and bval fields. The reason for that is the fact that verilog simulators store such registers internally in exactly same type of structure, as a result there is no conversion done on the data passed from vpi_put_value. Now, I want to confirm, if this is really the case with iverilog? is it also storing and operating internally with reg values in a form of a structure with aval and bval fields? i.e., for example, driving vpi_put_value in an integer format would be slower indeed? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
vpiIntVal and vpiVectorVal will have similar performance. vpiIntVal is ever so slightly faster, but I doubt it will be visible above the noise floor. |
Beta Was this translation helpful? Give feedback.
-
Moving to the discussions section. |
Beta Was this translation helpful? Give feedback.
-
may I know why is vpiIntVal should be faster? is it because specifically Icarus Verilog simulator is using that integer datatype in its core or what? |
Beta Was this translation helpful? Give feedback.
-
Icarus is using an aval/bval scheme, but it is trivial to map an integer to this scheme. |
Beta Was this translation helpful? Give feedback.
vpiIntVal and vpiVectorVal will have similar performance. vpiIntVal is ever so slightly faster, but I doubt it will be visible above the noise floor.