RTL Design of AHB Protocol
RTL Design of AHB Protocol
RTL Design of AHB Protocol
com/in/asimkhan-vlsi
AHB implements the features required for high-performance, high clock frequency systems including:
o Burst transfers.
o Single clock-edge operation.
o Non- tristate implementation.
o Wide data bus configurations.
The most common slaves are internal memory devices, external memory interface, and high-bandwidth
peripherals.
This block diagram shows only single master AHB system design with the AHB master and 3AHB slaves. The bus
interconnect logic consists of one address decoder and a slave to master multiplexer. The decoder monitors the
address from the master so that the appropriate slave is selected and the multiplexer routes the corresponding
slave output data back to the master.
While AHB also support multi master designs by the use of an interconnect component that provides arbitration
and routing signals from different masters to the appropriate slaves.
[Note Only the main address and data buses and typical data routing are shows in this block diagram.]
1
Visit – https://www.linkedin.com/in/asimkhan-vlsi
master =>
A master provides address and control information to initiate read and write operations. Below diagram
shows a master interface.
Slave =>
A slave responds to transfers initiated by master in the systems. The slave uses the HSELx select signal
from the decoder to control when it responds to a bus transfer.
The slave signal back to the master:
o The completion or extension of the bus transfer.
o The success or failure of the bus transfer.
Interconnect =>
An interconnect provides the connection between masters and slaves in a system.
• In case of single master system only requires the use of a Decoder and Multiplexer.
• While in case of multi master system requires the use of an interconnect that provides arbitration and the
routing of signals from different masters to the appropriate slaves. The routing is required for address,
control, and write data signals.
Decoder =>Decoder decodes the address of each transfer and provides a select signal for the slave that is
involved in the transfer. It also provides a control signal to the multiplexer.
A single centralized decoder is required in all implementations that use two or more slaves.
2
Visit – https://www.linkedin.com/in/asimkhan-vlsi
Multiplexer =>
A slave to master multiplexer is required to multiplex the read data bus and response signals from
the slaves to the master. The decoder provides control for the multiplexer.
A single centralized multiplexer is required in all implementations that use two or more slaves.
Signal Descriptions
Name Destination Description
Global Signals
HCLK The bus clock times all bus transfers. All signal timings are related to the rising
edge of HCLK.
HRESETn The bus reset signal is active LOW and resets the system and the bus. This is
the only active LOW signal.
Master Signals
HADDR [31:0] Slave and The 32-bit system address bus.
Decoder
HBURST [2:0] Slave The burst indicates if the transfer is a single transfer or forms parts of burst.
Fixed length bursts of 4, 8, 16 beats are supported.
HMASTERLOCK Slave When HIGH indicates that the current transfer is part of a locked sequence.
It has the same thing as the address and control signals.
HPROT Slave The protection control signals provide additional information about a bus
access and indicate how an access should handle within a system.
HSIZE [2:0] Slave Indicates the size of the transfer, that is typically byte, halfword, or word.
This protocol allows for larger transfer sizes up to a maximum of 1024 bits.
HMASTER [3:0] Access Master identifier. Generated by a master if it has multiple Exclusive capable
monitor threads.
HTRANS [1:0] Slave Indicates the transfer type of the current transfer. This can be: IDLE, BUSY,
SEQUENTIAL, NONSEQUENTIAL.
HWDATA [31:0] Slave The write data bus transfers data from the master to the slaves during write
operations.
HWRITE slave Indicates the transfer direction. When HIGH this signal indicates a write
transfer and when LOW a read transfer.
Slave Signals
HRDATA [31:0] MUX During read operations, the read data bus transfers data from the selected
Slave to the multiplexer. The multiplexer then transfers the data to the master.
HREADYOUT MUX When HIGH, the HREADYOUT signal indicates that a transfer has finished on
the Bus. This signal can be driven LOW to extract a transfer.
HRESP MUX The transfer response, after passing through the multiplexer, provides the
Master with additional information on the status of a transfer.
Decoder Signals
HSELx Slave Each slave has its own slave signal HSELx and this signal indicates that the
current transfer is intended for the selected slave. When the slave in initially
selected, it must also monitor the status of HREADY to ensure that previous
bus transfer has completed, before it responds to the current transfer.
The HSELx signal is a combinatorial decode of the address bus.
Multiplexer Signals
HRDATA [31:0] Master Read data bus, selected by the decoder.
HREADY Master and When HIGH, the HREADY signal indicates to the master and all slaves, that the
Slave previous transfer is complete.
HRESP Master Transfer response, selected by the decoder.
3
Visit – https://www.linkedin.com/in/asimkhan-vlsi
Transfers
1. Basic Read Transfer =>
4
Visit – https://www.linkedin.com/in/asimkhan-vlsi
5
Visit – https://www.linkedin.com/in/asimkhan-vlsi
Tools =>
Schematic: Quartus Prime (FSM viewer), Xilinx Vivado
Simulator – Xilinx Vivado
Simulation Result=>
1. Decoder waveform
2. Multiplexer waveform
6
Visit – https://www.linkedin.com/in/asimkhan-vlsi
7
Visit – https://www.linkedin.com/in/asimkhan-vlsi
8
Visit – https://www.linkedin.com/in/asimkhan-vlsi
2. Slave1
3. Slave2
4. Slave3
9
Visit – https://www.linkedin.com/in/asimkhan-vlsi
5. Slave4
10