Mipi-Tutorial PDF Compressed
Mipi-Tutorial PDF Compressed
Spartan-7 SP701
FPGA Evaluation Kit
Demonstration Project
THE FOLLOWING TABLE SHOWS THE REVISION HISTORY FOR THIS DOCUMENT.
- Revision History 2
- Hardware requirements 4
- Software requirements 4
- Project Objectives 4
- Introduction 5
- What is MIPI 6
- MIPI Interfacing 6
- Step 2 8
- Step 3 9
- Step 4 9
- Step 5 10
- Step 6 11
- Software Development 12
- Step 7 12
- Step 8 12
- Step 9 12
- Conclusion 13
- References 13
SOFTWARE REQUIREMENTS
Software development tools used
in the project:
• Xilinx Vivado Design Suite 2019.2 –
Used to develop the FPGA design
• Xilinx Vitis Unified Software
Platform – Used to develop the
software algorithms
• Xilinx Vivado Design Suite - HLS
Edition – Used to develop IP blocks
for implementation in the FPGA
design
PROJECT OBJECTIVES
This project is going to implement a CSI-2-based image-processing system
that outputs images over DSI or HDMI outputs. To demonstrate the capability
of the Spartan-7 FPGA for industrial applications, this solution will also
implement an overlay on the image displaying industrial information such as
temperature, humidity, altitude, etc.
Each MIPI DPHY link may have between one and four Esc Decoder
LP-RX
high-speed serial links operating at up to 2.5 Gbps or 10 Control-in Ctrl Decoder
Gbps across all four lanes. Data transfer over these lanes
occurs at double the data rate and is synchronous to the Control-out
Ctrl State Machine
(Incl. Enables,
IF
clock lane. Logic Selects and
System Ctrl)
LP-CD
CD
Error Detect
MIPI INTERFACING Protocol
Lane Side
Side Lane Control & Interface Logic
Interfacing between the Spartan-7 FPGA and the CSI
and DSI interfaces is very simple thanks to the use of
external resistor networks that enable Spartan-7 IO to be
compatible with the MIPI DPHY standard up to 800 Mbps.
Minimum LP-RX
Low Threshold
HS Diff. Swing
(e.g. 200mV)
HS Common
Level
(e.g. 200mV)
Reference Ground
Step 1
Step 4
To be able to use the Pmod HYGRO, we
need to install the Digilent IP library.
Digilent provides a range of Pmod IPs that
can support Pmod usage in both hardware
and software development using the
Xilinx Vivado Design Suite and Software
Development Kit (SDK).
If you do not have the Pmod libraries
installed, you can install them here. Once
downloaded, add them to the Vivado
library project IP repository.
To complete the design, we now need to create the HLS custom IP module. To create this,
we need to create a new project in Vivado HLS 2019.2
The approach taken in this project is to create an IP core that interfaces with the MicroBlaze
processor over the AXI Lite and with the image-processing system using AXI Stream.
This interfacing is easily controlled using the interfacing pragma and means each of the
interfaces can be implemented as desired. This means the information we wish to display
on the HUD is provided from the MicroBlaze processor into AXI Lite registers. Over AXI Lite,
the MicroBlaze processor can set the following parameters for the HUD:
• Control Register – Stop and start the IP core
Test Image Generated by the HUD IP
• Width – Number of pixels on a line Core and Captured by the Test Bench
• Line – Number of lines in the image
• Char 1 – First character to display on HUD
• Char 2 – Second character to display on HUD
The HUD IP core will output a bounding box around the edge of the screen and display
two characters that can be used to display the humidity or temperature read from the
Pmod HYGRO.
Drawing the text on the screen is quite simple with several small two-dimensional arrays
used. Each array of 11 lines consisting of 10 pixels contains a small representation of
numbers 0 to 9. The HUD display then outputs each pixel multiple times to scale up the
character for display. This enables a small number of block RAMS to be used when the
design is implemented on the FPGA.
To test this IP block, a test bench is created. This enables the output image to be captured
in black and white, showing the border of the image and display of the characters. This
leverages the ability of Vivado HLS to easily integrate and work with Open CV.
Step 7 Step 8
Step 9
Updating the Hardware Specification Output Display Showing the HUD Overlaid on the Image Stream
This project has shown how quickly and easily a low-cost device
can be used to implement a high-performance imaging solution
interfacing with high-speed, high-bandwidth interfaces. This
application also shows how image-processing algorithms – such
as heads-up display – can be implemented in the programmable
logic quickly and easily using high-level synthesis to further
increase performance when limited processing power is available.