SB-PWM – Sandbox PWM
Table of Contents
The FPGA sandbox PWM block allows driving the PWM output from a user-made modulator from within the FPGA.
Information on FPGA edition is available on Editing the FPGA firmware (sandbox) (PN116)
Usage examples of the FPGA sandbox PWM block are available on:
- FPGA-based direct torque control using Vivado HLS (TN133)
- FPGA-based hysteresis current control (TN120)
Because the user-generated FPGA signals still go through the PWM output chain, it supports dead time generation and can be activated or deactivated. More information is available on the PWM page.
Simulink block
Signal specification
The input A
allows the activation (>0) or deactivation (<=0) of the PWM output(s).
Parameters
Device ID
: selects which device to address when used in a multi-device configuration.Show ”activate” input
: makes theA
signal input visible. If not checked, the CB-PWM block is active by default.- Output configuration:
use
checkbox: selects which PWM outputs are driven from the FPGA sandboxoutput configuration
: selects between a single PWM signal or complementary signals with a deadtime.dead-time
: configures the dead-time duration if theOutput mode
is set at Dual (PWM_H + PWM_L).
output mode
, addressed PWM
, dead-time
and show ”activate” input
are common to all PWM blocks and are further documented on the PWM page.Example of SB PWM configuration
PLECS block
Signal specification
The input A
allows the activation (>0) or deactivation (<=0) of the PWM output(s).
Parameters
Device ID
selects which device to address when used in a multi-device configuration.Output mode
selects between a single PWM signal or complementary signals with a deadtime.Output lane(s)
orOutput channel(s)
(vectorizable) selects which PWM outputs are driven from the FPGA sandbox.PWM activation
makes theA
signal input visible if the option Use block input is selected. If not, the CB-PWM block is activated by default.Dead-time duration
configures the dead-time duration if theOutput mode
is set at Dual (PWM_H + PWM_L).
output mode
, addressed PWM
, dead time
and PWM activation
are common to all PWM blocks and are further documented on the PWM page.C++ functions
Functions specific to the sandbox PWM
There is no function specific to the sandbox PWM. The function SbPwm_ConfigureOutputMode()
must be used to select the PWM outputs to be driven from the FPGA sandbox.
Functions common to all PWM drivers
These functions are common to all PWM blocks. Further documentation is available on the PWM page.