通用寄存器是否一般都映射为存储器? [英] Do general purpose registers are generally memory mapped?

查看:79
本文介绍了通用寄存器是否一般都映射为存储器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对内存映射"和内存映射的I/O"非常困惑.例如在ARM体系结构r0,r1等中的通用寄存器是否通常进行内存映射?请帮忙.

I am very confused with Memory Map and Memory mapped I/O. Do general purpose registers for example in ARM Architecture r0, r1, and etc are generally memory mapped? Please help.

推荐答案

否,这些寄存器位于实际的CPU(或多核CPU的CPU内核)内部.您无法通过内存访问它们.

No, those registers are inside the actual CPU (or CPU core for multi-core CPUs). You can not access them through memory.

内存映射寄存器是您可以通过地址或指针(使用具有指针的语言)进行访问的寄存器.I/O设备通常具有内存映射寄存器,您可以在其中写入或读取特定地址来设置或获取信息或数据.换句话说,它们的访问方式就像其他任何内存(例如RAM)一样.

A memory-mapped register is something which you access through an address or a pointer (in languages that has pointers). I/O devices often have memory-mapped registers, where you write to or read from a specific address to set or get information or data. In other words, they are accessed just like any other memory (e.g. RAM).

如注释中所述,存在具有内存映射CPU寄存器的CPU.它们几乎都是在1970年代设计的,除了 PIC微控制器(也许还有现代实现) 8051 体系结构)现在已成为历史的一部分.这些天,您遇到带有内存映射寄存器的主流CPU(PIC除外)的机会微乎其微.

As mentioned in comments, there do exist CPUs with memory-mapped CPU registers. They were almost all designed in the 1970's and with the exception of PIC microcontrolers (and perhaps modern implementations of the 8051 architecture) are part of history now. The chances you would encounter a mainstream CPU (except PIC) with memory-mapped registers these days are slim to none.

更具体地说,ARM体系结构没有内存映射寄存器.无论如何,不​​用于核心寄存器.外围设备,包括那些与CPU在同一SoC上的外围设备,却是另一回事.

More specifically, the ARM architecture do not have memory-mapped registers. Not for the core registers anyway. Peripherals, including those on the same SoC as the CPU's, are a different matter though.

这篇关于通用寄存器是否一般都映射为存储器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