FPGAProgrammingHandcodeFrameworkGuide
FPGAProgrammingHandcodeFrameworkGuide
Guide
For FPGA Programming Blockset 2024-A
If possible, always provide the serial number of the hardware, the relevant dSPACE License
ID, or the serial number of the CmContainer in your support request.
Important Notice
This publication contains proprietary information that is protected by copyright. All rights
are reserved. The publication may be printed for personal or internal use provided all the
proprietary markings are retained on all printed copies. In all other cases, the publication
must not be copied, photocopied, reproduced, translated, or reduced to any electronic
medium or machine-readable form, in whole or in part, without the prior written consent
of dSPACE GmbH.
This publication and the contents hereof are subject to change without notice.
Contents
Introduction 7
FPGA Basics...................................................................................... .............. 8
Basics on the System Architecture..................................................... .............. 9
Components of the FPGA Programming Blockset.......................................... 10
Basics on Exchanging Data Between Processor and FPGA.............................. 11
Exchanging Data With the Processor Model................................................... 13
Software Tools for Working With the FPGA Programming Handcode
Framework.................................................................................................... 17
Supported Hardware..................................................................................... 19
Typical Workflow for FPGA Handcoding........................................................ 25
Modeling Aspects............................................................................. ............ 26
3
May 2024 FPGA Programming Handcode Framework Guide
Contents
Troubleshooting 93
Problems and Their Solutions......................................................................... 93
Index 95
4
FPGA Programming Handcode Framework Guide May 2024
About This Guide
Introduction This guide provides information about the FPGA Programming Handcode
Framework implementation flow. You will learn how to implement an FPGA
application for dSPACE FPGA hardware. You will also learn how to access the
FPGA application from a processor application running on a processor board.
Symbol Description
Indicates a hazardous situation that, if not avoided,
V DANGER
will result in death or serious injury.
Indicates a hazardous situation that, if not avoided,
V WARNING could result in death or serious injury.
Indicates a hazardous situation that, if not avoided,
V CAUTION could result in minor or moderate injury.
Indicates a hazard that, if not avoided, could result in
NOTICE
property damage.
Indicates important information that you should take
Note
into account to avoid malfunctions.
Indicates tips that can make your work easier.
Tip
5
May 2024 FPGA Programming Handcode Framework Guide
About This Guide
Symbol Description
Indicates a link that refers to a definition in the
glossary, which you can find at the end of the
document unless stated otherwise.
Follows the document title in a link that refers to
another document.
Naming conventions dSPACE user documentation uses the following naming conventions:
Special Windows folders Windows‑based software products use the following special folders:
Accessing dSPACE Help and After you install and decrypt Windows‑based dSPACE software, the
PDF files documentation for the installed products is available in dSPACE Help and as PDF
files.
dSPACE Help (local) You can open your local installation of dSPACE Help:
§ On its home page via Windows Start Menu
§ On specific content using context-sensitive help via F1
PDF files You can access PDF files via the icon in dSPACE Help. The PDF
opens on the first page.
6
FPGA Programming Handcode Framework Guide May 2024
Introduction
Introduction
Basic feature of the The FPGA Handcode Framework allows you to integrate a custom, code‑based
framework FPGA application in a dSPACE hardware and software environment.
FPGA Basics............................................................................................... 8
General information on FPGAs.
Supported Hardware............................................................................... 19
Overview of the supported hardware.
Modeling Aspects.................................................................................... 26
Describes general modeling aspects that have no particular context.
7
May 2024 FPGA Programming Handcode Framework Guide
Introduction
FPGA Basics
FPGA architecture FPGA stands for Field Programmable Gate Array. It is used in digital technology
to allow modifications in a circuit's functionality without replacing hardware. A
specific circuit is implemented as a specific configuration of the internal logic
cells. The configurable logic blocks (CLBs) are connected with each other via
switch boxes. The external connection is realized by I/O pins.
Reasons for using FPGAs The main advantages of an FPGA are its flexibility and high speed for signal
processing:
§ Flexibility
You can implement any kind of circuit, from a simple counter to an entire
microprocessor.
You can reconfigure your implementation in the development phase without
hardware changes.
§ Speed
The specific implementations are usually concentrated on one functionality
without any overhead.
The bit architecture is often more efficiently than the word architecture with a
fix data width.
Execution can be done in parallel which results in a high throughput.
Control loops (input of data, result calculation, output of data) can usually
be performed at higher overall sample rates on an FPGA than on non-FPGA
platforms.
Fields of application All of the above-mentioned features of an FPGA are very useful for function
prototyping, which can be performed with dSPACE hardware and software.
8
FPGA Programming Handcode Framework Guide May 2024
Basics on the System Architecture
FPGAs are used, if you have a task that cannot be solved by standard
implementations. They are used for tasks that require high performance, for
example, for complex signal processing, or if you want to move some of your
model's functionality to a separate application.
Introduction The system architecture determines the signals your FPGA applications can read,
process, and update. It shows the data flow to download applications and to
analyze data.
Components of a dSPACE The following illustration shows you the components and the signal connections
system and their connections of a dSPACE system, such as a MicroAutoBox III.
dSPACE system
Real-time I/O
Host PC processor channels
External
device
FPGA I/O
channels
9
May 2024 FPGA Programming Handcode Framework Guide
Introduction
§ I/O channels
To access the external I/O signals of the external device, the signals must be
converted so that they meet the requirements of the connected components.
This is done, for example, by filters, signal amplifiers or analog-to-digital
converters.
§ External device
Device that can be connected to the dSPACE system, such as an ECU.
Introduction The FPGA Programming Blockset is a Simulink blockset for integrating an FPGA
application into a dSPACE system. It provides Simulink blocks for implementing
the interface between the FPGA and the real-time processor. Furthermore, script
functions let you execute functions via command line or M file.
PROC_XDATA_READ_BL
Processor
model
PROC_XDATA_WRITE_BL
FPGA logic
I/O channel
10
FPGA Programming Handcode Framework Guide May 2024
Basics on Exchanging Data Between Processor and FPGA
Available script functions The FPGA Programming Blockset comes with script functions for executing
functions via command line or M file. You can use them, for example, to
initialize the framework. For more information on the script functions, refer to
Script Functions Supporting the FPGA Programming Handcode Framework (FPGA
Programming Software Script Interface Reference ).
Introduction Only the processor application initiates a data exchange between the real-time
processor and the FPGA. To be able to exchange data, the processor interface
provides different data storages.
Provided data storage You can choose the data storage that you want to use for the data exchange
with the following access types:
§ Register
Registers are implemented as flip-flops to exchange scalar values.
§ Register group
Register groups are implemented as flip-flops to exchange a data package
with synchronized elements.
§ Buffer
Buffers are implemented in the FPGA RAM to exchange data packages with a
buffer size of up to 32,768 elements.
For board-specific details on, such as data width or data format, refer to
Exchanging Data With the Processor Model on page 13.
Details on the access types Register access Register access lets you access a scalar value in the register.
The data is identified by the specified channel number. The values are
transmitted element by element.
Register group access You can group registers to a register group via a
common Register Group ID. All the values that belong to the same Register
Group ID are synchronously updated in the FPGA subsystem.
11
May 2024 FPGA Programming Handcode Framework Guide
Introduction
For read access, the registers of a register group are read from the board-specific
bus sequentially and then provided to the FPGA application simultaneously. For
write access, the registers of a register group are sampled simultaneously in the
FPGA application. These values form a consistent data group that is written to
the board-specific bus.
Buffer access Buffer access lets you access a vector value in the data buffer.
One specific value of the data is identified by the specified channel number and
the position within the buffer.
Data exchange is implemented via a FIFO buffer that works as a swinging buffer.
This means that there are two separate buffers for reading and writing, and
one buffer that switches between reading and writing. Only the pointer has to
be changed to switch the buffer so that no buffer has to be copied from one
position to another.
Free buffer
Processing the data exchange Only the processor application can initiate data exchange between the real-time
processor and the FPGA. The following illustration shows you the main steps that
a processor task performs.
Processor task
From external device To external device
Read Process Update
inputs model outputs
FPGA
The FPGA executes its operations in parallel because the FPGA application is a
logic implementation: i.e., the execution time of an FPGA is much faster than the
execution time of the real-time processor.
Several processor tasks with different task periods can request read/write access
to the FPGA at different points in time. These read/write requests are executed
by the FPGA in parallel. The following illustration shows you the read/write
requests of a real-time application with two processor tasks.
12
FPGA Programming Handcode Framework Guide May 2024
Exchanging Data With the Processor Model
Read Read Read Compute Write Read Read Read Compute Write Read
Processor FPGA FPGA FPGA model of
Write
FPGA FPGA FPGA FPGA model of
Write
FPGA FPGA
Idle Idle
task 1 FPGA FPGA
Reg1 Reg3 Reg7 task 1 Reg9 Reg1 Reg3 Reg7 task 1 Reg9 Reg1
Reg4 Reg4
t Task 1 t Task 1
Processor Read Read Compute Write Read Read Compute Write Read Read Compute Write
FPGA FPGA model of FPGA Idle FPGA FPGA model of FPGA Idle FPGA FPGA model of FPGA Idle
task 2 Reg2 Reg4 task 2 Reg8 Reg2 Reg4 task 2 Reg8 Reg2 Reg4 task 2 Reg8
Introduction Modeling the data exchange between the FPGA application and the processor
application depends on the hardware used.
Basics on the processor The data is exchanged via the communication line between MicroLabBox's
communication using base board and the I/O FPGA module mounted on the DS1302 board.
MicroLabBox/MicroLabBox II For MicroLabBox, communication runs via the local bus. For MicroLabBox II,
communication runs via IOCNET.
The 32‑bit parallel data bus enables a complete 32‑bit word to be transferred in
a single operation. For transferring a 64‑bit word, two operations are internally
required.
The data is transmitted via the local bus to specific data storage areas. The
implementation details of these storage areas are defined in the framework.
13
May 2024 FPGA Programming Handcode Framework Guide
Introduction
Basics on the processor The data is exchanged via the communication line between the real-time
communication using processor of the MicroAutoBox II/III and the FPGA module mounted on the
MicroAutoBox II/III DS1514 I/O board. The communication runs via the intermodule bus of the
MicroAutoBox II/IIII.
The 16‑bit parallel data bus enables a complete 16‑bit word to be transferred in
a single operation.
The data is transmitted via the intermodule bus to specific data storage areas.
The implementation details of these storage areas are defined in the framework.
Basics on the processor The internal communication between the real-time processor and a SCALEXIO
communication using a FPGA base board runs via IOCNET (I/O carrier network). IOCNET lets you connect
SCALEXIO system more than 100 I/O nodes and even place the parts of your SCALEXIO system
14
FPGA Programming Handcode Framework Guide May 2024
Exchanging Data With the Processor Model
long distances apart. IOCNET is dSPACE's proprietary protocol that gives you
real-time performance plus time and angular clocks.
The data is transmitted via IOCNET to specific data storage areas. The
implementation details of these storage areas are defined in the framework.
Access types You can select different access types for data exchange.
Register access type If you have to exchange certain data and high
performance is not required, it is recommended to use the register access type.
Note
Buffer access type If you have to exchange a lot of data with high
performance, it is recommended to use the buffer access type. However, to
access a specific data item within the buffer, you have to address it explicitly.
15
May 2024 FPGA Programming Handcode Framework Guide
Introduction
Read/write access in the FPGA The selected FPGA framework provides specific read and write functions that
application exchange data via the board-specific bus to the processor model. For instructions
on implementing these functions, refer to Specifying the FPGA I/O Interface on
page 30. For information on the available read and write functions, refer to
FPGA Programming Handcode Framework - FPGA Interface Reference .
The values in the FPGA application are processed as fixed-point values. The
data exchange with the processor model requires data type conversion between
fixed-point and floating-point values. Data conversion is automatic in these I/O
functions. The fixed-point format to be used can be set as an I/O function
parameter.
Read/write access in the If you use a MicroAutoBox II or a MicroLabBox you can implement the processor
processor model interface with interface blocks of the FPGA Programming Blockset or with data
exchange functions of board-specific Real-Time Libraries (RTLib).
16
FPGA Programming Handcode Framework Guide May 2024
Software Tools for Working With the FPGA Programming Handcode Framework
Introduction To work with the FPGA Programming Handcode Framework, several software
tools are necessary.
Tools from MathWorks® MATLAB®, Simulink® and Simulink® CoderTM are used for modeling the
processor application, which can be simulated in Simulink and executed on the
real-time hardware.
Tools from AMD AMD provides several tools for designing applications for AMD FPGAs. The
Vivado® Design Suite covers all the aspects of designing FPGAs. Working with
the FPGA Programming Blockset requires the following products:
Vivado Design Suite The Vivado Design Suite provides a logic design
environment for AMD FPGAs. It contains tools and wizards, for example, for I/O
assignment, power analysis, timing-driven design closure, and HDL simulation.
With the Vivado software, you can build the FPGA application according to the
handcoded FPGA design.
Ordering AMD software Currently, you cannot order the AMD software
from dSPACE. Install the AMD software before or after installing dSPACE
software and follow the installation instructions from the AMD manuals.
Supported software versions The following table shows you the supported products and their software
versions for the current version of the FPGA Programming Blockset.
For software versions that are compatible with older versions of the FPGA
Programming Blockset, refer to https://www.dspace.com/faq?295.
17
May 2024 FPGA Programming Handcode Framework Guide
Introduction
Required blocksets for the The MicroLabBox II, MicroAutoBox III, and SCALEXIO require the dSPACE Model
processor model Interface Package for Simulink to implement the interface between the real-
time processor and the FPGA. The Model Interface Package for Simulink is the
blockset for specifying all interfaces of processor models (behavior models) used
in ConfigurationDesk.
ControlDesk ControlDesk is the dSPACE software tool for experimenting with a dSPACE
system. It can be used to register the connected hardware, to manage the
simulation platform, to download the real-time application (processor and FPGA
application), and to control the experiment. The great variety of instruments
allows you to access and visualize variables of the processor application.
18
FPGA Programming Handcode Framework Guide May 2024
Supported Hardware
Supported Hardware
Introduction FPGA frameworks are available for the following dSPACE boards.
MicroLabBox Internally, MicroLabBox consists of the two boards DS1202 and DS1302. The
DS1302 board provides the FPGA capabilities.
MicroLabBox's I/O FPGA module provides channels for analog input and
output, digital input and output, and bus communication. The DS1302 board
of MicroLabBox provides an FPGA unit with an AMD FPGA that can be
programmed by using the FPGA Programming Software.
Note
dSPACE also provides RTI blocksets and real-time libraries (RTLib) for
MicroLabBox. To use I/O functions from the FPGA Programming Blockset
and RTI blocksets/RtLib for MicroLabBox in the same application, you have
to use the flexible I/O framework for MicroLabBox. Refer to Features of the
MicroLabBox Flexible I/O Framework on page 81.
The following table shows the main features of MicroLabBox's I/O FPGA:
Feature Description
Programmable FPGA § AMD® Kintex®-7 XC7K325T
§ 326,080 logic cells
§ 50,950 slices
§ 4,000 kbit distributed RAM (max.)
§ 840 DSP slices
§ 16,020 kbit block RAM
§ 100 MHz hardware clock frequency
Analog input § ADC (Class 1): 24 parallel A/D converters with 16-bit resolution and a sample rate of
1 MS/s.
§ ADC (Class 2): 8 parallel A/D converters with 16-bit resolution and a sample rate of
10 MS/s.
Analog output DAC (Class 1): 16 parallel D/A converters with 16-bit resolution.
Digital I/O § Digital InOut (Class 1): 48 digital bidirectional channels, single‑ended.
§ Digital InOut (Class 2): 8 digital bidirectional channels, differential.
Resolver interface 2 resolver interfaces that support resolvers with an excited single coil.
Serial interface 2 UART (RS232) and 2 UART (RS422/485) interfaces.
The UART (RS422/485) function supports full‑duplex mode and half‑duplex mode.
Feedback elements § Status In: State of the initialization sequence that is started after programming the FPGA.
§ LED Out: 4 customizable LEDs.
§ Proc App Status: Execution state of the loaded executable application.
19
May 2024 FPGA Programming Handcode Framework Guide
Introduction
MicroLabBox II Internally, the MicroLabBox II consists of the two boards DS1203 Processor Board
and DS1303 Multi-I/O Board. The DS1303 Multi-I/O Board provides the FPGA
capabilities.
The following table shows the main features of the MicroLabBox II:
Feature Description
Programmable § AMD® Kintex® UltraScale+TM XCKU15P-2FFVE1517E
FPGA § 1,143,450 system logic cells
§ 1,045,440 FlipFlops
§ 1,968 DSP slices
§ 9.8 Mbit maximum distributed RAM
§ 34.6 Mbit block RAM
§ 36.0 Mbit Ultra RAM
§ 125 MHz hardware clock frequency
Analog input § Analog In 23: Input channel to measure differential analog voltage signals in the range ±10 V
with max. 2 MS/s.
Number of channels: 24
§ Analog In 24: Input channel to measure differential analog voltage signals in the range ±1 V
or ±10 V with max. 5 MS/s.
Number of channels: 6
§ Analog In 25: Input channel to measure differential analog voltage signals in the range ±1 V
or ±10 V with max. 5 MS/s. A load can be activated.
Number of channels: 2
Analog output § Analog Out 19: Output channel to generate ground-based analog voltage signals in the range
±10 V with max. 2 MS/s.
Number of channels: 14
§ Analog Out 20: Output channel to generate analog signals. Each channel can be configured
to generate a ground-based signal (±10 V) or a transformer-coupled signal (±20 V AC) with
max. 5 MS/s.
Number of channels: 2
Digital I/O § Digital In/Out 14: Bidirectional channels to measure or generate ground-based digital signals.
Number of channels: 48
§ Digital In/Out 15: Bidirectional channels to measure or generate differential digital signals.
Number of channels: 12
Feedback § Status In: State of the initialization sequence that is started after programming the FPGA.
elements § LED Out: 1 customizable LED.
§ Proc App Status: Execution state of the loaded executable application.
MicroAutoBox II/III The MicroAutoBox II/III consists of a board with the real-time processor and at
least one I/O board. An FPGA base board provides the FPGA and the interfaces
for adding different I/O modules.
20
FPGA Programming Handcode Framework Guide May 2024
Supported Hardware
DS1514 FPGA Base Board The DS1514 FPGA Base Board provides an FPGA.
The following table shows the main features of the DS1514 FPGA Base Board.
Feature Description
Programmable FPGA § AMD Kintex®-7 XC7K325T
§ 326,080 logic cells
§ 50,950 slices
§ 4,000 kbit distributed RAM (max.)
§ 840 DSP slices
§ 80 MHz hardware clock frequency.
I/O interfaces I/O interfaces are provided by I/O modules that are installed to the FPGA base board. Refer to
I/O modules available for MicroAutoBox II/III on page 21.
Feedback elements § Status In: State of the initialization sequence that is started after programming the FPGA.
§ Temperature: Sensor to measure the FPGA's die temperature.
§ LED Out: 1 FPGA Status LED.
For further information on the hardware, refer to the following data sheets:
§ MicroAutoBox II 1401/1511/1514: General Data (MicroAutoBox II Hardware
Reference )
§ MicroAutoBox II 1401/1513/1514: General Data (MicroAutoBox II Hardware
Reference )
§ MicroAutoBox III: DS1514 FPGA Base Board Data Sheet (MicroAutoBox III
Hardware Installation and Configuration )
I/O modules available for I/O modules provide the I/O interface for the DS1514 FPGA Base Board. The
MicroAutoBox II/III following table shows the main features of the supported I/O modules:
21
May 2024 FPGA Programming Handcode Framework Guide
Introduction
For further information on the hardware, refer to the following data sheets.
§ MicroAutoBox II:
§ Data Sheet DS1552 Multi-I/O Module (MicroAutoBox II Hardware
Reference )
§ Data Sheet DS1554 Engine Control I/O Module (MicroAutoBox II Hardware
Reference )
§ MicroAutoBox III:
§ DS1552 Multi-I/O Module Data Sheet (MicroAutoBox III Hardware
Installation and Configuration )
§ DS1554 Engine Control I/O Module Data Sheet (MicroAutoBox III Hardware
Installation and Configuration )
SCALEXIO system A SCALEXIO system consists of SCALEXIO processing hardware and a selection
of I/O boards. The SCALEXIO processing hardware, such as a SCALEXIO Real-
Time PC, provides the computation power of the system.
I/O boards are available for the various requirements, for example, for accessing
analog input and output signals, digital input and output signals, and bus
communication.
With the SCALEXIO FPGA base boards, you can integrate an FPGA application
into a SCALEXIO system. The board provides an FPGA that you can program
using the FPGA Programming Blockset.
22
FPGA Programming Handcode Framework Guide May 2024
Supported Hardware
The following table shows the main features of the supported SCALEXIO FPGA
base boards.
I/O modules available for I/O modules provide the I/O interface for the SCALEXIO FPGA base boards
SCALEXIO FPGA base board DS2655, DS6601, and DS6602. The following table shows the main features
of the supported I/O modules:
23
May 2024 FPGA Programming Handcode Framework Guide
Introduction
24
FPGA Programming Handcode Framework Guide May 2024
Typical Workflow for FPGA Handcoding
Introduction There is a typical workflow you must follow, if you want to integrate a
code‑based FPGA application in a dSPACE hardware and software environment.
Workflow steps The workflow for the FPGA Programming Handcode Framework consists of the
following steps, which are explained in detail later on.
1. Copy a dSPACE FPGA framework from the dSPACE installation folder to a
custom folder.
For further information, refer to Preparing Your Environment on page 30.
2. Handcode the functionality of the FPGA application by changing the
contents of a customizable VHDL or Verilog file included in the dSPACE
FPGA framework.
Note
25
May 2024 FPGA Programming Handcode Framework Guide
Introduction
Modeling Aspects
General notes Code generation and the build process are managed by the FPGA Programming
Software. The software uses the AMD Vitis Model Composer to generate
VHDL code and starts the Vivado implementation process, including synthesis,
mapping, routing, and generating the bitstream file.
Notes on the build process The effort required to successfully place and
route an FPGA handcode increases with the FPGA handcode content. Starting
with an FPGA utilization of approx. 70%, the probability that an FPGA model
cannot be placed and routed increases exponentially. High FPGA utilization
can lead to unpredictable build aborts. Even the smallest change can lead to
26
FPGA Programming Handcode Framework Guide May 2024
Modeling Aspects
Synchronizing FPGA data If different data paths have different length, the data is valid at different points
in time and the outputs are asynchronous. This might cause an unexpected
behavior of your application. Make sure that the data paths are synchronized.
Unsupported features of the The FPGA Programming Handcode Framework does not support all features
FPGA Handcode Framework that are provided by the FPGA Interface sublibrary of the FPGA Programming
Blockset. For more information, refer to Unsupported Features of the FPGA
Programming Handcode Framework (FPGA Programming Handcode Framework -
FPGA Interface Reference ).
27
May 2024 FPGA Programming Handcode Framework Guide
Introduction
28
FPGA Programming Handcode Framework Guide May 2024
Detailed Instructions on the Handcode Workflow
Using the FPGA Model INI File for the Processor Interface........................ 40
Using the FPGA Model INI file to implement the processor interface of
the processor application for the MicroAutoBox II or the MicroLabBox.
29
May 2024 FPGA Programming Handcode Framework Guide
Detailed Instructions on the Handcode Workflow
Introduction The FPGA framework defines the available I/O functions and all their parameters
required to configure and use a specific FPGA board.
Specifying the FPGA Before you start integrating your FPGA application into the dSPACE hardware,
framework you must specify the FPGA framework that corresponds to your FPGA board.
This provides information on all the available I/O functions and their parameters,
and further data required to use a specific FPGA board.
Next step Now, you must specify the FPGA functionality, refer to Specifying the FPGA I/O
Interface on page 30.
Introduction The specified FPGA framework contains a handcode FPGA framework INI file
that you must customize according to the I/O functions used.
Handcode FPGA framework The handcode FPGA framework INI file is a MATLAB M file.
INI file It is included in the selected FPGA framework folder and
is called hc_fpga_framework_ini_<Framework_Name>.m, for example,
hc_fpga_framework_ini_FPGA1403Tp1_DS1554_XC7K325T.m. The file
contains configuration parameters for the first and the last channel of all the
available I/O functions of the selected FPGA framework. Each I/O function used
in your FPGA application must be specified according to the example code in
the file. I/O functions that are not used should be commented out to minimize
the required FPGA resources, by entering %. The file is pre-initialized for the
handcoding example application described in Specifying the FPGA Functionality
on page 33. You have to configure the file within the section enclosed by
BEGIN USER CODE and END USER CODE.
30
FPGA Programming Handcode Framework Guide May 2024
Specifying the FPGA I/O Interface
A detailed description of all the available I/O functions including their parameters
and the interface can be found in FPGA Programming Handcode Framework -
FPGA Interface Reference .
Additional instructions when When you use a SCALEXIO system, you have to specify the slot positions
using a SCALEXIO system of the mounted I/O modules (up to five modules). If you use inter-FPGA
communication, you must also specify the I/O module slots that provide the
inter-FPGA communication interface.
% ====== <FPGA Base Board> IO Modul Selection =======
...
% IO Frameworks to choose from:
% - IO_fpga_framework_ini_DS2655M1
% - IO_fpga_framework_ini_DS2655M2
% - IO_fpga_framework_ini_DS2655_InterFPGA
% - IO_fpga_framework_ini_DS6651
ioFrmIni = { ...
'IO_fpga_framework_ini_DS2655M1', ... % IO Module in slot 1
'', ... % IO Module in slot 2
'', ... % IO Module in slot 3
'', ... % IO Module in slot 4
'', ... % IO Module in slot 5
};
...
For each I/O module and inter-FPGA interface used, you have to copy the entire
I/O function section and modify it, for example, you have to adapt the I/O
module number ioModuleNr.
%>>>>>>>> DS2655M1 IO Module >>>>>>>>
% ====== IO-Module Number: =======
ioModuleNr = 1; % IO-Module Number (used Slot of IO Module)
%----------------------------------
% ------ Digital Out -------
%----------------------------------
hcfw.IOProperties.Out.Fct(1 + ioOutOffset(ioModuleNr)).Parameter(7).Init
= {'1'}; % High supply (0 for 5V, 1 for 3.3V)
...
The following example shows that 128 channels of the I/O function Register
Out are available, but only the first and second channels are used. The entries
for the second channel have been added by copying one of the existing function
configurations and adapting them. The channel number has been changed and
the parameter values have been adapted. The entries for the last channel have
been commented out. For an I/O function that you want to use in your custom
code, you must set its HcUsed parameter to '1'.
31
May 2024 FPGA Programming Handcode Framework Guide
Detailed Instructions on the Handcode Workflow
Note
1 %----------------------------------
2 % ------ Register Out 1 -------
3 %----------------------------------
4 hcfw.PHSProperties.Out.Fct(1).HcUsed = {'1'}; % IO function is used in custom code
5 hcfw.PHSProperties.Out.Fct(1).HcCustomName = {'Inverted Data'}; % Custom name of the IO function
6 hcfw.PHSProperties.Out.Fct(1).Parameter(1).Init = {'0'}; % Binary Point position (0..32)
7 hcfw.PHSProperties.Out.Fct(1).Parameter(2).Init = {'signed'}; % Data Format (signed/unsigned/floating-point)
8 hcfw.PHSProperties.Out.Fct(1).Parameter(3).Init = {'0'}; % Register Group ID (0..63), 0 for ungrouped
9
10 %----------------------------------
11 % ------ Register Out 2 -------
12 %----------------------------------
13 hcfw.PHSProperties.Out.Fct(2).HcUsed = {'1'}; % IO function is used in custom code
14 hcfw.PHSProperties.Out.Fct(2).HcCustomName = {'Diagnostic Flag'}; % Custom name of the IO function
15 hcfw.PHSProperties.Out.Fct(2).Parameter(1).Init = {'0'}; % Binary Point position (0..32)
16 hcfw.PHSProperties.Out.Fct(2).Parameter(2).Init = {'signed'}; % Data Format (signed/unsigned/floating-point)
17 hcfw.PHSProperties.Out.Fct(2).Parameter(3).Init = {'0'}; % Register Group ID (0..63), 0 for ungrouped
Next step Now you must configure the FPGA code with the specified I/O interface, refer to
Configuring the FPGA Code With the Specified I/O Interface on page 32.
Introduction Before you can build the FPGA application, you must configure the FPGA code
with the I/O interface.
Configuring the FPGA code After you have specified the I/O interface in the handcode FPGA framework INI
using the script interface file (refer to Specifying the FPGA I/O Interface on page 30) and saved it, you can
use the script interface to initialize the framework. This means, that the FPGA
code is automatically configured with the specified I/O interface.
32
FPGA Programming Handcode Framework Guide May 2024
Specifying the FPGA Functionality
The script interface generates a unique ID for this application and modifies the
cm.v file accordingly.
Additional instructions when If you use DS2655M2 Digital I/O Modules and/or DS6651 Multi-I/O Modules, you
using DS2655M2 or DS6651 have to add files from the RTL folder of your handcode project folder to the
I/O modules Vivado handcode project.
§ Open AMD Vivado and add the following module-specific HDL files to your
handcode project via File - Add Sources:
input_spikefilter.vhd
IO_custom_drv_ctrl_CONST_[n].vhd
IO_custom_drv_ctrl_[n].vhd
IO_custom_drv_ctrl_[n].xdc
n=1…5
Next step Now, you can specify the FPGA functionality, refer to Specifying the FPGA
Functionality on page 33.
Introduction To implement FPGA functionality, you must customize a specific file from the
AMD Vivado project.
33
May 2024 FPGA Programming Handcode Framework Guide
Detailed Instructions on the Handcode Workflow
Customizing the architecture There are different projects available for coding with VHDL and Verilog.
section
Note
34
FPGA Programming Handcode Framework Guide May 2024
Specifying the FPGA Functionality
At the end of the file you will find the architecture section that has to be
customized to implement the FPGA functionality.
Using Verilog code Open the following AMD Vivado project with the Vivado
Project Manager: <FPGA_Framework>\HC_Vivado\HC_Vivado_verilog.xpr
35
May 2024 FPGA Programming Handcode Framework Guide
Detailed Instructions on the Handcode Workflow
At the end of the file you will find the architecture section that has to be
customized to implement the FPGA functionality.
To connect your FPGA application to the I/O of the FPGA board and to the
processor application, you have to use the I/O functions defined in the specified
FPGA framework. These I/O functions provide several channels for Register In,
Buffer Out, Digital Out, Interrupt, etc. The I/O functions and their parameters,
and the number of channels, depend on the specified FPGA framework.
The signals of the cm entity form the interface to all the available I/O functions.
A detailed description of all the available I/O functions including their parameters
and the interface can be found in FPGA Programming Handcode Framework -
FPGA Interface Reference .
36
FPGA Programming Handcode Framework Guide May 2024
How to Build the FPGA Application
You can use this information to customize the architecture section of the cm file
to implement your FPGA functionality.
Next step You can build the FPGA application, refer to How to Build the FPGA Application
on page 37.
Objective The AMD Vivado project is used to start the build process of the FPGA
application.
Precondition The built FPGA application can be integrated into the dSPACE environment
only, if you have configured the I/O interface correctly. The required steps are
described in Detailed Instructions on the Handcode Workflow on page 29.
Method to use The method to build the FPGA application depends on the used dSPACE
hardware.
§ DS1303 Multi-I/O Board (MicroLabBox II):
You use a Tcl script. Refer to Method 1.
§ All dSPACE FPGA boards and MicroLabBox:
You use the GUI of Vivado. Refer to Method 2.
37
May 2024 FPGA Programming Handcode Framework Guide
Detailed Instructions on the Handcode Workflow
Method 2 To build the FPGA application using the AMD Vivado GUI
1 In the Flow Navigator, click Generate Bitstream.
2 If the No Implementation Results Available dialog appears, click Yes.
Result If no error messages are displayed, the build process has been successfully
finished and the FPGA bitstream has been created.
Note
If you use a DS6602 FPGA Base Board, the build process issues a critical
warning about a specific timing requirement.
For more information, refer to Problems and Their Solutions on page 93.
Due to the complexity of FPGA applications and their dependency on the used
FPGA hardware, the AMD Design Tools cannot ensure that all possible design
problems are detected during the analysis and simulation of the FPGA code.
To solve the problem, you have to modify the FPGA code and make sure that
you consider generally accepted FPGA design rules to ensure a stable and reliable
FPGA application (refer to Audience profile on page 5). For more information,
contact dSPACE Support.
Next step Now you must generate a corresponding FPGA model INI file/FPGAC file, refer
to Generating an FPGA Model INI File/FPGAC File on page 39. This includes
generating the files required for an FPGA custom function to be loaded in
ConfigurationDesk for systems that does not use RTI/RTlib to implement the
FPGA application.
38
FPGA Programming Handcode Framework Guide May 2024
Generating an FPGA Model INI File/FPGAC File
Introduction In this step, you will generate a file that will contain the generated bitstream and
relevant information on implementing the processor communication.
Depending on the platform, the generated file is an FPGA model INI file or an
FPGAC file.
Generating the FPGA model After you have built the bitstream, you can use the script interface to create
INI file/FPGAC file using the a new FPGA model INI file/FPGAC file that is application-specific because it
script interface includes a bitstream.
The generated file can be found in the current MATLAB working directory. It
is called <HcApplIDString>_<ApplicationID> where <HcApplIDString> is
the application name specified in the handcode FPGA framework INI file and
<ApplicationID> is the unique ID generated by the HCFPGAFrameworkInit
function of the script interface, refer to Configuring the FPGA Code With the
Specified I/O Interface on page 32.
39
May 2024 FPGA Programming Handcode Framework Guide
Detailed Instructions on the Handcode Workflow
Next step If you use a MicroAutoBox II or a MicroLabBox, you must implement the
processor interface based on the generated FPGA model INI file, refer to Using
the FPGA Model INI File for the Processor Interface on page 40.
If you use SCALEXIO, MicroAutoBox III, or MicroLabBox II, you can add the
FPGA application to ConfigurationDesk as an FPGA custom function. Refer to
How to Import FPGA Custom Function Block Types Provided by an FPGAC File
(ConfigurationDesk I/O Function Implementation Guide ).
Using the FPGA Model INI File for the Processor Interface
Introduction Using the FPGA Model INI file to implement the processor interface of the
processor application for the MicroAutoBox II or the MicroLabBox.
Generating RTI interface To implement the communication between the FPGA board and the
blocks processor board, you can implement a processor model containing RTI blocks
corresponding to the implemented FPGA I/O interface. These blocks are provided
by the Processor Interface of the FPGA Programming Blockset.
All this information is contained in the generated FPGA model INI file, which
has to be imported to the processor model. For further information, refer to
Modeling the Processor Communication on page 44.
Including the bitstream to the The generated FPGA model INI file includes the bitstream to implement the
real-time application functionality of the FPGA application. If you use the Processor Interface of the
FPGA Programming Blockset to build the processor application, the bitstream
is automatically included to the real-time application. Refer to How to Build a
Processor Application on page 48.
40
FPGA Programming Handcode Framework Guide May 2024
Using the FPGA Model INI File for the Processor Interface
If you use RTLib to model the processor application, you must copy the bitstream
out of the FPGA model INI file and include it to the real-time application. Refer to
How to Extract Bitstream Files from FPGA Model INI Files on page 56.
41
May 2024 FPGA Programming Handcode Framework Guide
Detailed Instructions on the Handcode Workflow
42
FPGA Programming Handcode Framework Guide May 2024
Using RTI to Implement the Processor Interface
Introduction You can use the Processor Interface sublibrary of the FPGA Programming
Blockset to implement the processor model and the handcoded FPGA application
to the MicroAutoBox II or the MicroLabBox.
43
May 2024 FPGA Programming Handcode Framework Guide
Using RTI to Implement the Processor Interface
Objective The RTI interface blocks in the processor model for exchanging data with the
FPGA application can be generated with all the relevant settings.
Basics Usually, you implement the FPGA application first, and then the interface to the
processor model. This means that all information required for the data exchange
is already specified in the FPGA model INI file. It therefore makes sense to
generate the corresponding preconfigured interface blocks automatically instead
of adding them to the processor model and configuring them manually.
Note
44
FPGA Programming Handcode Framework Guide May 2024
Modeling the Processor Communication
Result You have created a new model containing RTI blocks from the Processor
Interface library which are required to exchange data with the FPGA
application. The blocks are configured with all the relevant settings of their
counterparts in the FPGA application. Your FPGA application will contain
PROC_XDATA_WRITE_BL blocks for input I/O functions, such as Register In or
Buffer In, and PROC_XDATA_READ_BL blocks for output I/O functions, such
as Register Out or Buffer Out.
I/O functions that are only relevant on the FPGA board, for example, ADC or DAC
functions, are not given counterparts in the processor model interface.
You can now copy the generated blocks to your processor model and connect
them to the other Simulink blocks. You must not reconfigure these blocks
manually. The settings for data type conversion (floating-point to fixed-point
and vice versa) are implicit and can only be modified in the appropriate FPGA I/O
functions.
Note
If you use the Adapt command, the processor model must contain only
processor interface block for one FPGA application. Otherwise the FPGA
board number will be replaced in any processor interface block used
anywhere in the model.
45
May 2024 FPGA Programming Handcode Framework Guide
Using RTI to Implement the Processor Interface
Objective You can use an output signal from the FPGA application to trigger an
asynchronous task in the processor model.
Basics You need an interrupt I/O function in the FPGA application and its counterpart in
the processor model to trigger a function-call subsystem by a value coming from
the FPGA.
Result When the Interrupt I/O function in the FPGA application requests an interrupt,
the function-call subsystem is triggered that is connected to the PROC_INT_BL
block in the processor model.
46
FPGA Programming Handcode Framework Guide May 2024
Working with the Processor Model
Introduction Before you execute the processor application on the real-time hardware, you
should test its behavior in a simulated environment.
Simulating in different model You can simulate the processor model in these model modes:
modes § FPGA-Build / Offline simulation
§ Processor-Build
In both model modes, the processor model only contains the blocks from the
processor model. The simulation can therefore be used only to test the behavior
of the processor model, and there is no simulated data exchange with the FPGA
applications.
Note
47
May 2024 FPGA Programming Handcode Framework Guide
Using RTI to Implement the Processor Interface
Starting the simulation You can start the simulation in the model window of the processor model by
clicking the Start simulation toolbar button, choosing Simulation - Start from
the menu bar or using the Ctrl+T shortcut.
The simulation is executed for the specified simulation time or until you stop it.
Objective Before you can execute the processor model on the real-time hardware, you
must build an application from its generated code.
Basics The code generation and the build process are managed by the Simulink Coder.
When you specify the system target file that corresponds to your hardware, for
example, rti1202.tlc for a MicroLabBox, most of the relevant configuration
parameters are set automatically, and many others can be customized. For
general information, refer to Building and Downloading the Model (RTI and
RTI-MP Implementation Guide ).
48
FPGA Programming Handcode Framework Guide May 2024
Working with the Processor Model
5 Click Build in the Code Generation dialog to start the build process.
Tip
If the build options were already specified, you can also start the
build process directly via the Ctrl+B shortcut or via the Tools - Code
Generation - Build Model command from the menu bar of the
model.
Result If the build process finished successfully, you will find the build results, such as
the processor application file and the variable description file, in the working
folder. If you have specified to program the FPGA application into flash or
RAM, the flash or the FPGA is automatically programmed when the processor
application is loaded. For further information on programming the FPGA, refer to
How to Create Burn Applications for MicroAutoBox II on page 49.
For example, if you built the MyDemo application for a MicroLabBox, you
will find the executable PPC file in the working folder and a subfolder called
MyDemo_rti1202 containing the generated code and all the intermediate build
results.
Objective You can explicitly program the FPGA of the MicroAutoBox II with a burn
application.
Basics A burn application is used to load an FPGA application to the FPGA. Usually, the
FPGA programming is included in the processor application and there is no need
to use a burn application. But in some cases, it is useful to program the FPGA
explicitly.
Note
Programming into flash If you use the flash memory of the FPGA board,
you must execute the burn application only once. Each time you start the FPGA
49
May 2024 FPGA Programming Handcode Framework Guide
Using RTI to Implement the Processor Interface
board, the FPGA application is loaded to the FPGA automatically. In this case, the
processor application should be built without specifying a programming option.
This gives you the shortest startup time for your system. If you want to load a
new FPGA application to the flash, you must execute the burn application to
replace the flash contents and restart the system to program the FPGA from the
flash with the new application.
Note
When programming into flash, you must consider the Autoboot features of
your hardware.
§ The Autoboot feature can be enabled and
disabled via the MicroAutoBox Configuration Tool
(<RCP_HIL_InstallationPath>/Exe/DS1401_ConfigGUI.exe) or via
RTLib, refer to fpga_tp1_enable_autoboot (MicroAutoBox II RTLib
Reference ) and fpga_tp1_disable_autoboot (MicroAutoBox II RTLib
Reference ).
Programming into RAM If you use the RAM memory of the FPGA board,
the FPGA must be programmed every time you start the system. It is therefore
recommended to build the processor application with the RAM programming
option to program the FPGA application automatically when loading the
processor application. A burn application for the RAM is useful if you want
to test the FPGA application only. If you program into the RAM memory, any
running FPGA application is immediately stopped and replaced with the new
FPGA application, unlike flash programming, where you must restart the board
to activate the new FPGA application.
Result If the build process succeeded, the build result can be found in
<ModelName>_rtiFPGA/burnapplication. The executable is not
automatically downloaded to the processor board. The intermediate build results
can be found in
<ModelName>_rtiFPGA/burnapplication/<ModelName>_burnapplication
_rti1401.
50
FPGA Programming Handcode Framework Guide May 2024
Working with the Processor Model
References
51
May 2024 FPGA Programming Handcode Framework Guide
Using RTI to Implement the Processor Interface
52
FPGA Programming Handcode Framework Guide May 2024
Using RTLib to Implement the Processor Interface
Introduction You can use board-specific C functions to implement the processor application
and the handcoded FPGA application on the MicroAutoBox II or the
MicroLabBox.
MicroAutoBox II:
Compiling, Linking and Downloading an Application
(MicroAutoBox II RTLib Reference )
Information about the batch files, makefiles, and linker command files
that support your program development.
53
May 2024 FPGA Programming Handcode Framework Guide
Using RTLib to Implement the Processor Interface
MicroLabBox:
Compiling, Linking and Downloading an Application
(MicroLabBox RTLib Reference )
Information about the batch files, makefiles, and linker command files
that support your program development.
Objective RTLib functions let you implement the processor interface and handle the FPGA
interrupts.
Data exchange With RTLib, you can implement the processor's read and write access to the
FPGA data storage via data exchange functions.
Data type conversion Data exchange with the FPGA application requires
data type conversion, which is configured by the scaling and mode parameters.
54
FPGA Programming Handcode Framework Guide May 2024
Handcoding the Processor Interface
The scaling parameter correlates with the binary point position parameter
of the FPGA application for signed and unsigned data types. The scaling
parameter is ignored if the FPGA application uses floating-point data. Predefined
symbols let you configure the scaling parameter. The following table shows
examples of predefined symbols for reading a register of an FPGA application
implemented on the MicroLabBox.
The mode parameter lets you configure the data type used in the FPGA
application with predefined symbols.
Data exchange example This example shows how to write data in signed
mode with a scaling factor of 216 (Binary point position = 16) to register 1 of a
MicroLabBox:
Float64 scaling_factor = IOFPGA_WRITE_SCALE_BIN_PT_16;
IoFpga_write_reg(
1, //number of the register
&data, //pointer to data variable
&scaling_factor,
IOFPGA_DATA_MODE_SIGNED); // data processing mode (data type)
Interrupt handling The FPGA boards provide interrupt channels that you can handle by using
the RTLib interrupt functions. The handling of the interrupts depends on the
platform you use.
MicroAutoBox II You must enable the interrupt channel for the FPGA. To
do this, call fpga_tp1_enable_int. The interrupt handling is performed by the
interrupt controller on the MicroAutoBox II base board.
55
May 2024 FPGA Programming Handcode Framework Guide
Using RTLib to Implement the Processor Interface
int main(void)
{
ULong64 applId = 0x123456789A0002ULL;
/* init RTLib and IoFpga */
RTLIB_INIT();
IoFpga_init(&applId);
/* register interrupt handler */
IoFpga_register_isr(isr_0, IOFPGA_INT_SRC_1);
/* RTLib global interrupt enable */
RTLIB_INT_ENABLE();
IoFpga_enable_int(IOFPGA_INT_SRC_1);
while(1)
{
RTLIB_BACKGROUND_SERVICE();
}
return 0;
}
MicroLabBox:
§ Data Exchange Functions (MicroLabBox RTLib Reference )
§ Interrupt Functions (MicroLabBox RTLib Reference )
Objective Extracting bitstream file from the FPGA model INI file to include the bitstream file
to the processor application.
56
FPGA Programming Handcode Framework Guide May 2024
How to Include Bitstream Files to Handcoded Processor Applications
Next step You can now include the bitstream file to the processor application. Refer
to How to Include Bitstream Files to Handcoded Processor Applications on
page 57.
Objective You must include the bitstream file of the FPGA model INI file in the processor
application so the processor application is able to program the FPGA.
Precondition The bitstream file is extracted from the FPGA model INI file.
Possible methods § You can edit a custom makefile to include the bitstream file. Refer to Method
1.
§ You can copy the C code of the bitstream file to the processor application
code. Refer to Method 2.
Result You included the bitstream file to the handcoded processor application.
57
May 2024 FPGA Programming Handcode Framework Guide
Using RTLib to Implement the Processor Interface
Objective The processor application handles the download of the FPGA application and the
programming of the FPGA.
Basics If you handcode the processor application for a MicroAutoBox II, you have to call
an RTLib function to download the bitstream and program the FPGA. You must
call the FPGA programming function after the processor board was initialized
and before the FPGA is initialized.
Note
Result After you build the real-time application, the real-time application can download
the FPGA application and program the FPGA.
58
FPGA Programming Handcode Framework Guide May 2024
How to Download FPGA Applications and Program the FPGA
Example This example shows you how to use the FPGA programming function for a
MicroAutoBox II in general:
extern void *fpga_prgrm_data_ptr_<AppID>;
fpga_tp1_prgr_dat *datastruct = (fpga_tp1_prgr_dat*)fpga_prgrm_data_ptr_<AppID>;
fpga_tp1_program(base, datastruct);
59
May 2024 FPGA Programming Handcode Framework Guide
Using RTLib to Implement the Processor Interface
UInt8 bitstream_84303E38761313[] =
{
249,255,255,255,255,249,4,4,
249,8,8,249,16,16,0,0,
0,187,17,34,0,68,249,8,
...
}
...
60
FPGA Programming Handcode Framework Guide May 2024
Running Processor and FPGA Applications on the Real-Time Hardware
Introduction When you have built the executable applications for the processor and the FPGA
board, you can load them to the real-time hardware for experimenting.
Introduction You can observe the behavior of the real-time application and change
application‑specific parameters by using ControlDesk.
Downloading processor and To run a processor application, the built executable file must only be
FPGA application downloaded to the real-time hardware. The real-time hardware must be
registered beforehand, for example, via the Platform Manager in ControlDesk
or ConfigurationDesk. Any running application is stopped and overwritten by the
newly loaded application. If the processor application contains the programming
of the FPGA, the FPGA application is loaded to the FPGA automatically. If it does
not, and there is no FPGA application running, you must first download the burn
application to program the FPGA and afterwards the processor application.
Note
Before you download the processor application, the flash process started
by the burn application must be finished. For more information on burn
applications, refer to How to Create Burn Applications for MicroAutoBox II
on page 49.
61
May 2024 FPGA Programming Handcode Framework Guide
Running Processor and FPGA Applications on the Real-Time Hardware
Note
Required files For experimenting, i.e., changing application-specific parameters during run time
and displaying the behavior, you need files that are created during the build
process, for example, the processor application (.x86, .ppc or .rta), the variable
description file (.trc), the system description file (.sdf), and the mapping file
(.map).
Note
If you want to access an FPGA signal, you must provide it to the processor
model.
Related documents § ControlDesk Introduction and Overview for information on working with
ControlDesk.
§ ConfigurationDesk Real-Time Implementation Guide for detailed
information on working with ConfigurationDesk.
62
FPGA Programming Handcode Framework Guide May 2024
Features Provided by Specific FPGA Boards
Introduction The following features are provided only by specific FPGA boards.
63
May 2024 FPGA Programming Handcode Framework Guide
Features Provided by Specific FPGA Boards
64
FPGA Programming Handcode Framework Guide May 2024
Handcoding Inter-FPGA Communication
Overview of inter-FPGA The following table shows the different types of inter-FPGA communication
communication between between SCALEXIO FPGA base boards.
SCALEXIO boards
Inter-FPGA via I/O Module Inter-FPGA via MGT Inter-FPGA via IOCNET
Slots Module
Topology 1:1 1:1 1:n
FPGA stack1) Next to each other No restriction § Within the same IOCNET
location segment2)
§ Other I/O boards must not
be connected to this IOCNET
segment.
Number of direct 2 4 Not directly limited
connections
Data rate Max. 582.3 Mbit/s with default Max. 10.3125 Gbit/s with § 1.25 Gbit/s IOCNET:
values Aurora 64b66b 128 Bit Approx. 800 Mbit/s
I/O function § 2.5 Gbit/s IOCNET:
Typ. 1 Gbit/s, max.
1.6 Gbit/s3)
Latency 72 ns … 96 ns with default Typ. 384 ns, max. 472 ns Typ. 1.0 µs per network hop,
values for single words including onboard hops
Supported FPGA § DS2655 § DS6601 § DS2655
base boards § DS6601 § DS6602 § DS6601
§ DS6602 § DS6602
Required accessory SCLX_INT_FPGA_CAB1 DS6601_MGT1 or –
DS6602_MGT1
1) FPGA base board with installed I/O modules.
2) Refer to Implementing Inter-FPGA Communication via IOCNET on page 66.
3) Theoretical maximum
Implementing the inter-FPGA To implement an inter-FPGA communication bus, you have to implement the
interface functionality to the FPGA code.
65
May 2024 FPGA Programming Handcode Framework Guide
Features Provided by Specific FPGA Boards
Introduction IOCNET can be used to transfer data directly between FPGA boards of a
SCALEXIO system.
Basic interface characteristics You have to consider the following interface characteristics if you implement
inter-FPGA communication via IOCNET.
§ Up to 32 channels to transmit 32-bit values and up to 32 channels to transmit
64-bit values can be implemented.
§ The data rate depends on the IOCNET data rate:
§ 1.25 Gbit/s IOCNET:
About 800 Mbit/s
§ 2.5 Gbit/s IOCNET:
Typ. 1 Gbit/s, max. 1.6 Gbit/s theoretical
§ The latency is typ. 1 µs per network hop. Refer to Calculating the Latency
(IOCNET) on page 67.
§ Each 32-bit channel can address up to 1024 data values.
§ Each 64-bit channel can address up to 512 data values.
§ The data type is a raw data type: UFix_32_0 or UFix_64_0.
You can transfer any data type with a matching bit width via inter-FPGA over
IOCNET. Use the Reinterpret block from the HDL library of the AMD Vitis
Model Composer to change your data type to UFix_32_0 or UFix_64_0 and
vice versa. Reinterpreting data types does not cost any hardware or latency.
Restrictions on the IOCNET Inter-FPGA via IOCNET can only be used for FPGA base boards if the following
topology requirements on the IOCNET topology are fulfilled:
§ The boards are installed to the same IOCNET segment. An IOCNET segment
are the IOCNET nodes (I/O unit/LabBox/AutoBox) that are linked in serial to the
processing hardware. The following illustrations shows an example.
66
FPGA Programming Handcode Framework Guide May 2024
Handcoding Inter-FPGA Communication
Downlink
Downlink
IOCNET segment
Tip
§ Other I/O boards must not be connected to the used IOCNET segment.
Adding the inter-FPGA The frameworks of the FPGA base boards provide inter-FPGA blocks to add the
communication functionality inter-FPGA communication functionality to the FPGA application.
to the FPGA application
Specifying the inter-FPGA After you added the FPGA application to the signal chain in ConfigurationDesk,
connections you can reference the Inter-FPGA In blocks to the Inter-FPGA Out blocks to
specify the communication bus.
Latency calculation The latency depends on the network hops between the FPGA base boards. A
network hop occurs when a data packet is passed from one network connection
to the next. Each hop takes about 1.0 µs.
67
May 2024 FPGA Programming Handcode Framework Guide
Features Provided by Specific FPGA Boards
To calculate the latency, you have to count the IOCNET routers between the
FPGA base boards, including the onboard routers.
Tip
Example #1 The following illustration shows a topology with 3 network hops between the
FPGA base boards.
Example #2 The following illustration shows a topology with 5 network hops between the
FPGA base boards.
68
FPGA Programming Handcode Framework Guide May 2024
Handcoding Inter-FPGA Communication
Introduction Multi-gigabit transceiver (MGT) modules can be used to transfer data directly
between FPGA boards of a SCALEXIO system.
Basic interface characteristics You have to consider the following interface characteristics if you implement
inter-FPGA communication via MGT modules.
§ MGT modules are optional modules that must be installed to the FPGA base
board.
§ Up to 4 channels to transmit data values to up to 4 FPGA base boards.
§ The maximum data rate is 10.3125 Gbit/s if you use an Aurora 64b66b 128
Bit I/O function.
§ The typical latency is 384 ns for single words. The maximum latency is 472 ns.
§ Each 64-bit channel can address up to 512 data values.
§ The data type is a raw data type: UFix_32_0 or UFix_64_0.
You can transfer any data type with a matching bit width via inter-FPGA over
IOCNET. Use the Reinterpret block from the HDL library of the AMD Vitis
Model Composer to change your data type to UFix_32_0 or UFix_64_0 and
vice versa. Reinterpreting data types does not cost any hardware or latency.
Adding the inter-FPGA The DS660X_MGT framework provides I/O functions to transmit and receive data
communication functionality via an installed MGT module using the Aurora protocol, but you can also use
to the FPGA application customized protocols.
69
May 2024 FPGA Programming Handcode Framework Guide
Features Provided by Specific FPGA Boards
Introduction With the Inter-FPGA Interface framework, the I/O module slots of the SCALEXIO
FPGA base boards can be used to establish an inter-FPGA communication bus.
70
FPGA Programming Handcode Framework Guide May 2024
Handcoding Inter-FPGA Communication
Basic interface characteristics You have to consider the following interface characteristics if you implement
inter-FPGA communication via I/O module slots.
§ The inter-FPGA communication bus is a point-to-point one-way
communication. It is implemented directly between the connected FPGA
boards without using IOCNET.
§ An inter-FPGA communication cable can only connect FPGA base boards that
are installed next to each other. Therefore, up to two FPGA base boards can be
directly connected to an FPGA base board. For an example, refer to Inter-FPGA
communication between multiple SCALEXIO FPGA base boards on page 74.
§ The maximum data rate is 582.3 Mbit/s with default values. Refer to
Calculating the Data Rate and Latency (SCALEXIO) on page 78.
§ The latency is 72 ns … 96 ns with default values. Refer to Calculating the Data
Rate and Latency (SCALEXIO) on page 78.
§ The maximum data width for inter-FPGA communication with bus
synchronization is 27 bits.
The interface provides a 28‑bit parallel data bus. One data bit of each subbus
is reserved for synchronization purposes.
In expert mode, the Inter-FPGA Interface framework provides inter-FPGA
communication without bus synchronization. In this mode, the maximum data
width for inter-FPGA communication is 28 bits.
§ You can configure up to eight subbuses for each inter-FPGA communication
bus.
§ Inter-FPGA communication between different types of SCALEXIO FPGA boards
is supported. For example: A DS2655 FPGA Base Board can be connected to a
DS6601 FPGA Board and a DS6602 FPGA Base Board.
Adding the inter-FPGA You add the inter-FPGA functionality to the FPGA application by configuring
communication functionality the hc_fpga_framework_ini_<SCALEXIO FPGA base board>.m file of the
to the FPGA application SCALEXIO FPGA base board framework.
71
May 2024 FPGA Programming Handcode Framework Guide
Features Provided by Specific FPGA Boards
Specifying the inter-FPGA The I‑FPGA In and I‑FPGA Out I/O functions let you specify the inter-FPGA
communication communication.
For more information on the inter-FPGA I/O functions, refer to I/O Functions of
the Inter-FPGA Interface Framework (FPGA Programming Handcode Framework -
FPGA Interface Reference ).
Configuring subbuses Eight communication channels let you use up to eight subbuses. If you configure
subbuses, you can access a specific subbus by specifying a bit range with
the related start bits and end bits in the inter-FPGA I/O functions. The bit
ranges of the subbuses must not overlap. One bit has to be reserved for
synchronization purposes for each configured subbus. The maximum data width
of a synchronized subbus is therefore Endbit ‑ Startbit.
You cannot use two I/O functions that use the same communication channel
within the same FPGA application. For example, you cannot use an I‑FPGA In
function on channel number 1 if there is already an I‑FPGA Out function on this
channel, but you can use an I‑FPGA In function on channel number 2.
Note
If you send and receive data with the same inter-FPGA interface, you have
to consider limitations on the bit ranges for the subbuses. Refer to How
to Determine the Bit Ranges for Inter-FPGA Subbuses Between SCALEXIO
FPGA Base Boards on page 75.
72
FPGA Programming Handcode Framework Guide May 2024
Handcoding Inter-FPGA Communication
Application examples The hardware connections, the implemented FPGA code, and the function
settings for the bus configuration have to match to get the required data
transfer.
Inter-FPGA
Board 1 communication Board 2
I-FPGA I-FPGA
Start bit: 0 Master 1 Slave 1 Start bit: 0
27 bit data + 1 bit sync.
End bit: 27 End bit: 27
73
May 2024 FPGA Programming Handcode Framework Guide
Features Provided by Specific FPGA Boards
Inter-FPGA
Board 1 communication Board 2
I-FPGA Bus 2
Start bit: 0 Master 2 Board 3
End bit: 27
I-FPGA
Slave 2 Start bit: 0
End bit: 27
More than three boards can be connected via inter-FPGA communication cables,
but only the boards that are located next to each other can be connected with
an inter-FPGA communication cable.
74
FPGA Programming Handcode Framework Guide May 2024
Handcoding Inter-FPGA Communication
The following illustration shows the assembly of four FPGA stacks (FPGA base
board with I/O modules) that are used for inter-FPGA communication.
Inter-FPGA communication cables
Rear
5 5 5 5
4 4 4 4
3 3 3 3
2 2 2 2
Base board 1
...
Base board 2
Base board 3
Base board 4
...
Stack 1 Stack 2 Stack 3 Stack 4
Front
HowTos
How to Determine the Bit Ranges for Inter-FPGA Subbuses Between SCALEXIO FPGA
Base Boards.............................................................................................................................. 75
References
Objective When you implement subbuses to send and receive data via an inter-FPGA
communication bus between SCALEXIO FPGA base boards, you must observe
limitations for the bit ranges of subbuses.
Limitations For a robust communication, the wires of the interface cable are grouped to six
cable segments. Within a cable segment, data can only be sent in one direction.
75
May 2024 FPGA Programming Handcode Framework Guide
Features Provided by Specific FPGA Boards
That means, you cannot use the same cable segment to send and receive data.
Furthermore, the interface cable supports only two cable segment ranges that
transmit data as shown in the example below.
Data Data
Subbus 2 Cable segment 3...6 Subbus 2
Data Data
Subbus 2 Cable segment 3...4 Subbus 2
Data Data
Subbus 3 Cable segment 5...6 Subbus 3
Note
If you use the inter-FPGA communication bus only in one direction, you can
specify the bit ranges of subbuses without limitations. You must consider
the limitations only if you send and receive data with the same inter-FPGA
interface.
Bit ranges supported by the The following table shows which cable segment supports which bit range:
cable segments
Cable Segment Bit range
1 0 ... 5
2 6 ... 7
3 8 ... 13
4 14 ... 19
5 20 ... 21
6 22 ... 27
Method To determine the bit ranges for inter-FPGA subbuses between SCALEXIO
FPGA base boards
1 Choose one continuous range of cable segments that can be used to send
data and one continuous range that can be used to receive data. The
ranges must not overlap. For examples, refer to Configuration examples on
page 77.
76
FPGA Programming Handcode Framework Guide May 2024
Handcoding Inter-FPGA Communication
2 Identify the bit range that is supported by the chosen cable segment range
for sending data. This bit range can be used by subbuses to send data.
For example: The cable segments 1 ... 3 support the bit range 0 ... 13.
3 Use the identified bit range to determine the bit ranges of subbuses to
send data. You can determine multiple subbuses, as shown by Example 2 on
page 77.
4 Identify the bit range that is supported by the chosen cable segment range
for receiving data. This bit range can be used by subbuses to receive data.
5 Use the identified bit range to determine the bit ranges of subbuses to
receive data.
Next step Add the I-FPGA In and I-FPGA Out functions to the FPGA code to implement
the inter-FPGA communication and configure their start and end bits with the
determined bit ranges.
Configuration examples The examples help you configure the bit ranges of your subbuses and show you
possible configuration errors.
Example 1 The following table shows you an example for bit ranges of two
subbuses.
Example 2 The following table shows you an example for bit ranges of four
subbuses.
77
May 2024 FPGA Programming Handcode Framework Guide
Features Provided by Specific FPGA Boards
Calculating data rate The data rate of an inter-FPGA (sub)bus depends on the function settings for the
clock, the bit length and the data width.
Resulting data rate for data transfer with bus synchronization The
maximum data rate with the default values is 562.5 Mbit/s for the entire bus
or 20.83 Mbit/s per bit.
DataRateMax,Bus = 125 MHz · (28 ‑ 1) Bit / 6
DataRateMax,Bit = 125 MHz · 1 Bit / 6
Resulting data rate for data transfer without bus synchronization The
maximum data rate with the default values is 582.3 Mbit/s for the entire bus or
20.83 Mbit/s per bit.
78
FPGA Programming Handcode Framework Guide May 2024
Handcoding Inter-FPGA Communication
Calculating latency The latency consists of a constant value and dependencies on the clock rate of
the inter-FPGA bus, filter depth, and on whether jitters and spikes occur.
Tinter-FPGA Master: Latency of the inter-FPGA component to write data to the inter-FPGA bus.
Tinter-FPGA Master = ClockPeriodinter-FPGA · 2 ClockCycles
Tinter-FPGA Slave: Latency of the inter-FPGA component to read data from the inter-FPGA bus.
Tinter-FPGA Slave depends on the filter depth, and jitter and spikes on the bus lines:
§ Filter depth >0 and jitter and spikes on the bus lines:
Tinter-FPGA Slave = ClockPeriodinter-FPGA · (3 ClockCycles +
(FilterDepth + 1 + [0 … FilterDepth]))
With the range [0 … FilterDepth] as the latency caused by spikes.
Latency calculation examples The following examples display the resulting latency for different applications.
79
May 2024 FPGA Programming Handcode Framework Guide
Features Provided by Specific FPGA Boards
Note
Use the expert mode only if you have enough experience of configuring
buses and knowledge of checking the correctness of the configured
transmission with regard to the observed signal integrity at the applicable
temperature range.
The default values for the bit length, clock, and filter depth have been
tested by dSPACE.
80
FPGA Programming Handcode Framework Guide May 2024
MicroLabBox: Using Remaining I/O Channels with RTI/RTLib
Introduction The DS1202 FPGA IO Type 1 (Flexible I/O) framework lets you handcode
real-time applications for MicroLabBox together with the RTI1202 blockset,
the RTI Electric Motor (EMC) blockset, and the Real-Time Library (RTLib) for
MicroLabBox.
Features of the DS1202 FPGA The framework provides the following features:
I/O Type 1 (Flexible I/O) § During the build process of the custom FPGA application, the standard I/O
framework features for remaining I/O channels are added. The standard I/O features let
you use the remaining I/O channels with RTI blocksets/RTLib for MicroLabBox.
§ The framework provides the same I/O functions as the DS1202 FPGA I/O Type
1 framework.
§ The framework is compatible with the DS1202 FPGA I/O Type 1 framework.
You can switch between the DS1202 FPGA I/O Type 1 (Flexible I/O) and the
DS1202 FPGA I/O Type 1 frameworks. The compatibility lets you save time
81
May 2024 FPGA Programming Handcode Framework Guide
Features Provided by Specific FPGA Boards
when you model and test the the FPGA application. Refer to Workflow when
Using MicroLabBox Flexible I/O Framework on page 82.
§ I/O channels that are used by the DS1202 FPGA I/O Type 1 (Flexible I/O)
framework are marked within the RTI1202 and the EMC blocksets with an
asterisk.
You must not access the same channel with the DS1202 FPGA I/O Type 1
(Flexible I/O) framework and the RTI1202 or EMC blocksets.
Note
Overview of the RTI Electric Motor Control Blockset (RTI Electric Motor Control
Blockset Reference )
References
Introduction Building FPGA applications with the DS1202 FPGA I/O Type 1 framework is
substantially faster than building FPGA applications with the DS1202 FPGA
I/O Type 1 (Flexible I/O) framework. The implementation of the standard I/O
features, which let you use the remaining I/O channels with RTI blocksets/RTLib
for MicroLabBox, takes additional FPGA resources and more build time.
The compatibility of the frameworks lets you use the DS1202 FPGA I/O Type 1
framework for handcoding and testing and the DS1202 FPGA I/O Type 1
82
FPGA Programming Handcode Framework Guide May 2024
MicroLabBox: Using Remaining I/O Channels with RTI/RTLib
(Flexible I/O) framework for building the final FPGA application including the
standard I/O features for the remaining I/O channels.
Recommended workflow 1. Model, test, and build the FPGA application with the DS1202 FPGA I/O
Type 1 framework (DS1302_XC7K325T) until you have the final version.
2. Copy the cm file, the hc_fpga_framework_ini_DS1302.m file, and
custom code to the DS1202 FPGA I/O Type 1 (Flexible I/O) framework
(DS1302_XC7K325T_FLEXIBLEIO).
3. Build the final FPGA application.
4. Implement the processor interface with RTI blocksets/RTLib for MicroLabBox
to access the remaining I/O channels.
5. Build the processor application.
The build process makes sure that no I/O channel is accessed multiple times,
for example, by the FPGA application and the processor application.
6. Download the application to MicroLabBox.
83
May 2024 FPGA Programming Handcode Framework Guide
Features Provided by Specific FPGA Boards
Introduction The DS6602 FPGA Base Board provides a 4 GB DDR4 RAM that can be used by
the FPGA application.
The RAM interface always handles 512 bits at once. Therefore, the FPGA
application can read/write 16 x 32 bits data or 8 x 64 bits data within one
memory access.
You can select different I/O functions to access the DDR4 RAM:
§ DDR4 32 Mode 1 and DDR4 64 Mode 1 to read/write 32/64-bit values.
These I/O types use the memory access mode 1.
§ DDR4 32 Mode 2 and DDR4 64 Mode 2 to read/write 32/64-bit values.
These I/O types use the memory access mode 2.
Tip
Memory access modes The FPGA Programming Handcode Framework provides two memory access
modes:
§ Mode 1
Mode 1 addresses one memory area of 512 bits, each with read/write access.
§ Mode 2
Mode 2 addresses two memory areas of 256 bits, each with read/write access.
84
FPGA Programming Handcode Framework Guide May 2024
DS6602: Accessing the DDR4 RAM
The following example shows the memory areas addressed by the different
access modes.
Mode 1 Mode 2
2 1024 4 1024
768 3 768
1 512 2 512
256 1 256
Note
The memory areas are addressed differently by the different access modes.
Optimizing read/write access To decrease the read/write time, use consecutive addresses for read/write
accesses. A random address access approximately triples the read/write time:
I/O Functions of the DS6602 FPGA Base Board Framework (FPGA Programming
Handcode Framework - FPGA Interface Reference )
Introduction You can provide a file with initial values for the RAM memory to start the FPGA
application with defined DDR4 RAM data values. The processing hardware writes
the initial values from a SCALEXIO SSD to the FPGA base board during the
initialization phase of the SCALEXIO system.
85
May 2024 FPGA Programming Handcode Framework Guide
Features Provided by Specific FPGA Boards
Generating an initialization The initialization file is a binary file. You can use the following MATLAB script to
file generate an initialization file with MATLAB.
% generate sample 32 bit values (4GB – 1 Word) 1..2^30-1 (2^30*4 Byte = 4 GB)
% generate sample 64 bit values (4GB – 1 Word) 1..2^29-1 (2^29*8 Byte = 4 GB)
ddr4_4gb = 1:2^30-1;
% open, write, close file
fid = fopen('ddr4_4gb.bin', 'w');
fwrite(fid, ddr4_4gb, 'uint32');
% or as different data type
% fwrite(fid, ddr4_4gb, 'single');
% fwrite(fid, ddr4_4gb, 'double');
% 64 bit -> use only half as many elements
…
fclose(fid)
Note
You can use any data type to initialize the DDR4 RAM.
Providing the initialization You download the initialization file to a SCALEXIO SSD to provide the initial
file to the SCALEXIO system values. For instructions, refer to How to Initialize the DDR4 RAM of the DS6602
(ConfigurationDesk I/O Function Implementation Guide ).
86
FPGA Programming Handcode Framework Guide May 2024
DS6601, DS6602: Coding a Customized MGT Protocol
Block diagram of the The DS6601 and DS6602 FPGA base boards provide a connector to insert an
interface optical adapter for MGT (MGT module). The following illustration shows the
basic components to support the MGT communication bus.
Reference
GTH transceiver clock
(master)
GTH transceiver
FPGA (slave 1)
MGT module
GTH transceiver
(slave 2)
GTH transceiver
(slave 3)
Components description The following table shows the description of the components.
Component Description
FPGA The FPGA processes the build FPGA application.
GTH The GTH transceivers are configurable transceivers that are integrated with the logic resources of
transceiver the FPGA. The GTH transceivers support line rates from 500 Mbit/s … 16.375 Gbit/s. The master
transceiver receives the differential reference clock signal and provide it to the slave transceivers.
Master or slave has no influence on the MGT communication.
The GTH transceivers can be configured by the FPGA application to support different protocols, line
rates, etc.
For details on the GTH transceiver, refer to
https://www.xilinx.com/support/documentation/user_guides/ug576-ultrascale-gth-transceivers.pdf.
Reference This clock provides the configured reference frequency for the GTH transceivers.
clock
MGT module The MGT module is an optical adapter that can be connected to the FPGA base board. The MGT
module provides four channels for communication.
87
May 2024 FPGA Programming Handcode Framework Guide
Features Provided by Specific FPGA Boards
Component Description
The order number of the SCALEXIO MGT modules are as follows:
§ DS6601_MGT1 for the DS6601 FPGA Base Board.
§ DS6602_MGT1 for the DS6602 FPGA Base Board.
Using a customized protocol You can use the IP Catalog of Vivado to customize a predefined protocol.
The IP Catalog provides a list of IP cores that can be customized. For more
information, refer to https://docs.xilinx.com/r/en-US/ug896-vivado-ip.
The IP Catalog lets you generate a net list that you can integrate in the
handcode. You can also include optional features like FIFOs for the inports and
outports, or a reset logic for the GTH transceiver.
Required settings The following parameters depend on the FPGA base board and must be set to a
specific value in the VHDL file:
§ The low power mode of the equalizer must be enabled.
gt_rxlpmen => (others => '1')
§ The differential swing voltage must be set to board-specific value:
§ DS6601: 460 mVpp (peak-to-peak voltage)
gt_txdiffctrl => "0100"
§ DS6602: 498 mVpp
gt_txdiffctrl => "01010"
88
FPGA Programming Handcode Framework Guide May 2024
DS6601, DS6602: Configuring the Timeout of a Watchdog I/O Function
Basics on the watchdog timer The watchdog I/O function provides a timer that must be reset by a keep-alive
signal of the processor application before a configured timeout expires.
89
May 2024 FPGA Programming Handcode Framework Guide
Features Provided by Specific FPGA Boards
2 In the Properties Browser, select the timeout mode for the watchdog.
3 If you selected the fixed timeout mode, enter a fixed timeout in seconds.
4 If you selected an adaptive timeout, enter an integer factor by how much
longer than the last task execution time the watchdog timer waits for the
keep-alive signal.
5 To activate the watchdog feature, map the Trigger function inport to a
model port that provides the keep-alive signal.
90
FPGA Programming Handcode Framework Guide May 2024
DS6601, DS6602: Configuring the Timeout of a Watchdog I/O Function
Result You configured the timeout for the watchdog timer. If the specified time interval
expires without a keep-alive signal being transmitted to the FPGA application,
the watchdog timer expires and outputs a timeout to trigger the implemented
FPGA functionality.
If a timeout occurs, you must restart the real-time application to reset the
watchdog.
Tip
91
May 2024 FPGA Programming Handcode Framework Guide
Features Provided by Specific FPGA Boards
92
FPGA Programming Handcode Framework Guide May 2024
Troubleshooting
Troubleshooting
Introduction When working with the FPGA Programming Software there are some problems
which can arise.
Building an FPGA application If you use a DS6602 FPGA Base Board, the build process issues a critical warning
that the design failed to meet the timing requirements:
93
May 2024 FPGA Programming Handcode Framework Guide
Troubleshooting
94
FPGA Programming Handcode Framework Guide May 2024
Index
S
Index
components 10
A FPGA Programming Handcoding Framework
SCALEXIO FPGA base board
hardware support 19
adapting processor model interface 45 feature overview 22
AMD Design Suite 17 script interface
G configuring FPGA code 32
generating a processor model interface 44 generating FPGA model INI file 39
B
generating FPGA bitstream 37 generating FPGAC file 39
best practise 26 script interface function
generating FPGA custom function 39
building FPGA application 37 HCFPGAFrameworkInit 32
generating FPGA model INI file 39
building processor application 48 HCFPGAModelIniGenerate 39
generating FPGAC file 39
burnapplication folder 50 SDF file 62
simulating a processor model 47
H
C specifying FPGA functionality 33
handcode FPGA framework INI file 30 specifying FPGA I/O interface 30
cm.v 35
handcoding processor interface 54 Specifying the FPGA framework 30
cm.vhd 34
hardware support starting the simulation 48
Common Program Data folder 6
FPGA Programming Handcoding supported AMD design tools 17
components of the FPGA Programming
Framework 19 supported MATLAB versions 17
Blockset 10
hc_fpga_framework_ini_<Framework_Name>.m supported operating systems 17
configuring FPGA code
30
via script interface 32
HC_Vivado2014.xpr 34
configuring FPGA code with I/O 32 T
HC_Vivado2014_verilog.xpr 35
creating a burn application 49 TRC file 62
HcUsed 31
customizing architecture section 34 triggering interrupt-driven tasks 46
customizing Vivado project file 34 troubleshooting 93
I
building FPGA application 93
D I/O modules
for MicroAutoBox II 21
Documents folder 6 U
for MicroAutoBox III 21
downloading FPGA application 61 Unsupported features 27
for SCALEXIO DS2655 23
downloading processor application 61 using FPGA model INI file for the processor
implementing the processor interface 54
DS1514 model interface 40
interrupt handling 46
feature overview 20
DS1552 Multi-I/O Module
L W
feature overview 21
DS1552B1 Multi-I/O Module Local Program Data folder 6 workflow
feature overview 21 handcode FPGA 25
DS1554 Engine Control I/O Module M
feature overview 21
MAP file 62
DS2655 FPGA Base Board
MicroAutoBox II
feature overview 22
feature overview 20
DS2655M1 Multi-I/O Module
MicroAutoBox III
feature overview 23
feature overview 20
DS2655M2 Digital I/O Module
MicroLabBox
feature overview 23
feature overview 19
DS6601 FPGA Base Board
MicroLabBox II
feature overview 22
feature overview 20
DS6602 FPGA Base Board
feature overview 22
DS6651 Multi-I/O Module P
feature overview 23 preparing the handcode environment 30
processor communication
E MicroAutoBox II 14
MicroAutoBox III 14
example
MicroLabBox 13
configuring FGPA code with I/O 33
MicroLabBox II 13
I/O interface specification 31
SCALEXIO 14
exchanging data with the processor model 13
processor interface 10
experimenting with FPGA application 61
programming FPGA 49
programming into flash 49
F programming into RAM 50
FPGA architecture 8
FPGA data synchronization 27
FPGA Programming Blockset
95
May 2024 FPGA Programming Handcode Framework Guide
Index
96
FPGA Programming Handcode Framework Guide May 2024