# gajaredarsh/qpsk-modulator-and-demodulator-on-fpga architecture

> Architecture diagram of the GitHub repository gajaredarsh/qpsk-modulator-and-demodulator-on-fpga, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-15). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/gajaredarsh/qpsk-modulator-and-demodulator-on-fpga
- Repository: https://github.com/gajaredarsh/qpsk-modulator-and-demodulator-on-fpga

## Overview

This repository is a Python golden-model simulation of a QPSK digital communication chain intended to support an FPGA project. A bit source and QPSK modulator generate a carrier-based signal; the simulated AWGN channel adds noise; receiver mixing and FIR filtering recover I/Q samples; symbol integration and decisions recover bits; and the runner evaluates BER, plots results, and exports hardware-oriented vectors. The graph also includes shared parameters and fixed-point utilities. Some documented capabilities, including channel internals, are represented by their source paths but were not sampled directly.

Main entry points: [`python_codes/main.py`](https://github.com/gajaredarsh/qpsk-modulator-and-demodulator-on-fpga/blob/main/python_codes/main.py) (End-to-end runner), [`python_codes/fixedpoint.py`](https://github.com/gajaredarsh/qpsk-modulator-and-demodulator-on-fpga/blob/main/python_codes/fixedpoint.py) (Fixed-point utilities), [`python_codes/tx_nco.py`](https://github.com/gajaredarsh/qpsk-modulator-and-demodulator-on-fpga/blob/main/python_codes/tx_nco.py) (TX modulator), [`python_codes/rx_frontend.py`](https://github.com/gajaredarsh/qpsk-modulator-and-demodulator-on-fpga/blob/main/python_codes/rx_frontend.py) (RX downconverter)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_transmit["Transmit"]
  node_bit_source["PRBS bit source<br/>[tx_nco.py]"]
  node_qpsk_mapper["QPSK mapper<br/>[tx_nco.py]"]
  node_nco["Carrier NCO<br/>[tx_nco.py]"]
  node_tx_mixer["TX modulator<br/>[tx_nco.py]"]
end

subgraph group_channel["Channel"]
  node_channel_model["AWGN channel<br/>[channel.py]"]
  node_noise_modes["Noise modes<br/>[channel.py]"]
end

subgraph group_receive["Receive"]
  node_rx_mixer["RX downconverter<br/>[rx_frontend.py]"]
  node_fir["FIR filter<br/>[rx_frontend.py]"]
  node_symbol_decisions["Symbol decisions<br/>[rx_backend_eval.py]"]
end

subgraph group_model["Model and evaluation"]
  node_runner["End-to-end runner<br/>[main.py]"]
  node_ber_analysis["BER analysis<br/>[rx_backend_eval.py]"]
  node_visualizations["Plots<br/>[rx_backend_eval.py]"]
  node_vector_export["Vector export<br/>[rx_backend_eval.py]"]
  node_fixedpoint["Fixed-point utilities<br/>[fixedpoint.py]"]
  node_parameters["Shared parameters<br/>[params.py]"]
end

node_user(("Simulation user"))

node_user -->|"runs"| node_runner
node_runner -->|"generates bits"| node_bit_source
node_runner -->|"maps symbols"| node_qpsk_mapper
node_runner -->|"generates carrier"| node_nco
node_runner -->|"modulates"| node_tx_mixer
node_runner -->|"adds noise"| node_channel_model
node_runner -->|"selects noise"| node_noise_modes
node_runner -->|"downconverts"| node_rx_mixer
node_runner -->|"filters"| node_fir
node_runner -->|"decodes symbols"| node_symbol_decisions
node_runner -->|"evaluates BER"| node_ber_analysis
node_runner -->|"creates plots"| node_visualizations
node_runner -->|"exports vectors"| node_vector_export
node_runner -->|"uses quantization"| node_fixedpoint
node_tx_mixer -->|"reads settings"| node_parameters
node_rx_mixer -->|"quantizes samples"| node_fixedpoint
node_fir -->|"uses quantization"| node_fixedpoint
node_symbol_decisions -->|"writes hex"| node_fixedpoint

click node_runner "https://github.com/gajaredarsh/qpsk-modulator-and-demodulator-on-fpga/blob/main/python_codes/main.py"
click node_bit_source "https://github.com/gajaredarsh/qpsk-modulator-and-demodulator-on-fpga/blob/main/python_codes/tx_nco.py"
click node_qpsk_mapper "https://github.com/gajaredarsh/qpsk-modulator-and-demodulator-on-fpga/blob/main/python_codes/tx_nco.py"
click node_nco "https://github.com/gajaredarsh/qpsk-modulator-and-demodulator-on-fpga/blob/main/python_codes/tx_nco.py"
click node_tx_mixer "https://github.com/gajaredarsh/qpsk-modulator-and-demodulator-on-fpga/blob/main/python_codes/tx_nco.py"
click node_channel_model "https://github.com/gajaredarsh/qpsk-modulator-and-demodulator-on-fpga/blob/main/python_codes/channel.py"
click node_noise_modes "https://github.com/gajaredarsh/qpsk-modulator-and-demodulator-on-fpga/blob/main/python_codes/channel.py"
click node_rx_mixer "https://github.com/gajaredarsh/qpsk-modulator-and-demodulator-on-fpga/blob/main/python_codes/rx_frontend.py"
click node_fir "https://github.com/gajaredarsh/qpsk-modulator-and-demodulator-on-fpga/blob/main/python_codes/rx_frontend.py"
click node_symbol_decisions "https://github.com/gajaredarsh/qpsk-modulator-and-demodulator-on-fpga/blob/main/python_codes/rx_backend_eval.py"
click node_ber_analysis "https://github.com/gajaredarsh/qpsk-modulator-and-demodulator-on-fpga/blob/main/python_codes/rx_backend_eval.py"
click node_visualizations "https://github.com/gajaredarsh/qpsk-modulator-and-demodulator-on-fpga/blob/main/python_codes/rx_backend_eval.py"
click node_vector_export "https://github.com/gajaredarsh/qpsk-modulator-and-demodulator-on-fpga/blob/main/python_codes/rx_backend_eval.py"
click node_fixedpoint "https://github.com/gajaredarsh/qpsk-modulator-and-demodulator-on-fpga/blob/main/python_codes/fixedpoint.py"
click node_parameters "https://github.com/gajaredarsh/qpsk-modulator-and-demodulator-on-fpga/blob/main/python_codes/params.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_bit_source,node_qpsk_mapper,node_nco,node_tx_mixer,node_user toneBlue
class node_channel_model,node_noise_modes toneAmber
class node_rx_mixer,node_fir,node_symbol_decisions toneMint
class node_runner,node_ber_analysis,node_visualizations,node_vector_export,node_fixedpoint,node_parameters toneRose
```

## Components

### Transmit

- [PRBS bit source](https://github.com/gajaredarsh/qpsk-modulator-and-demodulator-on-fpga/blob/main/python_codes/tx_nco.py): `python_codes/tx_nco.py`
- [QPSK mapper](https://github.com/gajaredarsh/qpsk-modulator-and-demodulator-on-fpga/blob/main/python_codes/tx_nco.py): `python_codes/tx_nco.py`
- [Carrier NCO](https://github.com/gajaredarsh/qpsk-modulator-and-demodulator-on-fpga/blob/main/python_codes/tx_nco.py): `python_codes/tx_nco.py`
- [TX modulator](https://github.com/gajaredarsh/qpsk-modulator-and-demodulator-on-fpga/blob/main/python_codes/tx_nco.py): `python_codes/tx_nco.py`

### Channel

- [AWGN channel](https://github.com/gajaredarsh/qpsk-modulator-and-demodulator-on-fpga/blob/main/python_codes/channel.py): `python_codes/channel.py`
- [Noise modes](https://github.com/gajaredarsh/qpsk-modulator-and-demodulator-on-fpga/blob/main/python_codes/channel.py): `python_codes/channel.py`

### Receive

- [RX downconverter](https://github.com/gajaredarsh/qpsk-modulator-and-demodulator-on-fpga/blob/main/python_codes/rx_frontend.py): `python_codes/rx_frontend.py`
- [FIR filter](https://github.com/gajaredarsh/qpsk-modulator-and-demodulator-on-fpga/blob/main/python_codes/rx_frontend.py): `python_codes/rx_frontend.py`
- [Symbol decisions](https://github.com/gajaredarsh/qpsk-modulator-and-demodulator-on-fpga/blob/main/python_codes/rx_backend_eval.py): `python_codes/rx_backend_eval.py`

### Model and evaluation

- [End-to-end runner](https://github.com/gajaredarsh/qpsk-modulator-and-demodulator-on-fpga/blob/main/python_codes/main.py): `python_codes/main.py`
- [BER analysis](https://github.com/gajaredarsh/qpsk-modulator-and-demodulator-on-fpga/blob/main/python_codes/rx_backend_eval.py): `python_codes/rx_backend_eval.py`
- [Plots](https://github.com/gajaredarsh/qpsk-modulator-and-demodulator-on-fpga/blob/main/python_codes/rx_backend_eval.py): `python_codes/rx_backend_eval.py`
- [Vector export](https://github.com/gajaredarsh/qpsk-modulator-and-demodulator-on-fpga/blob/main/python_codes/rx_backend_eval.py): `python_codes/rx_backend_eval.py`
- [Fixed-point utilities](https://github.com/gajaredarsh/qpsk-modulator-and-demodulator-on-fpga/blob/main/python_codes/fixedpoint.py): `python_codes/fixedpoint.py`
- [Shared parameters](https://github.com/gajaredarsh/qpsk-modulator-and-demodulator-on-fpga/blob/main/python_codes/params.py): `python_codes/params.py`

### Other components

- **Simulation user**

## Connections

- Simulation user → End-to-end runner: runs (evidence: `README.md`)
- End-to-end runner → PRBS bit source: generates bits (evidence: `python_codes/main.py`)
- End-to-end runner → QPSK mapper: maps symbols (evidence: `python_codes/main.py`)
- End-to-end runner → Carrier NCO: generates carrier (evidence: `python_codes/main.py`)
- End-to-end runner → TX modulator: modulates (evidence: `python_codes/main.py`)
- End-to-end runner → AWGN channel: adds noise (evidence: `python_codes/main.py`)
- End-to-end runner → Noise modes: selects noise (evidence: `README.md`)
- End-to-end runner → RX downconverter: downconverts (evidence: `python_codes/main.py`)
- End-to-end runner → FIR filter: filters (evidence: `python_codes/main.py`)
- End-to-end runner → Symbol decisions: decodes symbols (evidence: `python_codes/main.py`)
- End-to-end runner → BER analysis: evaluates BER (evidence: `python_codes/main.py`)
- End-to-end runner → Plots: creates plots (evidence: `python_codes/main.py`)
- End-to-end runner → Vector export: exports vectors (evidence: `python_codes/main.py`)
- End-to-end runner → Fixed-point utilities: uses quantization (evidence: `python_codes/main.py`)
- TX modulator → Shared parameters: reads settings (evidence: `python_codes/tx_nco.py`)
- RX downconverter → Fixed-point utilities: quantizes samples (evidence: `python_codes/rx_frontend.py`)
- FIR filter → Fixed-point utilities: uses quantization (evidence: `python_codes/rx_frontend.py`)
- Symbol decisions → Fixed-point utilities: writes hex (evidence: `python_codes/rx_backend_eval.py`)
