- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Black box in sysgen
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
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?
Thanks
Solved! Go to Solution.
Re: Black box in sysgen
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-23-2012 02:01 AM
Hi.
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.
Vitaly.
Re: Black box in sysgen
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-23-2012 08:46 PM
Thanks Vitaly.
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?
annand
Re: Black box in sysgen
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
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.
Vitaly.
Re: Black box in sysgen
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-24-2012 12:08 AM
Alright.
Thanks for your help.











