[TR] Digilent Basys 3 FPGA kartı üzerinde bilgisayar veya harici cihazlarla seri haberleşme (RS-232/USB-UART) sağlayan, FSM tabanlı, parazit filtreli ve parametrik UART Alıcı (RX) ve Verici (TX) tasarımı.
[EN] A robust, parameterizable UART Transceiver (TX & RX) core in VHDL implemented on the Digilent Basys 3 FPGA board for serial communication (RS-232/USB-UART) with PCs and microcontrollers.
| Parametre / Parameter | Değer / Value | Açıklama (TR) | Description (EN) |
|---|---|---|---|
| Target Board | Digilent Basys 3 | ||
| Clock Input | 100 MHz | Dahili sistem osilatörü | On-board system oscillator |
| Default Baudrate | 9600 bps | Generic parametre ile ayarlanabilir | Configurable via generic parameter |
| RX Oversampling | Mid-Bit (x1) | Bit ortasından kararlı örnekleme | Mid-bit center sampling for noise margin |
| Noise Filtering | False Start Check | 2 Kademeli Senkronizör + Glitch Filtresi | 2-Stage Synchronizer + Glitch Rejection |
| Hardware I/O | 8 Switches, 16 LEDs | Switch'lerle TX verisi, LED'lerde RX tamponu | Switches for TX, 16 LEDs for RX history |
[TR]
- UART Verici (
uart_tx.vhd): Buton tetiklemesiyle (tx_start) 8 bitlik veriyi (din_i) alır; Start biti ('0'), veriler (LSB'den başlayarak) ve Stop bitini ('1') ayarlanan baudrate süresince sırayla hatta iletir. - UART Alıcı (
uart_rx.vhd):- Senkronizör: Dış dünyadan gelen asenkron
rx_ihattını metastabiliteye karşı 2 saat vuruşu boyunca senkronize eder. - Sahte Start Biti Koruması: Start bitinin tam ortasında (
c_bittimerlim / 2) hattı tekrar kontrol eder; parazit/gürültü varsa okumayı iptal edip bekleme durumuna döner. - Veri Örnekleme: Her veri bitini tam ortasından örnekleyerek kaydırmalı yazmaca (
shreg) alır ve 1 saat vuruşlukrx_done_tick_obayrağı üretir.
- Senkronizör: Dış dünyadan gelen asenkron
- Üst Modül Entegrasyonu (
top.vhd):- Butondan gelen iletim komutu
debouncefiltresinden geçirilerek tek darbe üretilir. - Bilgisayardan gelen her yeni byte alt 8 LED'e yazılırken, bir önceki byte üst 8 LED'e kaydırılır (16-bit FIFO geçmişi).
- Butondan gelen iletim komutu
[EN]
- UART Transmitter (
uart_tx.vhd): Transmits an 8-bit word upon a debounced pulse. Drives Start bit ('0'), data bits (LSB first), and Stop bits ('1') at the configured baud rate. - UART Receiver (
uart_rx.vhd):- Synchronizer: Resolves metastability on the asynchronous
rx_ipin using a 2-stage flip-flop chain. - False Start Bit Rejection: Inspects the line at the middle of the Start bit (
c_bittimerlim / 2); aborts immediately if a transient glitch is detected. - Mid-Bit Sampling: Samples each data bit strictly at the center of the bit duration, storing them in a shift register and generating a clean
rx_done_tick_opulse.
- Synchronizer: Resolves metastability on the asynchronous
- Top-Level Integration (
top.vhd):- Transmit trigger pushbutton is debounced and edge-detected.
- Received bytes are stored and shifted across 16 board LEDs (
LED[15:0]), forming a two-byte visual history buffer.
Tasarım Vivado Simulator kullanılarak iki bağımsız birim testiyle doğrulanmıştır:
(The transceiver was verified through two modular testbenches in Vivado Simulator):
[TR] x"51" ve x"A3" paketlerinin bit sınırları, 2 Stop biti (tx_done_tick_o darbesi doğrulanmıştır.
[EN] Simulated at x"51" and x"A3", 2 Stop bits (tx_done_tick_o completion pulse.
[TR] x"43" ve x"A5" paketlerinin tam ortalarından örneklenerek hatasız çözüldüğü ve her paket sonunda rx_done_tick_o darbesinin kalktığı doğrulanmıştır.
[EN] Verified at x"43" and x"A5" are accurately sampled at bit centers and asserted via rx_done_tick_o with zero framing errors.
[TR] Basys 3 kartı USB kablosu ile bilgisayara bağlanmış; Seri Terminal (hterm) üzerinden 9600 baud hızında çift yönlü haberleşme test edilmiştir:
- Bilgisayardan FPGA'e (RX): Klavyeden basılan karakterler kart üzerindeki 16 LED üzerinde ikilik tabanda anında görüntülenmiştir.
- FPGA'den Bilgisayara (TX): Kart üzerindeki 8 switch ile belirlenen byte değeri butona basıldığında terminal ekranına hatasız yazdırılmıştır.
[EN] Implemented on Basys 3 and connected to a PC via USB-UART running at 9600 baud:
- PC to FPGA (RX): Keystrokes sent from the serial terminal (hterm) are displayed on the 16 on-board LEDs in binary.
- FPGA to PC (TX): Byte values configured on the 8 slide switches are transmitted to the PC terminal upon pressing the trigger button.
uart.webm
├── constrs_1/
│ └── Basys-3-Master.xdc # FPGA pin bağlantıları / Constraints file
├── sim_1/
│ ├── tb_uart_tx.vhd # UART TX birim testi / TX Unit testbench
│ └── tb_uart_rx.vhd # UART RX birim testi / RX Unit testbench
├── sources_1/
│ ├── uart_tx.vhd # UART Verici modülü / Transmitter core
│ ├── uart_rx.vhd # UART Alıcı modülü / Receiver core
│ ├── debounce.vhd # Buton filtre modülü / Button debouncer
│ └── top.vhd # Sistem entegrasyonu / Top-level wrapper
└── README.md # Proje dokümantasyonu / Project documentation