Memory-mapped I/O and Port-mapped I/O > 온라인상담

온라인상담

글로벌드림다문화연구소에 오신걸 환영합니다
온라인상담

Memory-mapped I/O and Port-mapped I/O

페이지 정보

작성자 Mari 작성일25-11-25 04:35 조회4회 댓글0건

본문

550x544.jpgMemory-mapped I/O (MMIO) and port-mapped I/O (PMIO) are two complementary strategies of performing input/output (I/O) between the central processing unit (CPU) and peripheral devices in a pc (typically mediating entry through chipset). Another method is utilizing dedicated I/O processors, generally often called channels on mainframe computers, which execute their very own instructions. The memory and registers of the I/O gadgets are mapped to (related to) deal with values, so a memory tackle might confer with both a portion of physical RAM or to memory and registers of the I/O system. Every I/O device either displays the CPU's handle bus and responds to any CPU access of an handle assigned to that gadget, connecting the system bus to the specified system's hardware register, or uses a dedicated bus. To accommodate the I/O units, some areas of the tackle bus used by the CPU have to be reserved for I/O and must not be obtainable for regular bodily memory; the vary of addresses used for I/O gadgets is decided by the hardware.



The reservation could also be permanent, or short-term (as achieved via financial institution switching). An example of the latter is discovered within the Commodore 64, which makes use of a form of memory mapping to cause RAM or I/O hardware to appear in the 0xD000-0xDFFF vary. Port-mapped I/O typically uses a special class of CPU instructions designed particularly for performing I/O, such because the in and out instructions discovered on microprocessors based on the x86 architecture. Different varieties of those two instructions can copy one, two or four bytes (outb, outw and outl, respectively) between the EAX register or one of that register's subdivisions on the CPU and a specified I/O port handle which is assigned to an I/O system. I/O devices have a separate handle area from general memory, either completed by an extra "I/O" pin on the CPU's physical interface, or a complete bus dedicated to I/O. Because the deal with area for I/O is isolated from that for fundamental memory, that is sometimes referred to as remoted I/O.



On the x86 architecture, index/knowledge pair is often used for port-mapped I/O. Different CPU-to-machine communication strategies, akin to memory mapping, do not affect the direct memory entry (DMA) for a device, as a result of, by definition, DMA is a memory-to-system communication technique that bypasses the CPU. Hardware interrupts are another communication method between the CPU and peripheral gadgets, nevertheless, for a variety of reasons, interrupts are always handled separately. An interrupt is device-initiated, as opposed to the methods mentioned above, that are CPU-initiated. It is usually unidirectional, as information flows only from system to CPU. Lastly, every interrupt line carries only one bit of knowledge with a hard and fast meaning, particularly "an event that requires attention has occurred in a gadget on this interrupt line". I/O operations can gradual Memory Wave Experience access if the handle and information buses are shared. It is because the peripheral device is normally much slower than essential memory. In some architectures, port-mapped I/O operates via a dedicated I/O bus, alleviating the problem.



One merit of memory-mapped I/O is that, by discarding the additional complexity that port I/O brings, a CPU requires much less internal logic and is thus cheaper, quicker, simpler to construct, consumes less power and can be bodily smaller; this follows the essential tenets of lowered instruction set computing, and is also advantageous in embedded systems. The other benefit is that, as a result of regular memory directions are used to address gadgets, all of the CPU's addressing modes are available for the I/O as effectively as the memory, and instructions that carry out an ALU operation directly on a memory operand (loading an operand from a memory location, storing the result to a memory location, or each) can be utilized with I/O system registers as effectively. In contrast, port-mapped I/O directions are often very restricted, typically providing only for easy load-and-store operations between CPU registers and i/O ports, in order that, for example, to add a constant to a port-mapped gadget register would require three directions: read the port to a CPU register, add the fixed to the CPU register, and Memory Wave Experience write the end result again to the port.

댓글목록

등록된 댓글이 없습니다.