02-23-2012 12:01 AM
I'm a beginner in system generator. While learning black-boxes I intended to import an 8-bit counter to sysgen. The counter was written in VHDL. The simulation mode for the black-box is 'ISE simulator'. The configuration m-function was auto-generated. I'm using ISE 13.1. The output count value is connected to a scope as well as a display unit. When I simulate the model nothing is shown in the scope and the display displays "nan". The mdl file is attached.
Can somebody help me out of this?
Solved! Go to Solution.
02-23-2012 02:01 AM
When even one sample of some model's signal has value NaN (not a number), then 'Scope' can't plot this signal.
It is possible that first output sample of counter is undefined, and you get this error.
Try to preinitialize all signals in VHDL file (especially, output).
Also you can route output signal to sink called 'To Workspace' and check output array in Matlab workspace.
02-23-2012 08:46 PM
That indeed was the problem. When I initialized the output (in the VHDL code), the counter was up and running.
Supoose if i'm to use asynchronous reset for initializing the module, is there any provision in the sysgen to take in the reset signal through the gateway in an unsampled manner?
02-23-2012 11:48 PM
Annand, as far as I know, there is no possibility to pass asynchronous signal through 'Gateway In' block. Anyway, you should set non-zero sample time of this block.