How renzel/clockvga works
Project Type and Purpose
• This is an FPGA‐based VGA‐display clock.
• It generates a time display on a VGA monitor, using button/keyboard inputs and BCD/ASCII conversion.
File Structure
• TopClock.vhd: top‑level entity that instantiates all submodules.
• ClockNBtn.vhd: clock generator + button (or keyboard) interface.
• Bcd.vhd: binary‑to‑BCD converter for time digits.
• (Missing but implied) ASCII/binary converter: maps BCD digits to pixel patterns.
• vga_sync.vhd: VGA timing generator (HSYNC/VSYNC, blanking, pixel clock).
Core Components
a. Input Interfaces
– External 50 MHz (or board) clock input
– Push‑button or PS/2 keyboard lines
b. Clock & Debounce Module (ClockNBtn)
– Divides the board clock to a 1 Hz tick
– Debounces button or decodes keyboard scan codes
c. Time Encoding Module (Bcd)
– Converts binary time counter to four BCD digits (HH:MM)
d. Character Generator / ASCII Module
– Takes BCD digits, maps each “character” to an 8×8 pixel pattern in a ROM or lookup table
e. Video Buffer / Pixel Streamer (optional)
– Assembles pixel patterns into a raster‐scanable stream
f. VGA Synchronization Module (vga_sync)
– Generates HSYNC / VSYNC, blanking signals, pixel‐clock enable
g. TopClock (top‑level)
– Wires everything together, assigns FPGA pins for VGA analog outputs (R,G,B,HS,VS) and inputs
Architectural Patterns
• Pipeline flow from time base → digit encoding → video pipeline → VGA adapter.
• Modular VHDL hierarchy: TopClock sits at root, each submodule is a leaf node.
• Synchronous domains (pixel clock vs. system clock).
Technologies and Interfaces
• VHDL modules mapped to FPGA fabric.
• VGA analog interface (R,G,B DACs + HS/VS).
• PS/2 keyboard or GPIO push‑button interface.
Final Checklist
[ ] All major modules from the file tree are represented.
[ ] Connections between modules are complete and labeled.
[ ] Input pins (clock, button/keyboard) and output pins (VGA) are shown.
[ ] Data flows (time data and video data) are clearly distinguished.
[ ] Boundaries of clock domains are marked (50 MHz vs. pixel clock).