Skip to main content

FPGA Code Modules

Many applications require high frequency connectivity and industry-specific communication protocols to interact with their Simulink models. Examples include motor control, hardware-in-the-loop (HIL) simulation, encoder emulation and multi-gigabyte high-speed communications. Speedgoat code modules (IP Cores) provide additional I/O connectivity and communication protocols, can be easily configured using the Simulink blocks provided, and are ideal for high-frequency digital signal generation and capture.

Code modules are compatible with both programmable FPGAs and configurable FPGAs. That is, they can be used both within Simulink Real-Time workflow or the HDL Coder workflow.


Contact us for more information

FPGA Code Modules

Distribution

The code module functionality is distributed either as a Custom Implementation (CI), or as a HDL Coder Functionality Package.

MathWorks Workflow Use case Name of distribution package Contents of delivery
HDL Coder workflow Application created from Simulink runs on Simulink-programmable FPGAs HDL Coder Functionality Package
  • Simulink blocks providing functionality for a specific code module
  • Simulink test model
  • Comprehensive documentation
  • I/O pin mappings can be defined on your own as needed using HDL Coder workflow advisor, and the Simulink block
Simulink Real-Time workflow Application created from Simulink runs on CPU of target machine Custom Implementation Package (CI) for IO3XX I/O module
  • Speedgoat FPGA configuration file, implementing your required predefined types and channel counts of the various code modules (selectable in setup block of IO3XX FPGA I/O module)
  • Simulink driver blocks for code modules
  • Simulink test model
  • Comprehensive documentation including I/O pin mapping information

Note: Simulink-programmable FPGAs can follow the same workflow as configurable FPGAs. That is, they can use code modules as Custom Implementations as well.

Essentially, a Speedgoat FPGA I/O module with custom implementation works like any other I/O module, but the FPGA enables sampling of high frequency signals at much faster rates than the fundamental closed-loop sample rate, and enables reconfiguration of provided functionality at any time.

HDL Coder Functionality Packages are typically combined with your own Simulink design, from which HDL code is automatically created using HDL Coder. See our introduction How to build, run, and test real-time applications with HDL Coder

Overview of Code Modules

General Purpose

Type
DIO - General Purpose Digital I/O code module
INT - Interrupt and synchronisation code module

Protocols

Type Master Slave Sniffer
SENT  
SPI
I2C On request
Aurora 64B/66B  
RS485 / RS422  (UART)  
Dshot  

PWM Generation and Capture

Type Generation Capture  
PWM  

Encoder Measurement and Simulation

Type Decoder (Measurement) Encoder (Simulation) Sniffer
Quadrature  
SSI/SSI2
BiSS
EnDAT 2.1/2.2
Cam and Crank  

Support for additional functionality is available on request - please contact us

Resources