반응형

SoC Interconnect

SoC 인터커넥트

3.1 인터커넥트 요구사항

이전에 논의한 바와 같이 SoC에는 많은 수의 재사용 가능한 IP(지적 재산) 블록이 포함되어 있으며, 이를 SoC 인터커넥트를 통해 연결해야 합니다. 인터커넥트는 트랜잭션을 시작하는 트랜잭션 이니시에이터(요청자 또는 관리자)와 타겟(완료자 또는 종속자) 간의 통신을 전달하며, 명령을 시작 IP 블록에서 타겟 블록으로 전달하고 응답을 다시 반환합니다.

전통적으로 이러한 블록은 버스를 사용하여 연결되었지만, 이 용어는 다소 오해의 소지가 있습니다. 현대 SoC에서는 CPU, DMA 컨트롤러 및 DMA를 수행하는 기타 장치 등 여러 이니시에이터가 인터커넥트에 접근해야 하며, 이로 인해 자원 경합과 중재가 필요합니다.

현대 인터커넥트는 종종 시스템 인터커넥트 생성 도구를 사용하여 설계됩니다. 이 도구는 문서, 장치 드라이버 헤더 파일 및 테스트 소프트웨어를 생성하며, 가상 플랫폼용 고수준 ESL 모델에서 사용하는 동일한 설계 파일을 활용합니다.

3.1.1 트랜잭션 유형

인터커넥트가 제공하는 일반적인 트랜잭션 유형은 다음과 같습니다:

  1. 단어 단위 읽기 및 쓰기: 이니시에이터에서 타겟으로 데이터를 이동(쓰기)하거나 타겟에서 이니시에이터로 데이터를 가져오는(읽기) 기본 작업입니다. 바이트 단위로 선택적 업데이트를 위한 레인 플래그를 포함할 수 있습니다.
  2. 비캐시 읽기 및 쓰기: MMU를 통한 캐시 관리가 불가능할 때 I/O 장치를 위한 트랜잭션입니다.
  3. 블록 또는 버스트 전송: 128바이트에서 4kB까지의 대용량 데이터를 한 번의 트랜잭션으로 전송합니다.
  4. 브로드캐스트 및 멀티캐스트 트랜잭션: 동일한 데이터 단어를 동시에 여러 대상에 쓰는 기능입니다.
  5. 원자적 작업: 테스트 앤드 셋(test-and-set) 또는 비교 및 교환(compare-and-swap)과 같은 작업을 위해 필요합니다.
  6. 순차적 일관성: 명령이 특정 순서대로 도착하도록 보장합니다.
  7. 캐시 일관성 메시지: 캐시된 데이터의 유효성을 유지하여 오래된 데이터가 제공되는 것을 방지합니다.
  8. 읽기 선행 또는 웜업 트래픽: 데이터가 필요할 가능성에 대비해 사전에 읽어옵니다.
  9. 디버그 트래픽: 디버그 작업을 위해 별도의 네트워크를 사용하여 시스템 동작에 영향을 최소화합니다.
  10. 구성 작업: 소프트웨어에서 동적으로 기본 주소를 설정할 수 있도록 지원합니다.
  11. 태그된 데이터: 보안 시스템에서 데이터 소유권을 추적하고 트랜잭션과 응답을 연관 짓는 데 사용됩니다.

인터럽트 및 전원 관리 신호는 별도로 전달됩니다. 쓰기 트랜잭션은 일반적으로 성공 시에도 응답 코드를 포함한 확인 메시지를 수신합니다.

3.1.2 잘못된 응답 코드의 원인

다음과 같은 원인으로 오류가 발생할 수 있습니다:

  • 전원이 꺼진 타겟: 꺼진 장치를 액세스 시도할 때 발생합니다.
  • 미사용 주소: 주소 공간 내에 유효하지 않은 위치에 접근할 때 발생합니다.
  • 주소 변환 오류: 잘못된 주소 변환 항목을 참조할 때 발생합니다.
  • 패리티, CRC 또는 ECC 실패: 데이터 무결성 검사 실패 시 발생합니다.
  • 저장-조건 실패: 원자적 작업이 선점되었을 때 발생합니다.
  • 더티 데이터 실패: 캐시 일관성 프로토콜 문제로 발생합니다.
  • 단일 이벤트 업셋(SEU): 방사선으로 인해 실리콘의 비트가 뒤바뀔 때 발생합니다.

