如何将指令嵌入到计算机的处理器和电路板中[已关闭](How are instructions embedded in the processor and boards of a computer [c

编程入门 行业动态 更新时间:2024-10-24 11:25:01
如何将指令嵌入到计算机的处理器和电路板中[已关闭](How are instructions embedded in the processor and boards of a computer [closed])

所以,处理器有一个打开和关闭的时钟,这是一个预定的指令。 这些指令如何作为指令加载到处理器中? 我只是用CPU可视化一个干净的平板我们如何教或告诉CPU做它做的事情?

另外,如果我们处于干净的状态,我们如何将数据加载到计算机中以识别二进制文件?

我很抱歉,如果这是一个问题超载,我只是很好奇..

So, the processor has a clock that turns on and off which is a predetermined instruction. How are these instructions loaded into the processor as instructions? I am just visualizing a clean slate with the CPU how do we teach or tell the CPU to do what it does?

Also, if we are at a clean slate how do we load the data into a computer to recognize binary?

I'm sorry if this is an overload on questions, I'm just super curious..

最满意答案

指令执行从称为重置向量的硬连线地址开始。 指令在存储器中编程; 所采取的手段取决于所使用的存储器技术和处理器的类型。

对于没有片上存储器的独立CPU,初始代码通常在某种外部只读随机存取存储器(ROM)中,通常称为bootrom--例如PC主板上的BIOS。 在现代平台上,这些ROM通常使用被称为NOR闪存的技术,可以通过将其加载到专用编程器或电路中(例如PC可以重写其自己的BIOS闪存)来进行电擦除和重新编程。

对于带有片上存储器的微控制器(MCU) ,这些片上存储器通常具有片上闪存ROM,并且通常还可以使用称为JTAG接口的片上编程和调试接口 (某些器件上也存在专用接口)进行电气编程。 一些MCU包含不可重写的掩模ROM ,其包含简单(或主要 )引导加载程序。 通常你可以选择MCU的启动方式。

引导程序的工作是将更复杂的代码加载到内存(电可编程ROM或RAM)中并执行它。 通常,掩模ROM中的主引导程序太简单并且限制太多,并且会加载更完整的引导加载程序,然后加载操作系统。 例如,一个常见的情况是处理器有一个主引导加载程序,用于从简单的非随机存取存储器(如NAND闪存或SD卡)加载代码; 然后,这可能会加载一个功能更全面的引导加载程序,例如通常用于加载Linux的UBOOT。 此辅助引导加载程序可以支持更复杂的设备引导源,如硬盘,网络,CD,USB。

Instruction execution starts at a hardwired address known as the reset vector. The instructions are programmed in memory; the means by which that is done varies depending on the memory technology used and the type of processor.

For standalone CPUs with no on-chip memory, the initial code will normally be in some kind of external read-only random-access memory (ROM) often called a bootrom - this for example is the BIOS on a PC motherboard. On modern platforms these ROMs normally use a technology known as NOR Flash which can be electrically erased and reprogrammed, either by loading them on a dedicated programmer or in-circuit (so for example a PC can rewrite its own BIOS flash).

For microcontrollers (MCU) with on-chip memory, these often have on-chip flash ROM and can also be electrically programmed typically using an on-chip programming and debug interface known as a JTAG interface (proprietary interfaces also exist on some devices). Some MCUs include mask ROM that is not rewritable which contains a simple (or primary) bootloader. Usually you can select how an MCU boots.

The job of the bootloader is to load more complex code into memory (electrically programmable ROM or RAM) and execute it. Often a primary bootloader in mask ROM is too simple and restricted to do very much, and will load a more complete bootloader that then loads an OS. For example a common scenario is for an processor to have a primary bootloader that loads code from a simple non-random access memory such as NAND flash or SD card; this may then load a more fully featured bootloader such as UBOOT typically used to load Linux for example. This secondary bootloader can support more complex devices boot sources such as a hard-disk, network, CD, USB.

更多推荐

本文发布于:2023-08-07 01:30:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1458552.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:电路板   如何将   指令   处理器   计算机

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!