Matlab(simulink) and Modelsim Cosimulation error problem
16 次查看(过去 30 天)
显示 更早的评论
I'm trying to link Modelsim to matlab. i've built a block using modelsim that has 6 inputs clock, reset , and it will take the other 4 values from matlab's workspace and its output will be taken to a "scope component" to display the output on it..
i followed the required steps but when i click "start simulation" in simulink window the error message below occur " Error reported by S-function 'shdlcosim' in 'testing_env/HDL Cosimulation/S-Function': Continuous sample time not allowed for input port 0 of cosim block. " i don't know what is this input "port 0 of cosim block" .. i thought its related to the clock as i'm connecting the "clock input port" by a "clock component" from the simulink library and setting the clocks tab to a rising edge clock at the same time..
when i removed the clock component the error message was the same except it becomes for input port 1 as below " Error reported by S-function 'shdlcosim' in 'testing_env/HDL Cosimulation/S-Function': Continuous sample time not allowed for input port 1 of cosim block. "
any idea how can i overcome this plzzz..
I'm using matlab (R2010a), modelsim PE
any help plzzz
thanks...
0 个评论
采纳的回答
Tim McBrayer
2013-2-19
What are the Simulink rates for all the input ports to your HDL Verifier component? They are all required to be discrete rates. Set your Simulink solver to fixed-step discrete, and ensure the Simulink rate of each input port is a positive number.
0 个评论
更多回答(1 个)
zaib akhter
2014-1-14
编辑:zaib akhter
2014-1-14
yes check configurations as fixed-step discrete and also you should use data Conversion block or set the inputs source to HDL verifier so that input data types match,
Example:
taking 8 bit Number as input in Modelsim based block, use data type UINT8,etc for source in Simulink,
while for clock, as it's single bit you can use Boolean
0 个评论
另请参阅
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!