Skip to content

Latest commit

Β 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ AMBA AXI4 Memory Controller


πŸ“– Overview

This project implements a simplified AMBA AXI4 Memory Controller in Verilog HDL, providing an interface between an AXI4-compliant master and an internal synchronous memory.

The controller features independent Read and Write Finite State Machines (FSMs), burst transaction handling, address generation logic, and a modular memory interface. The design follows the AXI4 VALID/READY handshake protocol and has been functionally verified through simulation in Xilinx Vivado.


🎯 Objectives

  • βœ… Implement an AXI4-compliant memory controller
  • βœ… Design independent Read and Write FSMs
  • βœ… Support burst-based memory transactions
  • βœ… Interface an internal synchronous RAM
  • βœ… Verify functionality through simulation
  • βœ… Build a reusable RTL design

✨ Features

  • βœ… AXI4 Write Address Channel
  • βœ… AXI4 Write Data Channel
  • βœ… AXI4 Write Response Channel
  • βœ… AXI4 Read Address Channel
  • βœ… AXI4 Read Data Channel
  • βœ… Independent Read & Write FSMs
  • βœ… Incrementing Burst (INCR) Support
  • βœ… Parameterized Design
  • βœ… Internal Memory Interface
  • βœ… Burst Counter
  • βœ… Address Generation Logic
  • βœ… AXI VALID/READY Handshake
  • βœ… Simulation Testbench

πŸ—οΈ Project Architecture

The design consists of three major blocks:

  • πŸ”Ή AXI4 Interface
  • πŸ”Ή Memory Controller
  • πŸ”Ή Internal Memory Array

The controller accepts AXI transactions, processes burst information, generates memory control signals, and returns protocol-compliant responses.


πŸ“‚ Project Structure

AMBA_AXI4_Memory_Controller
β”‚
β”œβ”€β”€ rtl/
β”‚   β”œβ”€β”€ axi4_memory_controller.v
β”‚   β”œβ”€β”€ memory_array.v
β”‚   └── axi_pkg.vh
β”‚
β”œβ”€β”€ testbench/
β”‚   └── tb_axi4_memory_controller.v
β”‚
β”œβ”€β”€ images/
β”‚   β”œβ”€β”€ projectarchitecture.png
β”‚   β”œβ”€β”€ WriteFSMdiagram.png
β”‚   β”œβ”€β”€ ReadFSMDiagram.png
β”‚   β”œβ”€β”€ memoryinterfacediagram.png
β”‚   β”œβ”€β”€ schematic.png
β”‚   └── waveform.png
β”‚
└── README.md

βš™οΈ Module Description

🧠 AXI4 Memory Controller

Responsible for:

  • Address decoding
  • Burst handling
  • Read/Write FSM control
  • Memory interface generation
  • AXI response generation

πŸ’Ύ Memory Array

Implements an internal synchronous RAM.

Functions include:

  • Memory initialization
  • Synchronous writes
  • Synchronous reads
  • 32-bit data storage

πŸ§ͺ Testbench

The verification environment performs:

  • Reset generation
  • Write transaction verification
  • Read transaction verification
  • Burst transfer testing
  • Waveform analysis

πŸ”„ Write FSM

🟒 WR_IDLE

  • Wait for AWVALID
  • Capture address
  • Store burst parameters

⬇️

🟑 WR_DATA

  • Accept write data
  • Generate memory write enable
  • Increment address
  • Update burst counter

⬇️

πŸ”΅ WR_RESP

  • Generate write response
  • Wait for BREADY
  • Return to idle

πŸ“– Read FSM

🟒 RD_IDLE

  • Wait for ARVALID
  • Capture read address

⬇️

🟑 RD_MEM

  • Generate memory read request

⬇️

πŸ”΅ RD_DATA

  • Return read data
  • Assert RVALID
  • Complete transaction

πŸ”Œ Memory Interface

Signal Description
πŸ“ mem_addr Memory address
✍️ mem_write_en Write enable
πŸ“– mem_read_en Read enable
πŸ“¦ mem_write_data Data written to RAM
πŸ“€ mem_read_data Data returned from RAM

πŸ“ˆ Burst Address Generation

The controller currently supports Incrementing Burst (INCR) transactions.

Next Address = Current Address + (1 << AWSIZE)

Example:

0x20
 ↓
0x24
 ↓
0x28
 ↓
0x2C

πŸ§ͺ Simulation

Simulation performed using:

  • πŸ› οΈ Xilinx Vivado 2022.2
  • πŸ–₯️ XSim Simulator

Verified functionality includes:

  • βœ… Reset sequence
  • βœ… AXI handshakes
  • βœ… Write transactions
  • βœ… Memory writes
  • βœ… Burst counter
  • βœ… Address increment
  • βœ… Write responses
  • βœ… Read request generation
  • βœ… FSM transitions

πŸ“Š Schematic

The waveform demonstrates:

  • AXI VALID/READY handshaking
  • Write state transitions
  • Read state transitions
  • Burst address updates
  • Memory interface activity
  • Internal RAM operations

βœ”οΈ Verification Summary

Feature Status
Reset βœ…
Write Address βœ…
Write Data βœ…
Memory Write βœ…
Burst Counter βœ…
Address Increment βœ…
Write Response βœ…
Read Request βœ…
FSM Operation βœ…
Simulation βœ…

🚧 Current Limitations

The project demonstrates the core architecture and protocol flow of an AXI4 Memory Controller.

Current areas identified for future enhancement include:

  • πŸ”Έ Improved synchronization of memory read timing
  • πŸ”Έ Full support for FIXED and WRAP burst types
  • πŸ”Έ Byte-enable (WSTRB) implementation
  • πŸ”Έ AXI error response handling
  • πŸ”Έ Multiple outstanding transactions
  • πŸ”Έ Dual-port memory support
  • πŸ”Έ FPGA hardware validation

πŸš€ Future Improvements

  • πŸ”Ή AXI4-Lite variant
  • πŸ”Ή Configurable memory depth
  • πŸ”Ή Configurable burst lengths
  • πŸ”Ή Dual-port RAM
  • πŸ”Ή ECC memory
  • πŸ”Ή Performance counters
  • πŸ”Ή SystemVerilog Assertions (SVA)
  • πŸ”Ή UVM Verification Environment
  • πŸ”Ή FPGA deployment

πŸ“š Learning Outcomes

This project strengthened practical understanding of:

  • πŸ’‘ RTL Design
  • πŸ’‘ Verilog HDL
  • πŸ’‘ AMBA AXI4 Protocol
  • πŸ’‘ Finite State Machines
  • πŸ’‘ Burst Transactions
  • πŸ’‘ Memory Controller Design
  • πŸ’‘ Synchronous RAM
  • πŸ’‘ Digital Verification
  • πŸ’‘ Waveform Debugging

πŸ› οΈ Tools & Technologies

Category Tool
πŸ’» HDL Verilog
πŸ–₯️ Simulator XSim
πŸ› οΈ IDE Xilinx Vivado 2022.2
🌱 Version Control Git
πŸ“‚ Repository GitHub

πŸ‘©β€πŸ’» Author

Archita Roy

πŸŽ“ B.Tech in Electronics & Communication Engineering
πŸ›οΈ National Institute of Technology Silchar

πŸ“„ License

Licensed under the MIT License.


πŸ™ Acknowledgements

This project was developed as part of my RTL Design and Computer Architecture portfolio to strengthen practical understanding of the AMBA AXI4 protocol, memory controller design, FSM-based control logic, and digital hardware verification.

About

RTL implementation of an AMBA AXI4 Memory Controller in Verilog HDL.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages