Matlab(simulink) and Modelsim Cosimulation error problem
12 views (last 30 days)
Show older comments
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 Comments
Accepted Answer
Tim McBrayer
on 19 Feb 2013
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 Comments
More Answers (1)
zaib akhter
on 14 Jan 2014
Edited: zaib akhter
on 14 Jan 2014
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 Comments
See Also
Categories
Find more on Dependency Analysis in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!