# abdelrahmanadwe/fir_filter architecture

> Architecture diagram of the GitHub repository abdelrahmanadwe/fir_filter, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/abdelrahmanadwe/fir_filter
- Repository: https://github.com/abdelrahmanadwe/fir_filter

## Overview

This repository provides a parameterized FIR-filter hardware IP and an end-to-end DSP simulation. The main hardware workflow accepts AXI4-Stream samples, filters them through a pipelined fixed-point datapath, and buffers the output; an AXI4-Lite register file configures coefficients and runtime controls. The documented simulation separately models analog input, ADC quantization, FIR processing, DAC conversion, and sinc reconstruction. RTL source excerpts were not provided, so hardware relationships below rely on the README’s architecture description; simulation flow is supported by the excerpted script.

Main entry points: [`rtl/fir_filter_top.sv`](https://github.com/abdelrahmanadwe/fir_filter/blob/main/rtl/fir_filter_top.sv) (FIR IP Top), [`rtl/axi4_lite_regfile.sv`](https://github.com/abdelrahmanadwe/fir_filter/blob/main/rtl/axi4_lite_regfile.sv) (AXI Lite Register File), [`rtl/fir_core_pipelined.sv`](https://github.com/abdelrahmanadwe/fir_filter/blob/main/rtl/fir_core_pipelined.sv) (Pipelined FIR Core), [`tb/end_to_end_dsp_chain.py`](https://github.com/abdelrahmanadwe/fir_filter/blob/main/tb/end_to_end_dsp_chain.py) (ADC Model)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interfaces["Hardware Interfaces"]
  node_fir_top["FIR IP Top<br/>[fir_filter_top.sv]"]
  node_regfile[("AXI Lite Register File")]
  node_skid["Output Skid Buffer"]
end

subgraph group_datapath["Filter Datapath"]
  node_fir_core["Pipelined FIR Core"]
  node_adder["Adder Tree Stage<br/>[fir_adder_stage.sv]"]
end

subgraph group_simulation["DSP Simulation"]
  node_analog_input["Analog Signal"]
  node_adc["ADC Model"]
  node_fir_sim["Fixed-Point FIR Model"]
  node_dac["DAC Model"]
  node_reconstruction["Sinc Reconstruction"]
  node_comparison["Signal Comparison"]
  node_golden["Golden FIR Model"]
end

node_stream_actor(("Stream Source"))
node_control_actor(("Control Master"))

node_stream_actor -->|"sends samples"| node_fir_top
node_control_actor -->|"configures"| node_regfile
node_fir_top -->|"integrates control"| node_regfile
node_fir_top -->|"routes samples"| node_fir_core
node_fir_top -->|"routes output"| node_skid
node_regfile -->|"supplies config"| node_fir_core
node_fir_core -->|"uses stages"| node_adder
node_analog_input -->|"is quantized"| node_adc
node_adc -->|"provides codes"| node_fir_sim
node_fir_sim -->|"provides codes"| node_dac
node_dac -->|"provides voltages"| node_reconstruction
node_reconstruction -->|"is evaluated"| node_comparison

click node_fir_top "https://github.com/abdelrahmanadwe/fir_filter/blob/main/rtl/fir_filter_top.sv"
click node_regfile "https://github.com/abdelrahmanadwe/fir_filter/blob/main/rtl/axi4_lite_regfile.sv"
click node_skid "https://github.com/abdelrahmanadwe/fir_filter/blob/main/rtl/axi_stream_skid_buffer.sv"
click node_fir_core "https://github.com/abdelrahmanadwe/fir_filter/blob/main/rtl/fir_core_pipelined.sv"
click node_adder "https://github.com/abdelrahmanadwe/fir_filter/blob/main/rtl/fir_adder_stage.sv"
click node_analog_input "https://github.com/abdelrahmanadwe/fir_filter/blob/main/tb/end_to_end_dsp_chain.py"
click node_adc "https://github.com/abdelrahmanadwe/fir_filter/blob/main/tb/end_to_end_dsp_chain.py"
click node_fir_sim "https://github.com/abdelrahmanadwe/fir_filter/blob/main/tb/end_to_end_dsp_chain.py"
click node_dac "https://github.com/abdelrahmanadwe/fir_filter/blob/main/tb/end_to_end_dsp_chain.py"
click node_reconstruction "https://github.com/abdelrahmanadwe/fir_filter/blob/main/tb/end_to_end_dsp_chain.py"
click node_comparison "https://github.com/abdelrahmanadwe/fir_filter/blob/main/tb/end_to_end_dsp_chain.py"
click node_golden "https://github.com/abdelrahmanadwe/fir_filter/blob/main/tb/fir_golden_model.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_fir_top,node_regfile,node_skid toneBlue
class node_fir_core,node_adder toneAmber
class node_analog_input,node_adc,node_fir_sim,node_dac,node_reconstruction,node_comparison,node_golden toneMint
class node_stream_actor,node_control_actor toneIndigo
```

## Components

### Hardware Interfaces

- [FIR IP Top](https://github.com/abdelrahmanadwe/fir_filter/blob/main/rtl/fir_filter_top.sv): `rtl/fir_filter_top.sv`
- [AXI Lite Register File](https://github.com/abdelrahmanadwe/fir_filter/blob/main/rtl/axi4_lite_regfile.sv): `rtl/axi4_lite_regfile.sv`
- [Output Skid Buffer](https://github.com/abdelrahmanadwe/fir_filter/blob/main/rtl/axi_stream_skid_buffer.sv): `rtl/axi_stream_skid_buffer.sv`

### Filter Datapath

- [Pipelined FIR Core](https://github.com/abdelrahmanadwe/fir_filter/blob/main/rtl/fir_core_pipelined.sv): `rtl/fir_core_pipelined.sv`
- [Adder Tree Stage](https://github.com/abdelrahmanadwe/fir_filter/blob/main/rtl/fir_adder_stage.sv): `rtl/fir_adder_stage.sv`

### DSP Simulation

- [Analog Signal](https://github.com/abdelrahmanadwe/fir_filter/blob/main/tb/end_to_end_dsp_chain.py): `tb/end_to_end_dsp_chain.py`
- [ADC Model](https://github.com/abdelrahmanadwe/fir_filter/blob/main/tb/end_to_end_dsp_chain.py): `tb/end_to_end_dsp_chain.py`
- [Fixed-Point FIR Model](https://github.com/abdelrahmanadwe/fir_filter/blob/main/tb/end_to_end_dsp_chain.py): `tb/end_to_end_dsp_chain.py`
- [DAC Model](https://github.com/abdelrahmanadwe/fir_filter/blob/main/tb/end_to_end_dsp_chain.py): `tb/end_to_end_dsp_chain.py`
- [Sinc Reconstruction](https://github.com/abdelrahmanadwe/fir_filter/blob/main/tb/end_to_end_dsp_chain.py): `tb/end_to_end_dsp_chain.py`
- [Signal Comparison](https://github.com/abdelrahmanadwe/fir_filter/blob/main/tb/end_to_end_dsp_chain.py): `tb/end_to_end_dsp_chain.py`
- [Golden FIR Model](https://github.com/abdelrahmanadwe/fir_filter/blob/main/tb/fir_golden_model.py): `tb/fir_golden_model.py`

### Other components

- **Stream Source**
- **Control Master**

## Connections

- Stream Source → FIR IP Top: sends samples (evidence: `README.md`)
- Control Master → AXI Lite Register File: configures (evidence: `README.md`)
- FIR IP Top → AXI Lite Register File: integrates control (evidence: `README.md`)
- FIR IP Top → Pipelined FIR Core: routes samples (evidence: `README.md`)
- FIR IP Top → Output Skid Buffer: routes output (evidence: `README.md`)
- AXI Lite Register File → Pipelined FIR Core: supplies config (evidence: `README.md`)
- Pipelined FIR Core → Adder Tree Stage: uses stages (evidence: `README.md`)
- Analog Signal → ADC Model: is quantized (evidence: `tb/end_to_end_dsp_chain.py`)
- ADC Model → Fixed-Point FIR Model: provides codes (evidence: `tb/end_to_end_dsp_chain.py`)
- Fixed-Point FIR Model → DAC Model: provides codes (evidence: `tb/end_to_end_dsp_chain.py`)
- DAC Model → Sinc Reconstruction: provides voltages (evidence: `tb/end_to_end_dsp_chain.py`)
- Sinc Reconstruction → Signal Comparison: is evaluated (evidence: `tb/end_to_end_dsp_chain.py`)
