[ clydefrog @ 03.02.2020. 14:01 ] @
Izvinjavam se ako nisam dobro preveo naslov na srpski, ucim o ovome na engleskom i srpski termini su mi slabo poznati.

Dakle, imam teskoce da razumem deo teksta koji govori o mapiranju 32-bitnog MAR na 32 address bus linije.

Tekst:

Citat:

Memory Operation

Our machine has two different ways to communicate with memory: a 32-bit, word-addressable memory port and an 8-bit, byte-addressable memory port. The 32-bit port is controlled by two registers, MAR (Memory Address Register) and MDR (Memory Data Register), as shown in Fig. 4-1. The 8-bit port is controlled by one register, PC, which reads 1 byte into the low-order 8 bits of MBR. This port can only read data from memory; it cannot write data to memory.

Each of these registers (and every other register in Fig. 4-1) is driven by one or two control signals. An open arrow under a register indicates a control signal that enables the register’s output onto the B bus. Since MAR does not have a connection to the B bus, it does not have an enable signal. H does not have one either because, being the only possible left ALU input, it is always enabled.

A solid black arrow under a register indicates a control signal that writes (i.e.,loads) the register from the C bus. Since MBR cannot be loaded from the C bus, it does not have a write signal (although it does have two other enable signals, described below). To initiate a memory read or write, the appropriate memory registers must be loaded, then a read or write signal issued to the memory (not shown in Fig. 4-1).

MAR contains word addresses, so that the values 0, 1, 2, etc. refer to consecutive words. PC contains byte addresses, so that the values 0, 1, 2, etc. refer to consecutive bytes. Thus putting a 2 in PC and starting a memory read will read out byte 2 from memory and put it in the low-order 8 bits of MBR. Putting a 2 in MAR and starting a memory read will read out bytes 8–11 (i.e., word 2) from memory and put them in MDR.

This difference in functionality is needed because MAR and PC will be used to reference two different parts of memory. The need for this distinction will become clearer later. For the moment, suffice it to say that the MAR/MDR combination is used to read and write ISA-level data words and the PC/MBR combination is used to read the executable ISA-level program, which consists of a byte stream. All other registers that contain addresses use word addresses, like MAR.

In the actual physical implementation, there is only one real memory and it is byte oriented. Allowing MAR to count in words (needed due to the way JVM is defined) while the physical memory counts in bytes is handled by a simple trick. When MAR is placed on the address bus, its 32 bits do not map onto the 32 address lines, 0–31, directly. Instead MAR bit 0 is wired to address bus line 2, MAR bit 1 to address bus line 3, and so on. The upper 2 bits of MAR are discarded since they are needed only for word addresses above 2^32, none of which are legal for our 4-GB
machine. Using this mapping, when MAR is 1, address 4 is put onto the bus; when MAR is 2, address 8 is put onto the bus, and so forth. This trick is illustrated in
Fig. 4-4.


Fig. 4-1:



Fig. 4-4:


Nije mi jasno da li su dve nule na slici 4-4 adrese ili vrednosti koje register ima na tim adresama?

Takodje,

Citat:
Using this mapping, when MAR is 1, address 4 is put onto the bus; when MAR is 2, address 8 is put onto the bus, and so forth.


Da li ovo znaci da ako je MAR 0000 0000 0000 0000 0000 0000 0000 0001, address bus linija broj 2 (0-based indexing) je enable-ovana, i ako da, kako to posto je least significant bit MAR-a povezan sa adresnom linijom broj 0 (opet 0-based indexing).

Ne kapiram ovo bas.

TL;DR: poslednji pasus me buni, ovo pre toga sam stavio zbog konteksta.

[Ovu poruku je menjao clydefrog dana 03.02.2020. u 16:18 GMT+1]
[ Branimir Maksimovic @ 03.02.2020. 15:40 ] @
Ma to ti je alignovano na 4 kao i sve 32 bitne masine. Znaci mozes da citas samo 0, 4,8 itd