How can I get correct simulation result from generated SystemVerilog model in which DPI-C setparam function has vector parameter
1 次查看(过去 30 天)
显示 更早的评论
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});
0 个评论
回答(1 个)
Dave Gutierrez
2017-6-15
编辑:Dave Gutierrez
2017-6-15
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.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Deployment, Integration, and Supported Hardware 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!