SOPC自定义外设(IP)的地址对齐

本文详细解析了SOPC Builder软件中地址对齐的概念,特别是在8.0版本之前支持的动态对齐和静态对齐两种方式。重点讨论了静态对齐可能带来的负面影响,并给出了建议的解决方案。

Native Addressing
  In versions of the SOPC Builder software before v8.0, a slave interface could specify
that it had native addressing. When a master port addresses a slave port with the native
address alignment property, all slave data is aligned on native masteraddress
boundaries. When a master port reads from a narrower slave port, the slave data bits
map to the lower bits of the master data, and the upper master data bits are padded
with zero. During write transfers, the upper bits are ignored. For example, if a 16-bit
master port reads an 8-bit slave port, the readdata signal is of the form 0x00<nn>,
where <n>represents valid data, meaning that each word address as seen by each
master addresses a different word on the slave. When a 32-bit master accesses a 64-bit
slave, the upper 32 bits get coded to 0. Depending on how the slave handles the data,
this coding could have negative side-effects.
With native addressing, the effective address map of the slave is dependent on the
master that is accessing it, and in some cases, the address span of the slave changes as
masters are added to the system. In many cases, extra logic is required to handle
accesses from different masters, leading to increased logic usage and performance
degradation.

Native addressing is now deprecated, meaning that it is still supported by the system
interconnect fabric, but is not recommended for new components.

 

在SOPC Builder 8.0版本以前,地址对齐中有动态对齐(dynamic)和静态对齐(Native)的两个选项,但是现在它不推荐使用静态对齐的方式。

因为静态对齐可能会有副作用(this coding could have negative side-effects)。

 

但是11.0等等新的版本中仍然有这个选项,只是放在deprecated(不推荐)中,而且默认为dynamic的。

 

所以,总结是:

如果,自定义外设需要的数据位宽不是32bit,如8bit,那么推荐两种方式搞定

  1.writedata,readdata为8bit,自定义外设中,配置为Native方式。

  2.writedata,readdata为32bit,只是高24bit无用,自定义外设中,配置为dynamic(优选)或者Native方式。

  在写软件时,IOWR均可正常使用。

转载于:https://www.cnblogs.com/baowenbo/archive/2013/02/27/2934947.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值