3.1.3 인터커넥트 표준

인터커넥트 표준은 트랜잭션을 전달하기 위한 네트와 프로토콜을 정의합니다. SoC 설계의 편의성을 위해 IP 블록이 동일한 표준을 따르는 것이 이상적입니다.

3.1.4 프로토콜 어댑터

프로토콜 어댑터는 버스 표준 간의 차이를 중재합니다. 버퍼링, 너비 변환, 다중화 및 역다중화, 도메인 교차와 같은 작업을 수행할 수 있습니다.

3.1.5 설계 고려사항

설계 시 고려할 주요 요소는 다음과 같습니다:

  • 연결 행렬: 이니시에이터와 타겟 간의 연결 관계를 정의합니다.
  • 처리량(Throughput): 단위 시간당 전송되는 데이터량을 MB/s로 측정합니다.
  • 지연 시간(Latency): 트랜잭션 완료에 걸리는 시간입니다.
  • 트래픽 패턴 분석: 예상되는 트래픽 흐름을 분석하여 성능을 최적화합니다.
  • 전력 소비: 데이터 이동 거리를 줄여 전력 소비를 최소화합니다.
  • 실시간 트래픽 및 QoS: 중요한 작업의 대역폭과 지연 시간을 보장합니다.
  • 교착 상태 방지: 인터커넥트 내에서 교착 상태가 발생하지 않도록 설계합니다.

3.1.6 물리적 제약

현대 SoC는 신호 전파 지연, 배선 저항 증가 등과 같은 문제를 직면합니다. 파이프라인 삽입, 동기 버퍼링, 도메인 교차 로직 등의 기법이 이를 해결합니다.

3.1.7 프로토콜 클래스

인터커넥트는 다음과 같은 방식으로 분류됩니다:

  • 회로 전환(Circuit-switched): 트랜잭션 동안 고정 경로를 사용합니다.
  • 패킷 전환(Packet-switched): 리소스를 동적으로 할당하여 사용합니다.

3.1.8 단순 버스 구조

단순 버스 프로토콜은 다음과 같은 기능을 제공합니다:

  1. 상호 저하 버스: 대상의 지연 시간이 증가할수록 처리량이 감소합니다.
  2. 분할 포트 버스: 요청 및 응답 채널을 분리하여 독립적으로 처리합니다.
  3. 지연 허용 버스: 응답을 기다리는 동안 새로운 명령을 발행할 수 있습니다.
  4. 재정렬 허용 버스: 성능을 위해 응답 순서를 변경할 수 있습니다.

3.1.9 4단계 핸드셰이크

클록 없이 비동기 방식으로 동작하는 손쉬운 프로토콜로, 순서가 보장됩니다.

3.1.10 MSOC1 및 AHB 프로토콜

버스트 전송 및 재시도를 지원하지만 지연 시간이 길면 성능이 저하될 수 있습니다.

3.1.11 표준 동기 핸드셰이크

유효(valid) 및 준비(ready) 신호를 사용하여 동기식으로 데이터를 교환하며, SOF 및 EOF 마커를 통해 프레임을 구분합니다.

3.1.12 다수의 트랜잭션 지원 프로토콜

BVCI 및 AXI와 같은 프로토콜은 명령 및 응답 채널을 분리하여 다수의 트랜잭션을 동시에 처리할 수 있습니다.

3.1.13 정렬 및 비정렬 인터커넥트

비정렬 인터커넥트는 성능을 위해 트랜잭션의 순서를 변경할 수 있으며, 태그를 통해 응답을 관리합니다.

3.1.14 AMBA AXI 인터커넥트

2003년 Arm이 발표한 AMBA AXI 프로토콜은 다섯 개의 채널(읽기 주소, 읽기 데이터, 쓰기 주소, 쓰기 데이터, 쓰기 응답)을 사용하여 효율성을 극대화합니다.

