Matlab(simulink) and Modelsim Cosimulation error problem

38 Ansichten (letzte 30 Tage)
Niveen Morsi
Niveen Morsi am 16 Feb. 2013
Bearbeitet: zaib akhter am 14 Jan. 2014
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...

Akzeptierte Antwort

Tim McBrayer
Tim McBrayer am 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.

Weitere Antworten (1)

zaib akhter
zaib akhter am 14 Jan. 2014
Bearbeitet: zaib akhter am 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

Kategorien

Mehr zu Dependency Analysis finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by