Demonstrating the sensor interface through SPI IP with Zynq 7000 SoC using the block design method and implementation of FIR filter in the processor core.
│
├───images
│ filter_in_action.png
│ tool_flow_bd.png
│
├───vitis
│ Filter.c
│ Filter.h
│ main.c
│ pmod_nav.c
│ SPI.c
│ SPI.h
│
└───vivado
design_1.bda
design_1.xdc
design_1_wrapper_sensors.xsa
-
Create a new vivado projet and add the
design_1.xdcwhich is a constraints file for the Pmod NAV used in this project. If using the same, copy or else this needs to be mapped custom for your sensor peripheral. -
Refer to the block design from the
design_1.bdafile. -
Go to
File -> Export -> Hardware Filewhich essentially gives thedesign_1_wrapper_sensors.xsa. If you want to experiment around the Vitis platform only, take this as your portable platform for the Vitis project creation. -
Import all the source and header files to your Vitis source folder. The project is generalized for implementing FIR, IIR, Moving Average filters. Choose the required filter from the
Filter.hthrough the compile time switcher defined. The existing code calls theNavDemo_Run();in the main loop that prints the data into serial terminal which is in thepmod_nav.cfile throughFIRFilter_Update(&lpfAcc, nav.acclData.X);andprintf("%.2f,%.2f\n",nav.acclData.X,lpfAcc.out);calls. You may want to overlook this and use the function as per the requirement.
| Legend | |
|---|---|
| Red | Green |
| Unfiltered | Filtered |

