AN 999: Drive-on-Chip with Functional Safety Design Example: Agilex™ 7 Devices
ID
823627
Date
7/04/2024
Public
Visible to Intel only — GUID: qpp1716373914004
Ixiasoft
1. About the Drive-on-Chip with Functional Safety Design Example for Agilex™ 7 Devices
2. Getting Started
3. Rebuilding the Drive-on-Chip Design
4. Functional Description of the Drive-On-Chip with Functional Safety Design Example for Agilex 7 Devices
5. HPS Channel Safety Software
6. Drive-on-Chip Design Recommendations and Disclaimers
7. Document Revision History for AN 999: Drive-on-Chip with Functional Safety Design Example for Agilex 7 Devices
2.1. Software Requirements for the Drive-On-Chip with Functional Safety Design Example for Agilex 7 Devices
2.2. Hardware Requirements for the Safe Drive-On-Chip with Functional Safety Design Example for Agilex 7 Devices
2.3. Downloading and Installing the Design
2.4. Installing Python
2.5. Creating an SD Card Image
2.6. Setting Up your Development Board for the Drive-On-Chip with Functional Safety Design Example for Agilex 7 Devices
2.7. Debugging and Monitoring the Drive-On-Chip with Functional Safety Design Example for Agilex 7 Devices with Python GUI
2.8. Looking into the Drive-On-Chip Output
3.1. Generating the Platform Designer System
3.2. Generating and Building the NiosV/g BSP for the Drive-On-Chip Design Example
3.3. Compiling the Hardware in the Intel Quartus Prime Software
3.4. Modifying the Motor Control Software Application
3.5. Generating .jic and .rbf files After Hardware Modifications
3.6. Recreate an SD Card Image
3.7. Modifying the HPS Safety Function Application
Visible to Intel only — GUID: qpp1716373914004
Ixiasoft
5.2.5. Access to Devices
You must specify all the devices for the HPS safety function application and safety channel in the agilex7_dk_si_agf014ea_custom.dtsi with the addresses from the HPS view. After the Yocto build completes, the information about the devices is in /sys/class/uio/uioX according to the order in the .dtsi file. The HPS safety function application finds the device and access the filesystem using the corresponding /dev/uioX
The helper functions that access registers and memory spaces of these devices are in <project>/hps_software/src/devices
- drive_on_chip.c/.h: functions to write and read information from doc_safety_dump memory for visualization of safety parameters in the GUI. Also functions to access any device connected to the lightweight HPS to FPGA bridge, if necessary, e.g. changing the speed of the axis.
- fpga_speed_est.c/.h: functions to clear the over speed latch in the FPGA channel after safe state clearance.
- hps_gpio.c/h: functions to read and write to the hps_fpga_gpio to provide HPS safety outputs to the external safety logic (speed comparison and overspeed) and receive the output of the of the external safety logic (motor power down). Routines to indicate safe state to the external safety logic from the HPS safety channel.
- interval_timer.c/h: functions to control the interval timer, set free running, clear timeout signals, set the timer count.
- qep_encoder.c: functions to get the quadrature encoder pulse count for speed estimation.
- safe_memory.c/.h: functions to write and read information from the share memory (shared_mem) and to cross compare payloads produced by both safety channels.
- scan_devices.c/h: a set of helper functions to determine the location, name, addresses, and offsets of the required devices. Also to get a pointer to handle the access to base memory. Devices must be mapped in the DTS as UIO devices.