HDL Verifier: Why do I observe a lower order bit resolution in 256-bit fixed-point cosimulation signals between Questasim 2022.4 and MATLAB R2025a?
Show older comments
I am using the HDL Verifier Cosimulation feature with Questasim 2022.4 and MATLAB R2025a to simulate VHDL code generated by HDL Coder from a Simulink model. My Design Under Test (DUT) includes a top-level input signal to the "HDL Cosimulation" block that is a 256-bit fixed-point data type. When running the simulation, I observe that the value of this input signal as seen inside the RTL simulator (Questasim) does not match the value sent from Simulink; specifically, the lower-order bits appear to be incorrect, indicating a loss of resolution or data truncation.
For example, the input value observed in Simulink does not match the value observed in Questasim, as shown below:
0x0001000000000000000000000000010300000000000000000000002007800000 (input value as shown in Simulink)
0x0001000000000000000000000000010300000000000000000000002000000000 (input value as shown in the RTL simulator)
Is this a precision issue or a model issue? Is there a resolution or workaround for this issue?
Accepted Answer
More Answers (0)
Categories
Find more on Simulink Cosimulation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!