您好,欢迎来到钮旅网。
搜索
您的当前位置:首页rapidio学习使用过程摘抄

rapidio学习使用过程摘抄

来源:钮旅网

基础介绍


串行RapidIO针对高性能嵌入式系统芯片间和板间互连而设计,它将是未来十几年中嵌入式系统互连的最佳选择。
本文比较RapidIO和传统互连技术的优点;介绍RapidIO协议架构,包格式,互连拓扑结构以及串行RapidIO物理层规范。介绍串行RapidIO在无线基础设施方面的应用。

RapidIO 与传统嵌入互连方式的比较
随着高性能嵌入式系统的不断发展,芯片间及板间互连对带宽、成本、灵活性及可靠性的要求越来越高,传统的互连方式,如处理器总线、PCI总线和以太网,都难以满足新的需求 。

协议逻辑层一些说明

逻辑层定义了操作协议和相应的包格式。RapidIO支持的逻辑层业务主要是:直接IO/DMA (Direct IO/Direct Memory Access)和消息传递(Message Passing)。

直接IO/DMA模式是最简单实用的传输方式,其前提是主设备知道被访问端的存储器映射。在这种模式下,主设备可以直接读写从设备的存储器。直接IO/DMA在被访问端的功能往往完全由硬件实现,所以被访问的器件不会有任何软件负担。

直接IO/DMA模式又可进一步分为以下几种传输格式:
NWRITE: 写操作,不要求接收端响应。
NWRITE_R: 带响应的NWRITE(NWRITE with Response),要求接收端响应。
SWRITE:流写(Stream Write),数据长度必须是8字节的整数倍,不要求接收端响应。
NREAD: 读操作。
SWRITE是最高效的传输格式;带响应的写操作或读操作效率则较低,一般只能达到不带响应的传输的效率的一半。
消息传递(Message Passing)模式则类似于以太网的传输方式,它不要求主设备知道被访问设备的存储器状况。数据在被访问设备中的位置则由邮箱号(类似于以太网协议中的端口号)确定。从设备根据接收到的包的邮箱号把数据保存到对应的缓冲区,这一过程往往无法完全由硬件实现,而需要软件协助,所以会带来一些软件负担。
对上层应用来说,发起消息传递主要需提供以下参数:目地器件ID、数据长度、邮箱号。

包格式说明


重点是这个图

我使用设备的相关功能

文档说明

IP文档分为2个部分,分别为GRIO_Datasheet和RapidIO to AXI Bridge Controller_Datasheet,两个文档分别说明整个IP的2个部分功能。从下面图可以明确的区分两个部分,ULI的左边Generic RapidIO Conterllr 简称GRIO右边为RapidIO to AXI Bridge Controller_Datasheet简称RAB。

GRIO (Generic RapidIO Conterllr) 简介

GRIO is partitioned into inbound and outbound blocks, and these blocks are further partitioned into three implementation layers:
1.Physical Layer
2.Logical Layer

对于软件来说该部分主要在初始化阶段会接触到,比如与PHY相关的初始化,链路状态,主从初始化等,后续数据传输基本不用再修改这个部分的设置和寄存器。细节在后续GRIO 程序分析的文章中我再认真分析初始化的相关过程。

从输出方向来看相关的内容,输入方向类似。

RapidIO 互连规范。 物理 PCS 和物理协议层主要解决 RapidIO 互连规范中标题为“LP-Serial Physical层”。 在 GRIO 中,逻辑层实现了逻辑和传输层协议规范。

Physical Layer 物理层


SERDES分为PCS(物理编码子层)和PMA(物理媒介附属子层)两层,其中PCS是由纯数字电路组成,可以用软逻辑来实现,而PMA则既包括了数字电路,也包括了模拟电路,不能用纯逻辑实现。

Physical PCS功能

PCS功能
Physical PCS
1.BRC1 and BRC2
• Provides alignment of the received bit stream to 10b code-group boundaries
• 8b/10b Encoding and Decoding
2.BRC3
• Provides alignment of the received bit stream to 67b code-group boundaries
• B/67B Encoding and Decoding

Physical Protocol功能

该部分主要和底层的LVDS PHY 相连。
The Physical Layer protocol defines a full duplex LP-Serial and 8/16 bit LP-LVDS physical layer interface (link) between devices using unidirectional differential signals in each direction. It implements a protocol for link management and packet transport over a link.

