Lecture 4 On Chip Interfaces 2021
Lecture 4 On Chip Interfaces 2021
2 Adam April
Teman,26, 2021
On-Chip Connecting with
The AMBA Bus
Communication Peripherals
On-Chip Communication
Typical Computing System
• On-Chip Interconnect
• Processors
• IP Blocks
• On Chip Memory
• Off-Chip Interconnect
• Off-chip peripherals
• Off-chip memory
• Off-chip ASICs
• In this lecture, we will focus
on On-Chip Interconnect
Adam April
Teman,26, 2021
Communication Considerations
System-level issues and specifications for choosing communication architecture:
• Communication Bandwidth
• Rate of information transfer (bytes/sec)
• Communication Latency
• Time delay between a request and response
• Application dependent, e.g., Video Streaming vs. two-way communication
• Master and Slave
• Who can control transactions? What can be controlled?
• Concurrency Requirement
• The number of independent simultaneous channels open in parallel.
• Multiple Clock Domains
• Different IPs may operate at different frequencies.
5 Adam April
Teman,26, 2021
System-level Trends
• Heterogeneity among components that need to be interconnected
• Increasing volume and diversity of traffic
• Complexity of
communication logic can
easily compare to a small
microprocessor!
6 Adam April
Teman,26, 2021
Interconnect Scaling Trends
• Global wires scale slower than
transistors/gates
• Gates, local wires scale with technology,
global wires do not
• Global on-chip comm to operation
delay changed from 2:1 to 9:1 over
a few technology generations
Adam April
Teman,26, 2021
On-Chip Communication Architecture Design
Three topics to consider when discussing on-chip communication architecture:
• Communication Topology
• How the communication resources are connected
• Simple shared bus, hierarchical bus structures,
rings, mesh, custom bus networks
• Protocols
• How you manage the communication resources
• Static priority, TDMA, round-robin, token passing
• Mapping of System Communications
• Which components connect where?
• e.g., exploit locality, by putting close
components on same bus Wingard, Kurosawa,
9 IEEE CICC, 1998
Adam April
Teman,26, 2021
On-Chip Connecting with
The AMBA Bus
Communication Peripherals
Connecting with
Peripherals
10
Connecting with Memory
• In our discussion of Microprocessors,
we assumed the existence of external memory components:
• In a Princeton Architecture, one homogenous memory space.
• In a Harvard Architecture, separate channels for Instruction and Data Memory
Source: Wolf,
Princeton Architecture Harvard Architecture Computers as Components
• Therefore, we need a
System Bus.
Source: Greaves, U. Cambridge
13 Adam April
Teman,26, 2021
System Bus
• A collection of signals (wires) to which one or more IP components
(which need to communicate data with each other) are connected.
• In addition to the clock, a synchronous bus consists of:
• An Address Bus
• A Data Bus
• A Control Bus
• In a typical system, the CPU serves
as the bus master (a.k.a. “manager”)
and initiates all transfers. Source: Wolf,
Computers as Components
(e.g., “start operation” command) as well as to transfer data to and from them.
15 Adam April
Teman,26, 2021
Handshaking
• In order to ensure that both devices are ready to communicate over the bus, a
handshaking protocol is required.
• A conceptual handshake protocol utilizes two signals:
• ENQ (enquiry) – from transmitter to receiver
• ACK (acknowledge) – from receiver to transmitter
• The four-cycle handshake process includes:
• Device 1 raises ENQ to initiate transfer
• Device 2 raises ACK, when
ready and transmission can start
• Device 2 lowers ACK to
signal that data was received
• Device 1 lowers ENQ to finish Source: Wolf,
16 Computers as Components
Adam April
Teman,26, 2021
Bus Arbitration
• Only one master can control the bus
• Need some way of deciding who is master
• And some way of making sure the right slave answers
• Arbitration
• Decides which master can use the
shared bus if more than one master
requests bus access simultaneously
• Decoding
• Determines the target for any
transfer initiated by a master
• Tells the right slave to put the
response on the bus
17 Adam April
Teman,26, 2021
Bus Transaction Types
• A transaction on a bus typically involves multiple phases
• Obtaining access to the bus (arbitration phase)
• Sending the address and setting control signals (address phase)
• Sending or receiving the data (data phase)
• Single Transfer
• Simplest transfer mode
• First request for access
to bus from arbiter
• On being granted access,
set address and control signals
• Send data in subsequent cycle
18 Adam April
Teman,26, 2021
Bus Transaction Types
• Burst Transfer
• Send multiple data items, with only a
single arbitration for the entire transaction
• Master must indicate to arbiter it intends
to perform a burst transfer
• Saves time spent for arbitration
• Pipelined Transfer
• Overlap address and data phases
• Only works if separate address and
data buses are present
• Split Transfer
• Read request and reply are split
19 Adam April
Teman,26, 2021
Multi-Level Buses
• A microprocessor system often has more than one bus.
• Complexity: High speed buses are more complex (wider and implement
sophisticated protocols), often not required for simple, slower devices.
• Parallelism: Breaking up the bus can provide less contention between devices
that operate independently.
• A bridge connects two buses:
• Acts as a slave on one bus
(e.g., the fast bus)
• Acts as a master on the second
bus (e.g., the slow bus)
• Provides protocol translation
and speed synchronization.
Source: Wolf,
20 Computers as Components
Adam April
Teman,26, 2021
On-Chip Connecting with
The AMBA Bus
Communication Peripherals
21
What is AMBA?
• The Advanced Microcontroller Bus Architecture (AMBA) is an open-standard,
on-chip interconnect specification for the connection and management of
functional blocks in SoC designs.
• In general:
• AXI = high-speed bus
• AHB = med-speed bus
• APB = low-speed bus
• ACE/CHI =
coherency buses
Source: ARM
Adam April
Teman,26, 2021
AMBA Multi-Level Approach PULPino architecture
https://pulp-platform.org/
Source: ARM
23 Adam April
Teman,26, 2021
The Advanced Peripheral Bus (APB)
• APB is the simple, low performance bus of the AMBA specification
• APB uses the following signals (Master/Slave):
• PCLK: the bus clock source (rising-edge triggered)
• PRESETn: the bus reset signal (active low)
• PADDR: the APB address bus (can be up to 32-bits wide)
• PSELx: the select line for each slave device
• PENABLE: indicates the 2nd cycle of an APB transfer
• PWRITE: indicates transfer direction (Write=H, Read=L)
• PWDATA: the write data bus (can be up to 32-bits wide)
• PREADY: used to extend a transfer
• PRDATA: the read data bus (can be up to 32-bits wide)
• PSLVERR: indicates a transfer error (OKAY=L, ERROR=H)
Source: ARM
24 Adam April
Teman,26, 2021
APB Write Transfer
• Setup Phase:
• Address (PADDR), write data (PWDATA), write signal (PWRITE) and select signal
(PSEL) all change after the rising edge of the clock.
• Access Phase: SETUP ACCESS
PHASE PHASE
• The PENABLE signal rises
and the transfer takes place.
Next address is
provided during
data phase.
30 Adam April
Teman,26, 2021
AHB Burst Transfer
• AHB Supports bursts of different lengths
• Master provides one address and the burst length
• Several operations (W/R) are applied to incrementing addresses
• Allows reducing the overhead of the address phase
Example:
4-beat Write Burst with
single “wait” state.
31 Adam April
Teman,26, 2021
The Advanced eXtensible Interface (AXI)
• AXI is an interface specification that defines the interface of IP blocks,
rather than the interconnect itself.
• AXI supports multiple masters (Managers)
and multiple slaves (Subordinates)
• AXI uses five main channels
(i.e., groups of signals) for communication: Source: ARM
• Example of a more
complex transaction
Source: ARM
36 Adam April
Teman,26, 2021
References
• Anand Raghunathan, ECE 695R: System-on-Chip Design
• https://nanohub.org/courses/ECE695R/o1a
• Lectures 1.7, 4.1, 4.2
• Pasricha, Dutt, “On-Chip Communication Architectures”, 2008
• Flynn, Luk “Computer System Design: System-on-Chip”, 2011
• University of Texas, EE319K Introduction to Embedded Systems
• Circuits Basics “BASICS OF UART COMMUNICATION
• ARM AMBA Bus specifications
• AXI Protocol Overview,
https://developer.arm.com/documentation/102202/0200/AXI-protocol-overview
37 Adam April
Teman,26, 2021