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均可正常使用。