3.1.15 ACE 일관성 확장

ACE는 캐시 일관성을 위해 세 개의 추가 채널(스눕 주소, 스눕 응답, 스눕 데이터)을 추가합니다.

3.1.16 디렉토리 기반 일관성

디렉토리 서버를 통해 캐시 라인의 소유권을 추적하여 불필요한 스눕 트래픽을 줄입니다.

3.1.17 추가 버스 작업

현대 인터커넥트는 다음과 같은 다양한 작업을 지원합니다:

  • LL/SC(load-linked/store-conditional): 낙관적 동시성을 활용한 원자적 작업.
  • 원자적 작업: XOR, MAX, MIN, ADD, BIT-CLR, BIT-SET 등을 포함.
  • 삭제 데이터 채널 및 포이즌 비트: FEC 및 ARQ를 통해 데이터 손상을 처리.
  • 영구적 작업: PoP 보장을 위한 비휘발성 메모리 쓰기.
  • 캐시 유지 관리 작업: 캐시 플러시 등을 포함.
  • 원격 캐시 쓰기: 효율적인 코어 간 통신 지원.
  • 대체 변환 작업: 다양한 주소 변환 매커니즘을 지원.
  • 주변 장치 탐색 작업: 주변 장치의 자동 식별 기능.
  • NoC 유지 관리 작업: NoC의 라우팅 및 흐름 제어 설정.

3.2 기본 인터커넥트 토폴로지

이상적인 SoC 설계 흐름에서는 인터커넥트 토폴로지의 결정이 고수준 설계 단계에서 마지막에 이루어져야 합니다. 설계는 고수준 모델에서 수집한 트래픽 흐름 매트릭스를 기반으로 자동화 또는 반자동화되어야 합니다. 토폴로지가 결정되면, 시스템 인터커넥트 생성기가 구성 요소 IP 블록 및 패브릭 IP 블록(버스 어댑터 및 버스 브리지 등)을 포함하는 모든 RTL을 생성할 수 있습니다. 이 섹션에서는 중재된 버스 및 버스 브리지를 사용하는 기본 토폴로지를 검토합니다. NoC 토폴로지는 3.5절에서 다루겠습니다.

초기 마이크로컴퓨터의 버스는 여러 위치에서 데이터가 들어오고 나갈 수 있는 진정한 버스였습니다. SoC는 트라이-스테이트를 사용하지 않지만, 여전히 IP 블록 간의 포인트 투 포인트 연결을 설명할 때 '버스'라는 용어를 사용합니다. 우리의 MSOC1 프로토콜은 읽기 및 쓰기 데이터 버스를 분리하여 더욱 실용적입니다.

3.2.1 하나의 이니시에이터를 가진 단순 버스

가장 단순한 인터커넥트 토폴로지는 하나의 이니시에이터와 여러 타겟을 갖는 단일 버스를 사용하는 것입니다. 경쟁자가 없으므로 이니시에이터는 버스를 사용할 때 중재가 필요하지 않습니다. 버스 작업은 32비트 단어의 읽기 및 쓰기를 포함합니다. 쓰기 및 주소 버스에는 버퍼링되지 않은 배선을 사용할 수 있지만, 읽기 데이터 및 응답 코드에는 멀티플렉서가 필요합니다.

  • 예: 200 MHz에서 작동하는 32비트 버스는 6.4 Gb/s의 처리량을 달성합니다.
  • 제약 사항: 긴 연결에는 버퍼링이 필요합니다.
  • 핵심 포인트: 처리량은 클럭 주기당 한 단어입니다.

A basic SoC bus structure for the MSOC1 protocol.One initiator addresses three targets (high-level view and detailed wiring)

3.2.2 다수의 이니시에이터를 가진 공유 버스

다수의 이니시에이터가 단일 버스를 공유할 때, 멀티플렉서는 활성 이니시에이터로부터 명령, 주소 및 데이터를 버스로 라우팅합니다. 이때 중재는 필수적입니다.

  • 과제: 버스 처리량이 공유되어 이니시에이터당 사용 가능한 대역폭이 감소합니다.
  • 특징: 원자적 작업을 위해 여러 번의 트랜잭션을 수행할 수 있습니다.
  • 해결 방안: 실시간 성능을 유지하기 위해 최대 버스 점유 시간을 설정합니다.

