NewAMBA PDF
NewAMBA PDF
NewAMBA PDF
Amr Talaat
Eng. Sarah Milad
Faculty of IET
1.1 Protocol:
AMBA AHB-Lite addresses the requirements of high-performance synthesizable designs. It is a bus interface that
supports a single bus master and provides high-bandwidth operation.
AHB-Lite implements the features required for high-performance, high clock frequency systems including:
• burst transfers
• single-clock edge operation
• non-tristate implementation
• wide data bus configurations, 64, 128, 256, 512, and 1024 bits.
Figure 1-1 shows a single master AHB-Lite system design with one AHB-Lite master and three AHB-Lite slaves.
The bus interconnect logic consists of one address decoder and a slave-to-master multiplexor. The decoder
monitors the address from the master so that the appropriate slave is selected and the multiplexor routes the
corresponding slave output data back to the master
Dr. Amr Talaat
Eng. Sarah Milad
Faculty of IET
1.1.1 Master
An AHB-Lite master provides address and control information to initiate read and write operations. Figure
1-2 shows an AHB-Lite master interface.
1.1.2 Slave
An AHB-Lite slave responds to transfers initiated by masters in the system. The slave uses the HSELx select
signal from the decoder to control when it responds to a bus transfer. The slave signals back to the master:
• the success
• failure
• or waiting of the data transfer.
1.1.3 Decoder
This component 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 multiplexor. A single centralized decoder is required in
all AHB-Lite implementations that use two or more slaves.
1.1.4 Multiplexer
A slave-to-master multiplexor is required to multiplex the read data bus and response signals from the slaves to
the master. The decoder provides control for the multiplexor. A single centralized multiplexor is required in all
AHB-Lite implementations that use two or more slaves.
1.2 Operation:
The master starts a transfer by driving the address and control signals. These signal provide information
about the address, direction, width of the transfer, and indicate if the transfer forms part of a burst.
Transfers can be:
• single
• incrementing bursts that do not wrap at address boundaries
• wrapping bursts that wrap at particular address boundaries.
The write data bus moves data from the master to a slave, and the read data bus moves data from a slave to the
master.
In Figure 1-4, master 1 and master 2 each have access to slaves 1, 2, and 3. The multi-layer interconnect must prevent
simultaneous access to a single slave by implementing an arbitration scheme for the three shared slaves. Master 1 does
not require access to slaves 4 and 5, so these two slaves are kept local to master 2. This reduces the complexity of the
multi-layer interconnect component.
2 Signal Description:
2.1 Global signals
3 Transfer
3.1 Basic Transfer
Address: Lasts for a single HCLK cycle unless its extended by the previous bus transfer.
Data: That might require several HCLK cycles. Use the HREADY signal to control the number of clock
cycles required to complete the transfer.
HWRITE controls the direction of data transfer to or from the master. Therefore, when:
HWRITE is HIGH, it indicates a write transfer and the master broadcasts data on the write data bus,
HWDATA[31:0]
HWRITE is LOW, a read transfer is performed and the slave must generate the data on the read data bus,
HRDATA[31:0].
The simplest transfer is one with no wait states, so the transfer consists of one address cycle and one data
cycle. Figure 3-1 shows a simple read transfer and Figure 3-2 shows a simple write transfer.
This simple example demonstrates how the address and data phases of the transfer occur during different clock
cycles. The address phase of any transfer occurs during the data phase of the previous transfer. This overlapping of
address and data is fundamental to the pipelined nature of the bus and enables high performance operation while still
providing adequate time for a slave to provide the response to a transfer.
A slave can insert wait states into any transfer to enable additional time for completion.
For write operations the master holds the data stable throughout the extended cycles.
For read transfers the slave does not have to provide valid data until the transfer is about to complete.
In Figure 3-5:
The transfers to addresses A and C are zero wait state
The transfer to address B is one wait state
Extending the data phase of the transfer to address B has the effect of extending the address phase of the
transfer to address C
Dr. Amr Talaat
Eng. Sarah Milad
Faculty of IET
Note:
After a locked transfer, it is recommended that the master inserts an IDLE transfer.
Most slaves have no requirement to implement HMASTLOCK because they are only capable of performing
transfers the order they are received. Slaves that can be accessed by more than one master, for example, a
Multi Port Memory Controller(MPMC) must implement the HMASTLOCK signal.
Note
The transfer size set by HSIZE must be less than or equal to the width of the data bus. For example, with a 32
bit data bus, HSIZE must only use the values b000, b001, or b010.
Dr. Amr Talaat
Eng. Sarah Milad
Faculty of IET
Use HSIZE in conjunction with HBURST, to determine the address boundary for wrapping bursts.
The HSIZE signals have exactly the same timing as the address bus. However, they must remain constant
throughout a burst transfer.
3.5 Burst Operation
Bursts of 4, 8, and 16-beats, undefined length bursts, and single transfers are defined in this protocol. It
supports incrementing and wrapping bursts.
Incrementing bursts access sequential locations and the address of each transfer in the burst is an
increment of the previous address.
Wrapping bursts wrap when they cross an address boundary. The address boundary is calculated as
the product of the numbers of beats in a burst and the size of the transfer. The number of beats are
controlled by HBURST and the transfer size is controlled by HSIZE.
For example, a four-beat wrapping burst of word (4-byte) accesses wraps at 16-byte boundaries. Therefore, if
the start address of the transfer is 0x34, then it consists of four transfers to addresses 0x34, 0x38, 0x3C, and
0x30.
Masters must not attempt to start an incrementing burst that crosses a 1KB address boundary.
Masters can perform single transfers using either:
SINGLE burst
Undefined length burst that has a burst of length one
Note
The burst size indicates the number of beats in the burst and not the number of bytes transferred.
Calculate the total amount of data transferred in a burst by multiplying the number of beats by the
amount of data in each beat, as indicated by HSIZE[2:0].
All transfers in a burst must be aligned to the address boundary equal to the size of the transfer.
The protocol does not permit a master to end a burst with a BUSY transfer for fixed length bursts of type:
incrementing INCR4, INCR8, and INCR16
Wrapping WRAP4, WRAP8, and WRAP16.
These fixed length burst types must terminate with a SEQ transfer.
The master is not permitted to perform a BUSY transfer immediately after a SINGLE burst. SINGLE bursts
must be followed by an IDLE transfer or a NONSEQ transfer.
3.5.2 Early Burst Termination
Bursts can be terminated by either:
Slave error response
Multi-layer interconnect termination
Because the burst is a four-beat burst of word transfers, the address wraps at 16-byte boundaries, and the transfer
to address 0x3C is followed by a transfer to address 0x30.
Because the burst is an eight-beat burst of word transfers, the address wraps at 32-byte boundaries, and the transfer
to address 0x3C is followed by a transfer to address 0x20. (Because the rule is the low 5 bits of address can changes
since it is 32 byte boundaries)
This burst uses half word transfers, therefore the addresses increase by two. Because the burst is incrementing, the
addresses continue to increment beyond the 16-byte address boundary.
Dr. Amr Talaat
Eng. Sarah Milad
Faculty of IET
Reference:
2006 ARM “AMBA 3 AHB-Lite Protocol”