CFAR-algorithm_SOCA-GOCA_

CFAR Algorithm Project

Project Overview

This project implements two types of CFAR (Constant False Alarm Rate) algorithms: SOCA (Smallest Of Cell Averaging) and GOCA (Greatest Of Cell Averaging). The project is organized into four main folders, each serving a specific purpose related to the implementation and testing of these algorithms.

Folder Structure

1. DataForGui

2. MatlabGuiGoldenRef

3. RTL_SV

4. Screens

5. FIL

How to Run the Project

MATLAB GUI

  1. Open file.mat in MATLAB.
  2. Run cfar_app.m to execute the CFAR algorithm.
  3. Open and run app1.mlapp to launch the GUI and tune the CFAR parameters for both SOCA and GOCA.

HDL Implementation

  1. Use a hardware description language simulator such as Questasim.
  2. Load the following files from the RTL_SV folder:
    • cfar_algorithm.sv: The main CFAR algorithm implementation.
    • cfar_tb.sv: The test bench for the CFAR algorithm.
    • detect_if.sv: The interface between the DUT and the test bench.
    • top.sv: The top-level module integrating the DUT and the test bench.
  3. Simulate the design and verify the results against the screenshots provided in the Screens folder.

FPGA in the Loop (FIL) Simulation

  1. Open the Simulink file in the FIL folder to connect with the FPGA
  2. press double click on the fil block then browse on the .sof file and press load and apply.
  3. Use the provided MATLAB scripts to prepare inputs for Simulink and running the simulation and retrieve the results from the FPGA.

Contributing

If you would like to contribute to this project, please fork the repository and use a feature branch. Pull requests are warmly welcome.