Sign In

Don't have a Xilinx account yet?

  • Choose to receive important news and product information
  • Gain access to special content
  • Personalize your web experience on Xilinx.com

Create Account

Username

Password

Forgot your password?
XClose Panel
Xilinx Home
Reply
Regular Visitor
annand
Posts: 13
Registered: ‎01-09-2012
0
Accepted Solution

Black box in sysgen

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

Super Contributor
vlavruhin
Posts: 195
Registered: ‎12-08-2010

Re: Black box in sysgen

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.

Best Regards,
Vitaly.
Regular Visitor
annand
Posts: 13
Registered: ‎01-09-2012
0

Re: Black box in sysgen

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

Super Contributor
vlavruhin
Posts: 195
Registered: ‎12-08-2010
0

Re: Black box in sysgen

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.

Best Regards,
Vitaly.
Regular Visitor
annand
Posts: 13
Registered: ‎01-09-2012
0

Re: Black box in sysgen

Alright.

Thanks for your help.