How ygbzyem/tdm-4---channel-multiplerxer-demultiplexer works
This repository implements a fixed, counter-driven four-channel TDM RTL datapath and a Python reference-and-check workflow. The main runtime path serializes four input bytes onto one wire, then reconstructs them into channel outputs; the shared counter and top-level timing glue coordinate both sides. The verification branch compares RTL simulation outputs, stream bits, and measured latency against the Python model, then produces reports and an optional workbook. RTL wiring follows the README’s explicit block diagram; Python connections use the shown imports and calls. RTL implementation details beyond the README were not sampled.
Main entry points: compare_output.py RTL Comparison · tdm_top.v Timing Glue · tdm_mux.v Channel Mux · tdm_demux.v Channel Demux
Components 16
TDM RTL
- Timing Counter
src/tdm_counter.v - Timing Glue
src/tdm_top.v - Channel Mux
src/tdm_mux.v - TX Shift Register
src/tx_shift_reg.v - TDM Data Wire
src/tdm_top.v - RX Shift Register
src/rx_shift_reg.v - Channel Demux
src/tdm_demux.v
Reference Model
- Golden Model
golden_model/golden_model.py
Verification
- RTL Comparison
golden_model/compare_output.py - Verification Runner
golden_model/run_verification.py - Frame Check
golden_model/timing_checker.py - Latency Check
golden_model/latency_checker.py - Report Writer
golden_model/report_generator.py - Workbook Export
golden_model/export_excel.py
Other components
- Channel Inputs
- Channel Outputs
Connections 15
- Channel Inputs → Channel Mux: supplies bytes
README.md - Timing Counter → Timing Glue: provides timing
README.md - Timing Glue → Channel Mux: selects channel
README.md - Channel Mux → TX Shift Register: feeds byte
README.md - TX Shift Register → TDM Data Wire: serializes onto
README.md - TDM Data Wire → RX Shift Register: feeds serial data
README.md - RX Shift Register → Channel Demux: provides completed byte
README.md - Timing Glue → Channel Demux: aligns channel selection
README.md - Channel Demux → Channel Outputs: updates channels
README.md - Verification Runner → RTL Comparison: runs comparison
golden_model/run_verification.py - RTL Comparison → Golden Model: computes expected results
golden_model/compare_output.py - RTL Comparison → Frame Check: checks frame length
golden_model/compare_output.py - RTL Comparison → Latency Check: checks measured latency
golden_model/compare_output.py - RTL Comparison → Report Writer: writes report
golden_model/compare_output.py - RTL Comparison → Workbook Export: exports workbook
golden_model/compare_output.py