Example where one of the targets is also an initiator(e.g.aDMAcontroller)

3.2.3 브리지를 이용한 버스 구조

두 버스를 브리지로 연결하면 로컬 트래픽이 유지되는 경우 공간 재사용을 통해 처리량을 두 배로 늘릴 수 있습니다. 브리지는 한쪽에서 수신한 버스 작업을 다른 쪽에서 다시 시작합니다.

  • 기능: 다른 클럭 속도, 프로토콜 및 데이터 폭을 지원합니다.
  • 설계 고려사항: 트래픽 패턴을 분석하여 이니시에이터를 적절히 배치해야 합니다.
  • 예: 브리지를 사용한 버스는 다중 소켓 시스템을 형성하여 더 높은 처리량을 제공할 수 있지만 복잡성이 증가합니다.

A system design using three bridged busses. Each main bus has its own primary initiator (pink), which is typically a CPU, but the bus bridges (green) also initiate transactions

3.2.3.1 버스 브리지 동작

버스 브리지는 주소 변환을 수행하고, 내부 버퍼를 사용하여 쓰기 포스팅을 지원하며, 필요한 경우 캐시 일관성을 유지할 수 있습니다. 보안을 위해 평면 주소 공간을 피할 수 있습니다.

  • NUMA: 비균일 메모리 접근(Non-Uniform Memory Access) 아키텍처를 구현할 수 있습니다.
  • 프로토콜 변환: 버스 브리지는 크기 변경기 또는 프로토콜 변환기로 작동할 수 있습니다.

3.2.3.2 크로스바 스위칭

크로스바 스위치는 여러 입력과 출력을 연결하여 동시에 다수의 트랜잭션을 허용합니다.

  • 방법: 고속 TDM 버스, 크로스바 요소 또는 멀티플렉서를 사용하여 구현됩니다.
  • 제한: 출력 포트 혼잡으로 인해 처리량이 감소할 수 있습니다.
  • 처리량 분석: 균형 잡힌 무작위 트래픽의 경우 포트당 처리량은 1/e1/e에 근접합니다.

Bidirectional bus bridge for the MSOC1 protocol. It has a pair of back-to-back simplex bridges. It could be a single IP block on a single chip, or the two halves could be on different chips with a SERDES(Section3.8) serial link between them

최대 처리량 계산:

최대 처리량=1−(N−1N)N\text{최대 처리량} = 1 - \left(\frac{N-1}{N}\right)^N

  • N=2일 때, 처리량 = 0.75.
  • N이 매우 클 때, 처리량은 1/e≈0.6321/e \approx 0.632에 근접합니다.

시스템의 복잡성이 증가함에 따라 인터커넥트 설계는 처리량, 지연 시간 및 리소스 할당 간의 균형을 유지해야 합니다.


3.1 Interconnect Requirements

As discussed previously, a SoC contains a large number of reusable IP (intellectual property) blocks that need to be connected via a SoC interconnect. The interconnect carries transactions initiated by a transaction initiator (also known as the requester or manager) and served by a target (completer or subordinate). The interconnect conveys commands from an initiating IP block to a target block and returns the response.

Traditionally, these blocks were connected via a bus, but the term has evolved and become somewhat misleading. In modern SoCs, multiple initiators like CPUs, DMA controllers, and devices performing DMA require access to the interconnect, resulting in contention and the need for arbitration.

Modern interconnects are often designed using system interconnect generator tools that generate documentation, device driver header files, and test software. These tools use the same architectural design files employed in high-level ESL models for virtual platforms.

3.1.1 Transaction Types

