Matlab(simulink) and Modelsim Cosimulation error problem

38 visualizaciones (últimos 30 días)
Niveen Morsi
Niveen Morsi el 16 de Feb. de 2013
Editada: zaib akhter el 14 de En. de 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...

Respuesta aceptada

Tim McBrayer
Tim McBrayer el 19 de Feb. de 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.

Más respuestas (1)

zaib akhter
zaib akhter el 14 de En. de 2014
Editada: zaib akhter el 14 de En. de 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

Categorías

Más información sobre Dependency Analysis en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by