SNU AI System Hardware Design Project - Lab 01, Lecture 7
- A Verilog Image I/O Simulator
- Take Bitmap Image using OV7670 and Arduino
- Convert Bitmap Image to HEX file
- Read HEX file and save it to the memory (SensorModel)
- Read HEX file and write a new Bitmap Image (DisplayModel)
- Icarus Verilog (https://github.com/steveicarus/iverilog)
- GTKWave (https://gtkwave.sourceforge.net/)
- Upload getImage.ino to Arduino
- Run ReadSerialPortWin.exe to generate image.bmp
- Run image2hex.c or .m to generate image.hex
iverilog -o module fsm_image_sensor.v fsm_image_sensor_tb.v && vvp module && gtkwave wave.vcd
iverilog -o module display_model.v display_model_tb.v && vvp module
Generates Bitmap Image
- Upload to Arduino (Tested with Arduino R3)
- Run on Windows to get bitmap image (240*320, 32-bit)
- You should save captured image to the same folder as 'image.bmp'
Generates Hexfile to the same folder
- A MatLab Code that converts bitmap image to RGB24 hexcode.
- A C Code that converts bitmap image to RGB24 hexcode.
Read Hexfile and save it to the memory
- Read Hexcode from '../Image2Hex/image.hex' and loads it into the memory (org_R, org_G, org_B)
- Reads 2 pixels in a single cycle
- RGB Values will be always same since image.bmp is a grayscale image
- Generates ctrl_done when the task completed.
- Defines FSM state transitions, moving from ST_IDLE to ST_VSYNC, ST_HSYNC, and ST_DATA sequentially.
- START_UP_DELAY and HSYNC_DELAY to ensure stable running.
- Integrate sensor_model and fsm_controller to a fsm_image_sensor
- Generates 50MHz Clock
- Controls HRESETn signal
Read Hexfile and write a new Bitmap Image
- Read Hexcode from '../Image2Hex/image.hex'
- Generates buffer header
- Write buffer header and pixel data to the 'image_out.bmp'
- Generates 50MHz Clock
- Controls HRESETn signal
See LICENSE for details.