The types of transactions typically provided by an interconnect are as follows:

  1. Single-word Reads and Writes: Basic operations to move data from an initiator to a target (write) or from a target to an initiator (read). These often include lane flags to selectively update certain bytes.
  2. Uncached Reads and Writes: Common for I/O devices when cache control is not available.
  3. Block or Burst Transfers: Used to transfer larger data blocks (128 bytes to 4kB) as single transactions.
  4. Broadcast and Multicast Transactions: Allow the same data word to be written to multiple destinations simultaneously.
  5. Atomic Operations: Essential in multiprocessor systems for operations like test-and-set or compare-and-swap.
  6. Sequential Consistency: Requires that commands arrive in a specified order.
  7. Cache Consistency Messages: Prevent stale data from being served due to caching.
  8. Read-Ahead or Warm-Up Traffic: Preloads data speculatively for potential use.
  9. Debug Traffic: Debug transactions often use a separate network for transparency.
  10. Configuration Operations: Allow software to configure base addresses dynamically.
  11. Tagged Data for Secure Systems: Track data ownership and associate transactions with responses.

Interrupts and power management signals are conveyed separately. Write transactions typically receive an acknowledgment response even if successful.

3.1.2 Sources of Bad Response Codes

Errors may arise from various sources:

  • Powered-down Targets: Accessing a target that is off.
  • Unused Address: Accessing a non-existent memory location.
  • Address Translation Error: Invalid address translation entry.
  • Parity, CRC, or ECC Failure: Integrity check failures.
  • Store-Conditional Failures: Pre-emption during atomic operations.
  • Dirty Data Failures: Cache consistency protocol issues.
  • Single-Event Upsets (SEU): Radiation-induced bit flips.

3.1.3 Interconnect Standards

Interconnect standards define the set of nets and protocols used to convey transactions. Ideally, all IP blocks follow the same interconnect standard to simplify SoC assembly.

3.1.4 Protocol Adaptors

Protocol adaptors bridge differences between bus standards. They may perform operations like buffering, width conversion, multiplexing, demultiplexing, and domain crossing.

3.1.5 Design Considerations

Key design considerations include:

  • Connectivity Matrix: Maps initiators to targets.
  • Throughput: Data movement rate, measured in MB/s.
  • Latency: Time taken for transaction completion.
  • Traffic Pattern Analysis: Optimizing interconnects based on expected traffic.
  • Energy Consumption: Minimizing power usage based on traffic flows.
  • Real-time Traffic with QoS: Guaranteeing bandwidth and latency for critical tasks.
  • Deadlock Avoidance: Preventing loops and deadlocks in interconnect paths.

3.1.6 Physical Constraints

Modern SoCs face challenges like signal propagation delays and increased wiring resistance due to miniaturization. Techniques like pipeline insertion, synchronous buffering, and domain-crossing logic address these challenges.

3.1.7 Protocol Classes

Interconnects are broadly classified as:

  • Circuit-switched: Uses fixed paths for transaction duration.
  • Packet-switched: Uses resources dynamically.

3.1.8 Simple Bus Structures

Simple bus protocols handle data transfer with varying capabilities:

  1. Reciprocally Degrading Busses: Throughput inversely proportional to target latency.
  2. Split-Port Busses: Separate channels for requests and responses.
  3. Delay-Tolerant Busses: New commands can be issued while responses are pending.
  4. Reorder-Tolerant Busses: Responses may be received out of order for efficiency.

3.1.9 Four-phase Handshake

A classic protocol for simple, lossless, in-order data transfer. It operates asynchronously without a clock.

3.1.10 MSOC1 and AHB Protocols

These synchronous protocols support burst transactions and retries but may suffer from performance degradation under high latency.

3.1.11 Standard Synchronous Handshake

This handshake mechanism uses "valid" and "ready" signals with optional start-of-frame (SOF) and end-of-frame (EOF) markers.

3.1.12 Multiple Outstanding Transaction Protocols

Protocols like BVCI and AXI support multiple outstanding transactions using separate command and response channels.

3.1.13 Ordered and Unordered Interconnects

Out-of-order interconnects support reordering to optimize performance, with tags to track transactions.

3.1.14 AMBA AXI Interconnect

The AMBA AXI protocol, introduced by Arm in 2003, uses five channels (read address, read data, write address, write data, and write response) to maximize efficiency.

3.1.15 ACE Coherency Extensions

ACE extends AXI with three additional channels for cache coherence: snoop address, snoop response, and snoop data.

3.1.16 Directory-based Coherence

