24.11.2012 Views

Discover New Applications For Low-Cost Solutions Discover ... - Xilinx

Discover New Applications For Low-Cost Solutions Discover ... - Xilinx

Discover New Applications For Low-Cost Solutions Discover ... - Xilinx

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

compilation block from the XtremeDSP<br />

development kit library, for example, into<br />

the design, as shown in Figure 2.<br />

A subsystem that contains a compilation<br />

block should also contain a System<br />

Generator block. System<br />

Generator uses the compilation<br />

block to provide information<br />

about the underlying hardware<br />

Figure 2 – System Generator block and an XtremeDSP compilation block<br />

Figure 3 – System Generator dialog box<br />

with inactive product family, device,<br />

speed, and package fields<br />

and how to prepare the model for co-simulation.<br />

Pressing the “generate” button on a<br />

System Generator block that has an accompanying<br />

compilation block automatically<br />

invokes the hardware co-simulation flow.<br />

Some of the information obtained<br />

from a compilation block overrides values<br />

on the System Generator block parameters<br />

dialog box. The parameters that are<br />

overridden appear as grayed-out fields in<br />

the System Generator dialog box and cannot<br />

be modified. <strong>For</strong> example, the System<br />

Generator dialog box is shown for a subsystem<br />

that also contains an XtremeDSP<br />

compilation block. Notice in Figure 3<br />

that the product, device, speed, and package<br />

fields have been grayed-out and are<br />

inactive. These parameters are used by<br />

System Generator when you press the<br />

“generate” button and the model is translated<br />

into hardware.<br />

This<br />

ensures that the<br />

correct device<br />

information is<br />

preserved when<br />

the FPGA configuration<br />

bit file is<br />

generated.<br />

Generating a<br />

model for hardware<br />

co-simulation<br />

includes operations<br />

such as producing<br />

HDL code and<br />

netlists and invoking<br />

the <strong>Xilinx</strong><br />

CORE Generator<br />

tool. After System Generator has<br />

generated a model, it invokes a compilation<br />

block script. Using the output from System<br />

Generator, the compilation block script<br />

invokes the tools necessary to produce a<br />

configuration file for the FPGA. Figure 4<br />

illustrates the XtremeDSP compilation<br />

block script running ngdbuild.<br />

The script creates a new library and adds<br />

a co-simulation block that is parameterized<br />

with information from the original subsystem.<br />

This information includes subsystem<br />

interface information such as port names,<br />

port data rates, port data types, and port<br />

directions. Figure 5 shows the library and<br />

co-simulation block created by the compilation<br />

block script for the cosim_ex model.<br />

Figure 6 shows the co-simulation<br />

block first illustrated in Figure 5 as it is<br />

brought back into the cosim_ex model for<br />

simulation. Note that the ports on the cosimulation<br />

block match the port names<br />

on the input and output gateway blocks.<br />

The waveform in the scope shows equivalent<br />

output results for the AddSub block<br />

and the co-simulation block. The block’s<br />

inputs must be the same signal type, as<br />

shown in Figure 7.<br />

Using Co-Simulation Blocks in Simulink<br />

A co-simulation block is a Simulink block<br />

that interacts with an underlying cosimulation<br />

platform. This block behaves<br />

as a normal Simulink block and can be<br />

simulated transparently with other<br />

blocks. Each co-simulation block has a<br />

port interface that is parameterized by the<br />

compilation block script to match the<br />

ports on the original subsystem.<br />

System Generator co-simulation blocks<br />

can be driven by either <strong>Xilinx</strong> fixed-point<br />

data types or by double-signal data types.<br />

The hardware co-simulation block must<br />

be of the same type of signals (bit width,<br />

binary point position, signed/unsigned)<br />

that were used in the original model. If<br />

there are no inputs to the block, the block<br />

allows you to choose between <strong>Xilinx</strong> fixedpoint<br />

or double-signal output types.<br />

Figure 4 – Compilation block script for the XtremeDSP development kit<br />

Fall 2003 Xcell Journal 9

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!