cancel
Showing results for 
Search instead for 
Did you mean: 
Observer
Observer
5,488 Views
Registered: ‎04-03-2011

System Generator fails to run simulation with a filter in Black Box

Jump to solution

Hi everyone!

 

I started to build a simulation diagram in Simulink, using System Generator's provided blocks. It started out to be a simple design at first, just to try out how System Generator works. Firstly, I designed a lowpass FIR filter with FDATool in Matlab, exported it to a VHDL file. Then I added the black box to the Simulink design, selected the vhd file corresponding to the filter, and set the simulation mode to ISE Simulator. I ran the simulation, but nothing happened (by that I mean that no result has appeared on the scope). So I tried using ModelSim SE 6.2c as an external co-simulator. This time ModelSim has opened, and told me the following: 

 

# The System Generator simulation has terminated.

# The System Generator co-simulation interface will now pause (but not terminate)

# the ModelSim simulation so as to allow inspection of the design state.

# simstats: 

# Simulation halt requested by foreign interface.

# Simulation Breakpoint: Simulation halt requested by foreign interface.

# MACRO ./filter_model_cosim_cw.tcl PAUSED at line 138

 

I suspect there is a problem somewhere around System Generator and the Black Box and/or the filter. I have tried to simulate a different vhd file (with only combinatorial logic in it) and it worked without any problems.

 

I would really appreciate any help or suggestions.

 

Regards,

Ferenc

 

P.S. I am using the 10.1 version of System Generator and Matlab 2007b

 

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Explorer
Explorer
5,946 Views
Registered: ‎12-08-2010

Re: System Generator fails to run simulation with a filter in Black Box

Jump to solution

Oh, I forgot to mention about parameters of 'Gateway In' block (on reset line). Set 'Output type' to 'Boolean' (not 'Signed'). 

Best Regards,
Vitaly.

View solution in original post

7 Replies
Highlighted
Xilinx Employee
Xilinx Employee
5,477 Views
Registered: ‎08-02-2011

Re: System Generator fails to run simulation with a filter in Black Box

Jump to solution

Edit: my mistake

www.xilinx.com
0 Kudos
Highlighted
Observer
Observer
5,473 Views
Registered: ‎04-03-2011

Re: System Generator fails to run simulation with a filter in Black Box

Jump to solution

Thanks. This fact made some things clearer. Tomorrow I will try to simulate the way you have suggested. 

 

Regards,

Ferenc

0 Kudos
Highlighted
Observer
Observer
5,465 Views
Registered: ‎04-03-2011

Re: System Generator fails to run simulation with a filter in Black Box

Jump to solution

Hi again!

 

Now I'm confused a little bit. If ModelSim (and I suppose ISESimulator too) is intended for hardware-software cosimulation, I wonder how can I simulate a Simulink design which contains a black box block? Is there any solution for this?

 

Regards,

Ferenc

0 Kudos
Highlighted
Explorer
Explorer
5,463 Views
Registered: ‎12-08-2010

Re: System Generator fails to run simulation with a filter in Black Box

Jump to solution

Hi!

 

You are on right path. ISE Simulator is intended for software simulation of black box. 

 

You can't see any output of your filter because there is output with value = NaN.

 

To fix it:

1) switch simulation mode of black box to 'ISE Simulator';

2) your filter needs reset impulse, so set following values in 'Step' block:

         Step time = 1

         Initial value = 1

         Final value = 0

         Sample time = 1

3) your filter has 26 taps (coefficients), so in order to see some response you need to set simulation time longer than 26 cycles. Click following menu in simulink: 'Simulation' -> 'Configuration Parameters' and set 'Stop time' = 200.

 

 

Best Regards,
Vitaly.
Highlighted
Observer
Observer
5,458 Views
Registered: ‎04-03-2011

Re: System Generator fails to run simulation with a filter in Black Box

Jump to solution

Hello!

 

I have followed the path you suggested, but without any result. I still can't see any output of the filter, although I've set the initial reset for the Black Box. For simplicity, I left the sample times/sample periods in my design on 1 (and tried to input a 2 Hz pulse wave).

0 Kudos
Highlighted
Explorer
Explorer
5,947 Views
Registered: ‎12-08-2010

Re: System Generator fails to run simulation with a filter in Black Box

Jump to solution

Oh, I forgot to mention about parameters of 'Gateway In' block (on reset line). Set 'Output type' to 'Boolean' (not 'Signed'). 

Best Regards,
Vitaly.

View solution in original post

Highlighted
Observer
Observer
5,450 Views
Registered: ‎04-03-2011

Re: System Generator fails to run simulation with a filter in Black Box

Jump to solution
That's it, now it works fine!
0 Kudos