Logical Protocol Layer逻辑层

基本属性
• Supports RIO Logical and Common Transport Layer functionality
• Supports both Input/Output Logical and Message Passing Logical protocols
• Supports up to 256 Bytes data payload
• Supports /128/256-bit internal data path
• Supports pipelined ULI
• Supports all transport sizes (DevID 8/DevID 16/DevID 32)
• Supports 34-bit and 50-bit (hardware configurable) addressing
• Supports hardware-configurable outstanding unacknowledged RIO transactions
• Supports all transaction flows and all priorities
• Supports encapsulation of RIO packet
基本功能:
The Logical Layer implements the logical and transport layer protocols. It controls the ordering of the received and transmitted packets and exchanges flow control information with the
Logical Layer of the device on the other side of the link.
1.Sends and receives packets between Physical Layer and ULI controller
2.Controls the ordering of the received and transmitted packets
3.Exchanges flow control information with the Logical Layer of the device on the other side of the link

RAB (RapidIO to AXI Bridge )介绍

其实RAB 这个部分GRIO部分容易明白,他的功能主要实现的是下面一些传输功能,特别时一些传输映射窗口的设置容易让人比较混乱。对应RAB 后续的文章描述会说明,主要会分为初始化、 PIO设置(APIO和RIO映射关系的设置),DMA操作、Message 生成和处理几个部分来说。

The AXI-RIO Bridge connects to RapidIO on one side and AMBA sub system on the other side. The following types of transfers are supported
1.AXI PIO (AXI Slave): Request is transferred from AXI to RapidIO. The bridge acts as AXI Write/Read Slave and RapidIO Initiator.
2.RIO PIO (AXI Master): Request is transferred from RapidIO to AXI. The bridge acts as RapidIO Target and AXI Write/Read Master. Additionally it handles optional Inbound and Outbound Messaging.
3.Write DMA (optional): Data is transferred from AXI to RapidIO. The bridge acts as AXI Read Master and RapidIO Write Initiator
4.Read DMA (optional): Data is transferred from RapidIO to AXI. The bridge acts as RapidIO Read Initiator and AXI Write Master.
5.Data Message (Optional): For Inbound Data messaging Bridge acts as RapidIO target and AXI Write Master. It also sends out responses towards RapidIO Fabric as RapidIO Initiator. For Outbound Data message it acts as AXI Read Master and RapidIO initiator.
6.Doorbell (Optional): For Inbound DB Bridge acts as RapidIO target and optionally either as AXI Write Master or APB CSR Slave or none (generates physical signal for Inbound DB). For Outbound Doorbell, it acts as APB CSR Slave and RapidIO initiator.
7.Data Stream (Optional): For Inbound Data Stream Bridge acts as RapidIO target and AXI Write Master. For Outbound Data Stream it acts as AXI Read Master and RapidIO initiator.In addition, RapidIO Configuration Space and device specific Control/Status/Debug register can be accessed by either RapidIO Host through RapidIO link, or AXI Master through AXI Write/Read
Slave Interface (or APB interface)

我使用IP 中的RIO 配置

PIO 空间是什么

RAPIDIO 地址和AXI总线地址映射关系(AXI PIO Mode)

RAPIDIO地址对应AXI地址转换(RIO PIO Mode)

需要特殊注意的地方LCSBA1CSR 可能会影响到RIO PIO 的空间

Local Configuration Space Base Address (LCSBA0CSR,LCSBA1CSR),该部分将一段的RAPIDIO空间用于访问RAPIDIO本地寄存器。该空间可能和RPIO的空间重合,所以当出现部分RPIO 不能访问的时候需要注意是不是和这两个寄存器空间有冲突。

RPIO

AXI 地址对应RAPIDIO地址转换(AXI PIO Mode)

DMA可以不需要考虑APIO

DMA读取时不需要考虑本芯片的RPIO

DMA进行读取的时候,当对端返回DMA读数据写入内存时。经过测试respons带数据返回的内容不受RPIO的接收窗口的。

信号预加重


因篇幅问题不能全部显示,请点此查看更多更全内容

Copyright © 2019- niushuan.com 版权所有 赣ICP备2024042780号-2

违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务