简体   繁体   English

ARM - 使用16位数据总线获取32位数据

[英]ARM - Fetching 32 bits of data using 16-bit data bus

On our embedded platform, some devices have a 16-bit data bus (such as the FPGA). 在我们的嵌入式平台上,一些器件具有16位数据总线(例如FPGA)。 However, we need to read them as 32-bit values (such as 32-bit floating point). 但是,我们需要将它们读取为32位值(例如32位浮点)。

My understanding is that when the 16-bit memory is accessed by a 32-bit data load instruction (LDR), the ARM processor will perform 2 16-bit fetches to assemble a 32-bit quantity. 我的理解是,当通过32位数据加载指令(LDR)访问16位存储器时,ARM处理器将执行2个16位读取以组装32位数量。

Is this correct? 这个对吗?

For example, I would like the ARM processor to load a uint32_t value from the device with 16-bit data bus without having to make 2 uint16_t reads then combine the uint16_t values into one uint32_t variable. 例如,我希望ARM处理器从具有16位数据总线的设备加载uint32_t值,而不必进行2次uint16_t读取,然后将uint16_t值合并到一个uint32_t变量中。

Do we need to explicitly fetch as 2 16-bit quantities and then assemble as a 32-bit quantity? 我们是否需要显式获取2个16位数量,然后组装为32位数量?

What ARM documents contain this clarification? 哪些ARM文档包含此澄清?

Are there any specific ARM configuration settings for the ARM to make 2 fetches from a 16-bit data bus to form a 32-bit quantity (in a register)? ARM是否有任何特定的ARM配置设置可以从16位数据总线进行2次读取以形成32位数量(在寄存器中)?

FYI: We are using an ARM Cortex A8 and the IAR EW IDE/Compiler. 仅供参考:我们正在使用ARM Cortex A8和IAR EW IDE /编译器。
The platform is running is "system" mode and not "thumb" mode. 平台运行的是“系统”模式而不是“拇指”模式。

If you are accessing memory, when the CPU required 32-bit of memory, it will request it directly (Cortex-A8 does not support 16-bit busses). 如果要访问内存,当CPU需要32位内存时,它将直接请求它(Cortex-A8不支持16位总线)。 Some peripheral (In the system) is responsible for converting the 32-bit request to 16-bit to adapt to the bus (Doing 2 transfers). 某些外设(在系统中)负责将32位请求转换为16位以适应总线(执行2次传输)。

It means that for the CPU is should be totally transparent. 这意味着CPU应该是完全透明的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM