Presentation is loading. Please wait.

Presentation is loading. Please wait.

Datorteknik MainMemory bild 1 Memory The programmer’s model.text,.data –user program (instruction memory) and data area.ktext,.kdata –kernel program and.

Similar presentations


Presentation on theme: "Datorteknik MainMemory bild 1 Memory The programmer’s model.text,.data –user program (instruction memory) and data area.ktext,.kdata –kernel program and."— Presentation transcript:

1 Datorteknik MainMemory bild 1 Memory The programmer’s model.text,.data –user program (instruction memory) and data area.ktext,.kdata –kernel program and data area The computer’s model instruction memory –user space 0-7fffffff, kernel space ffffffff data memory –user space 0-7fffffff, kernel space ffffffff

2 Datorteknik MainMemory bild 2 How can we tell User/Kernel apart? By looking at the address! PC[31] –0, User program –1, Kernel program data addr [31] –0, User data –1, Kernel data ?xxx x…...

3 Datorteknik MainMemory bild 3 Address Decoding So far; Instruction decoding Now address decoding PC 32 PC[31] TAP BOX [31]

4 Datorteknik MainMemory bild 4 CPU model How to detect a kernel instruction CP0 MIPS PIPELINE Instruction Memory 32 [31] kinst instruction address

5 Datorteknik MainMemory bild 5 CPU model How to detect kernel data access CP0 MIPS PIPELINE 32 kdata data mem address Instruction Memory [31]

6 Datorteknik MainMemory bild 6 Address Mapping CP0 MIPS PIPELINE 32 data mem address Address bus Data bus 32 data 8/16/32 bits

7 Datorteknik MainMemory bild 7 Address Mapping CP0 MIPS PIPELINE Address bus Data bus Control bus Control signals r/w, 8, 16, 32 bits

8 Datorteknik MainMemory bild 8 Address Mapping Address bus Data bus Control bus 00……0... 0fff…..f 10……0... 1fff…..f n0……0... nfff…..f …. Mem 1Mem 2Mem n

9 Datorteknik MainMemory bild 9 Enable and REDUCED address Address 0-7fffffff [27:0] points out the REDUCED address in mem 1 mem 1 Enable

10 Datorteknik MainMemory bild 10 lw $t0 0($t1), $t1=0…0 Address bus Data bus Control bus 00……0... 0fff…..f address decoder read, word data word read=(ADDR[31..28]=0000) and CTRL[READ] word=CTRL[WORD]

11 Datorteknik MainMemory bild 11 lw $t0 0($t1), $t1=0…0 Address bus Data bus Control bus 00……0... 0fff…..f address decoder read, word data word CTRL[stall]=0 Until data ready

12 Datorteknik MainMemory bild 12 sb $t0 0($t1), $t1=0…0 Address bus Data bus Control bus write, byte data word write=(ADDR[31..28]=0000) and CTRL[WRITE] byte=CTRL[BYTE] address decoder 00……0... 0fff…..f

13 Datorteknik MainMemory bild 13 sw $t0 0($t1), $t1=0…1 Address bus Data bus Control bus 32 CTRL[ALIGNMENT]=(ADDR[31..28]=0000) and (ADDR[0] or ADDR[1]) Alignment Error!!! address decoder


Download ppt "Datorteknik MainMemory bild 1 Memory The programmer’s model.text,.data –user program (instruction memory) and data area.ktext,.kdata –kernel program and."

Similar presentations


Ads by Google