How altera-fpga/agilex-ed-drive-on-chip works
This repository provides modular Drive-On-Chip hardware variants, with Nios V software for motor-drive control. The documented variants cover dual-axis, six-axis, and safety-focused dual-axis systems; the available source tree gives the clearest implementation view of the Nios V control software. Its runtime is organized around application startup and motor tasks, control algorithms, sensing and power-board interfaces, and platform services. Source evidence is incomplete, so uncertain runtime calls are shown as unverified rather than asserted.
Main entry points: motor_task.c Motor task · mc.c Motor control core · common/main.c Application startup · common/main.c Six-axis startup
Components 24
Drive application
- Application startup
custom_user_subsystems/drive_subsystems/software/niosv/common/main.c - Six-axis startup
custom_user_subsystems/drive_subsystems/software/niosv/3x2-axis/common/main.c - Motor task
custom_user_subsystems/drive_subsystems/software/niosv/common/mc/motor_task.c - Six-axis motor task
custom_user_subsystems/drive_subsystems/software/niosv/3x2-axis/common/mc/motor_task.c - Motion task
custom_user_subsystems/drive_subsystems/software/niosv/common/mc/motion_task.c - Console and debug
custom_user_subsystems/drive_subsystems/software/niosv/common/mc/mc_debug.c
Motor control
- Motor control core
custom_user_subsystems/drive_subsystems/software/niosv/common/mc/mc.c - FOC algorithm
custom_user_subsystems/drive_subsystems/software/niosv/common/mc/foc/foc.c - DSP utilities
custom_user_subsystems/drive_subsystems/software/niosv/common/mc/mc_dsp.c - Waveform generation
custom_user_subsystems/drive_subsystems/software/niosv/common/waveform/waveform.c - Motor simulation
custom_user_subsystems/drive_subsystems/software/niosv/common/motorsim/motor.c - DSP hardware interface
custom_user_subsystems/drive_subsystems/software/niosv/common/components/dspba/DF_fixp16_alu_av.c
Drive interfaces
- Power-board ADC
custom_user_subsystems/drive_subsystems/software/niosv/common/platform/powerboard/doc_adc.c - PWM interface
custom_user_subsystems/drive_subsystems/software/niosv/common/components/ssg_emb_pwm.c - Drive state machine
custom_user_subsystems/drive_subsystems/software/niosv/common/components/ssg_emb_dsm.c - Encoder and QEP
custom_user_subsystems/drive_subsystems/software/niosv/common/components/qep/qep.c - Resolver interface
custom_user_subsystems/drive_subsystems/software/niosv/common/components/resolver/AU6805.c
Platform services
- Platform services
custom_user_subsystems/drive_subsystems/software/niosv/common/platform/common/platform.c - Motor types
custom_user_subsystems/drive_subsystems/software/niosv/common/platform/motors/motor_types.c - System monitor
custom_user_subsystems/drive_subsystems/software/niosv/common/os/monitor_task.c - Performance counters
custom_user_subsystems/drive_subsystems/software/niosv/common/perf/altera_avalon_performance_counter.c
Other components
- Drive operator
- Drive variants
- Drive hardware
Connections 23
- Drive operator → Drive variants: selects design
- Drive variants → Application startup: includes software
- Drive variants → Six-axis startup: includes software
- Application startup → Motor task: starts task
- Six-axis startup → Six-axis motor task: starts task
- Motor task → Motor control core: uses control
custom_user_subsystems/drive_subsystems/software/niosv/common/mc/motor_task.c - Motor task → FOC algorithm: uses FOC
custom_user_subsystems/drive_subsystems/software/niosv/common/mc/motor_task.c - Motor task → DSP hardware interface: uses accelerator
custom_user_subsystems/drive_subsystems/software/niosv/common/mc/motor_task.c - Motor task → Console and debug: uses debug
custom_user_subsystems/drive_subsystems/software/niosv/common/mc/motor_task.c - Six-axis motor task → FOC algorithm: uses FOC
custom_user_subsystems/drive_subsystems/software/niosv/3x2-axis/common/mc/motor_task.c - Motor control core → Power-board ADC: reads samples
- Motor control core → PWM interface: sets outputs
- Motor control core → Drive state machine: controls state
- Motor control core → Encoder and QEP: reads position
- Motor control core → Resolver interface: reads position
- Motion task → Waveform generation: uses waveforms
- Motor simulation → Drive hardware: models behavior
- Platform services → Motor types: uses definitions
- System monitor → Platform services: uses services
- Motor task → Performance counters: measures execution
custom_user_subsystems/drive_subsystems/software/niosv/common/mc/motor_task.c - Power-board ADC → Drive hardware: reads signals
- PWM interface → Drive hardware: drives phases
- Drive state machine → Drive hardware: controls drive