How can I get correct simulation result from generated SystemVerilog model in which DPI-C setparam function has vector parameter

1 view (last 30 days)
I made SystemVerilog module with DPI-C interface and C source files from simulink subsystem. The subsystem has 1x4 vector parameters which specify nominator and denominator coefficients. SystemVerilog with C object,compiled to .so lib, runs on Cadence INSICIVE platform. But the simulation result is not correct. When I set the coefficients to secondary delay-system, the output response of step input is nothing,still low. Setparam call description is below. DPI_XX_setparam_den(obj,'{den3,den2,den1,den0});

Answers (1)

Dave Gutierrez
Dave Gutierrez on 15 Jun 2017
Edited: Dave Gutierrez on 15 Jun 2017
1. The DPI-C component uses unpacked arrays so I will try removing the " ' " infront of " '{den3,den2,den1,den0} ".
2.Where are you calling the set param function?, in the initial block? or reset?. Make sure you are not inadvertently triggering the DPI_*_initialize routine and wiping out your new parameter values.
If this still does not work feel free to attach a model, and I ll take a closer look.

Categories

Find more on Deployment, Integration, and Supported Hardware 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!