This technique uses directory servers to track cache line ownership, reducing snoop traffic.

3.1.17 Additional Bus Operations

Modern interconnects support operations like:

  • Load-linked/Store-conditional (LL/SC): Atomic operations with concurrency control.
  • Atomic Operations: Including XOR, MAX, MIN, ADD, BIT-CLR, and BIT-SET.
  • Erasure Data Channels and Poison: Handling data corruption with FEC and ARQ.
  • Persistent Operations: Writes to non-volatile memory with PoP guarantees.
  • Cache Maintenance Operations (CMO): Includes cache flushes for consistency.
  • Remote Cache Writes: Facilitates efficient inter-core communication.
  • Alternatively Translated Operations: Supports operations with different virtual-to-physical mappings.
  • Peripheral Probe Operations: Allows devices to identify themselves dynamically.
  • NoC Maintenance Operations: For configuring NoC routing and flow control.

3.2 Basic Interconnect Topologies

In an ideal SoC design flow, the topology of the interconnect should be one of the last high-level design decisions. The design should be automated or semi-automated from a traffic flow matrix collected from high-level models. Once the topology is chosen, a system interconnect generator can create all of the RTL, including component IP blocks and fabric IP blocks (such as bus adaptors and bus bridges). In this section, we review basic topologies using arbitrated buses and bus bridges. NoC topologies will be considered in Section 3.5.

The bus in early microcomputers was a true bus where data could get on and off at multiple places. SoCs do not use tri-states but retain the term 'bus' to describe point-to-point connections between IP blocks. Our MSOC1 protocol is practical because it separates read and write data buses.

3.2.1 Simple Bus with One Initiator

The simplest interconnect topology uses a single bus with one initiator and multiple targets. The initiator does not need arbitration since there are no competitors. Bus operations include reads and writes of single 32-bit words. Unbuffered wiring can serve for the write and address buses, but multiplexers are required for read data and response codes.

  • Example: A 32-bit bus operating at 200 MHz achieves a throughput of 6.4 Gb/s.
  • Constraints: Requires buffering for long connections.
  • Key Point: Throughput equals one word per clock cycle.

3.2.2 Shared Bus with Multiple Initiators

When multiple initiators share a single bus, multiplexers route commands, addresses, and data from the active initiator to the bus. Arbitration is necessary to manage contention.

  • Challenges: Bus throughput is shared, reducing available bandwidth per initiator.
  • Features: Atomic actions may require holding the bus for multiple transactions.
  • Mitigation: Set a maximum bus holding time to maintain real-time performance.

3.2.3 Bridged Bus Structures

Bridging two buses can double throughput via spatial reuse if traffic remains localized. A bridge reinitiates bus operations from one side to the other.

  • Capabilities: Supports different clock speeds, protocols, and data widths.
  • Design Considerations: Traffic patterns must be analyzed to position initiators effectively.
  • Example: Bridged buses may form multi-socket systems with higher throughput but increased complexity.

3.2.3.1 Bus Bridge Operations

Bus bridges can translate address spaces, support write posting with internal buffers, and maintain cache coherency if needed. Secure systems may avoid flat address spaces to reduce the attack surface.

  • NUMA: Systems may implement Non-Uniform Memory Access architectures for performance.
  • Protocol Conversion: A bus bridge can act as a resizer or protocol converter.

3.2.3.2 Crossbar Switching

Crossbar switches connect multiple inputs and outputs, allowing concurrent transactions without fabric contention.

  • Methods: Implemented via high-capacity TDM buses, crossbar elements, or multiplexers.
  • Limitations: Output port contention can reduce throughput.
  • Throughput Analysis: For balanced random traffic, throughput per port approximates 1/e1/e for large crossbars.

Maximum Throughput Calculation:

Maximum throughput=1−(N−1N)N\text{Maximum throughput} = 1 - \left(\frac{N-1}{N}\right)^N

  • For N=2, throughput = 0.75.
  • For large N, throughput approaches 1/e≈0.6321/e \approx 0.632.

As system complexity increases, interconnect design requires balancing throughput, latency, and resource allocation to ensure efficient SoC operation.

반응형

+ Recent posts