AN 1000: Drive-on-Chip Design Example: Agilex™ 5 Devices
ID
826207
Date
7/08/2024
Public
1. About the Drive-on-Chip Design Example for Agilex™ 5 Devices
2. Features of the Drive-on-Chip Design Example for Agilex Devices
3. Getting Started with the Drive-on-Chip Design Example
4. Rebuilding the Drive-on-Chip Design Example
5. Modifying the Design Example for a Different Board
6. About the Scaling of Feedback Signals
7. Motor Control Software
8. Functional Description of the Drive-on-Chip Design Example for Agilex 5 Devices
9. Signals
10. Registers
11. Design Security Recommendations
12. Document Revision History for AN 1000: Drive-on-Chip Design Example for Agilex™ 5 Devices
3.1. Software Requirements for the Drive-on-Chip Design Example for Agilex 5 Devices
3.2. Hardware Requirements for the Drive-on-Chip Design Example for Agilex 5 Devices
3.3. Downloading and Installing the Design
3.4. Setting Up your Development Board for the Drive-on-Chip Design Example for Agilex 5 Devices
3.5. Configuring the FPGA Hardware for the Drive-on-Chip Design Example for Agilex 5 Devices
3.6. Programming the Nios V/g Software to the Device for the Drive-on-Chip Design Example for Agilex Devices
3.7. Debugging and Monitoring the Drive-on-Chip Design Example for Agilex 5 Devices with Python GUI
8.3.6.1. DSP Builder Model for the Drive-on-Chip Designs
8.3.6.2. Avalon Memory-Mapped Interface
8.3.6.3. About DSP Builder for Intel FPGAs
8.3.6.4. DSP Builder for Intel FPGAs Folding
8.3.6.5. DSP Builder for Intel FPGAs Design Guidelines
8.3.6.6. Generating VHDL for the DSP Builder Models for the Drive-on-Chip Designs
4.4. Software Application Configuration Files
You can modify the operation of the software application for the Drive-on-Chip Design Example by editing some C source code and header files.
File | Path | Function |
---|---|---|
demo_cfg.c | . | Declare motors[] array |
demo_cfg.h | . | Configuration macros and include file for demo_cfg.c |
motor_types.c | Platform/motors | Declares motor types and encoders |
motor_types.h | Platform/motors | Defines motor and encoder types and include file for motor_types.c |
app_cfg.h | . | Header file for OS cfg switches |
Macro | Default State | Range | Function |
---|---|---|---|
FIRST_MULTI_AXIS | 0 | 0 - 1 | Index of first motor axis to be controlled. |
LAST_MULTI_AXIS | 1 | 0 - 1 | Index of last motor axis to be controlled. |
DEFAULT_ADC_TYPE | ADC_TYPE_SIGMA_DELTA | ADC_TYPE_SIGMA_DELTA | Use sigma delta ADCsamples in control loop. |
SD_ADC_FILTER | ADC_D_10US | ADC_D_10US | Sinc3filter delay 10us. |
ADC_D_5US[VVE1] [WS2] | Sinc3filter delay 20us. | ||
constScaleVoltage | 1<<6 | n | Voltage is stored as short (16 bits signed value:sfix16), (1<<n), n means how many decimal bit in sfix16 |
OPEN_LOOP_INIT | 0 | 0 | Start motors in closed loop mode. |
1 | Start motors in open loop mode. | ||
INTERACTIVE_START | 0 | 0 | Normal startup 1: |
1 | User prompted via Nios V/g console at each stage of startup | ||
PWM_DEAD_TIME_NSEC | 2000[VVE3] [WS4] | This is the dead period between switching of the upper and lower power transistors. | |
SENSORLESS_STARTUP_COUNT | 6400UL | Count in sample periods to run in open loop before switching to sensor less. | |
MOTION_TMR_PERIOD | 1 | Period (in OS ticks) for speed or demo timer | |
DBG_DEFAULT | DBG_INFO | DBG_NEVER | No console output. |
DBG_ALWAYS | Always output. | ||
DBG_FATAL | Debug level set to fatal errors. | ||
DBG_ERROR | Debug level set to non-fatal errors and above. | ||
DBG_WARN | Debug level set to warnings and above. | ||
DBG_INFO | Debug level set to information and above. | ||
DBG_PERF | Debug level set to performance data and above. | ||
DBG_DEBUG | Debug level set to debug messages and above. | ||
DBG_DEBUG_MORE | Debug level set to more debug messages and above. | ||
DBG_ALL | Debug level set to all messages. |