DOC PREVIEW
Berkeley COMPSCI 150 - Lecture Notes

This preview shows page 1-2 out of 6 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 6 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 6 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 6 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

11.2.1CS150 Newton/PisterOutlinem Last time:Ô Introduction to Computer OrganizationÔ ControlÔ DatapathÔ I/O InterfaceÔ Bussing Strategiesm This lecture:Ô Deriving the State Diagram & Datapath (Cont.)Ô Mapping the Datapath onto Control11.2.2CS150 Newton/PisterFinite State Machines for Simple CPUsState Diagram and Datapath DerivationProcessor Specification:Instruction Format:Memory Interface:Load from memory: Mem[XXX] → AC;Store to memory: AC → Mem[XXX];Add from memory: AC + Mem[XXX] → AC;Branch if accumulator is negative: AC < 0 ⇒ XXX → PC;15 14 130Op Code00 = LD 01 = ST 10 = ADD 11 = BRNAddressM A RM B R1416[0:2 -1]<15:0>14MemoryRequest Read/Write Wait11.2.3CS150 Newton/PisterFinite State Machines for Simple CPUsDeriving the State Diagram and DatapathFirst pass state diagram:ResetInstruction FetchOperation DecodeLDSTADDBRNOperation Execution11.2.4CS150 Newton/PisterReset/0 → PCReset/ PC → MAR, PC + 1 → PCReset/Wait/Wait/ MAR → Memory, 1 → Read/Write, 1 → RequestWait/ 1 → Read/Write, 1 → Request, MAR → MemoryWait/Wait/Mem → MBRWait/MBR → IRRESIF1IF2IF0Deriving the State Diagram and DatapathAssume Synchronous Mealy Machine: Transitions associated with arcs rather than statesReset State (State 0)and Instruction FetchSequenceReset State (State 0)and Instruction FetchSequenceOn Reset: zero the PC Mem Request unasserted Mem asserts Wait signal11.2.5CS150 Newton/PisterReset/0 → PCReset/ PC → MAR, PC + 1 → PCReset/Wait/Wait/ MAR → Memory, 1 → Read/Write, 1 → RequestWait/ 1 → Read/Write, 1 → Request, MAR → MemoryWait/Wait/Mem → MBRWait/MBR → IRRESIF1IF2IF0Deriving the State Diagram and DatapathAssume Synchronous Mealy Machine: Transitions associated with arcs rather than statesReset State (State 0)and Instruction FetchSequenceReset State (State 0)and Instruction FetchSequenceOn Reset: zero the PC Mem Request unasserted Mem asserts Wait signalInstruction Fetch: issue read request 4 cycle handshake on Wait signal11.2.6CS150 Newton/PisterDeriving the State Diagram and DatapathAssume Synchronous Mealy Machine: Transitions associated with arcs rather than statesReset State (State 0)and Instruction FetchSequenceReset State (State 0)and Instruction FetchSequenceOn Reset: zero the PC Mem Request unasserted Mem asserts Wait signalInstruction Fetch: issue read request 4 cycle handshake on Wait signalNote: No explicit mention of the busses being used to implement register transfers!Reset/0 → PCReset/ PC → MAR, PC + 1 → PCReset/Wait/Wait/ MAR → Memory, 1 → Read/Write, 1 → RequestWait/ 1 → Read/Write, 1 → Request, MAR → MemoryWait/Wait/Mem → MBRWait/MBR → IRRESIF1IF2IF011.2.7CS150 Newton/PisterDeriving the State Diagram and DatapathOperation Decode StateFour Way Next State Branch based on opcode bitsIR<15:14>=0001 1011LD0ST0AD0 BR0OD11.2.8CS150 Newton/PisterIR<15:14>=00/ IR<13:0> → MARWait/ MAR → Memory, 1 → Read/Write, 1 → RequestWait/Mem → MBRWait/MBR → ACWait/Wait/ 1 → Read/Write, 1 → Request, MAR → MemoryWait/ODLD0LD1LD2RESDeriving the State Diagram and DatapathExecution SequencesLoad Sequencelike IFetch, except thatoperand address comesfrom IR and data shouldbe loaded into AC11.2.9CS150 Newton/PisterIR<15:14>=00/ IR<13:0> → MARWait/ MAR → Memory, 1 → Read/Write, 1 → RequestWait/Mem → MBRWait/MBR → ACWait/Wait/ 1 → Read/Write, 1 → Request, MAR → MemoryWait/ODLD0LD1LD2RESDeriving the State Diagram and DatapathExecution SequencesLoad Sequencelike IFetch, except thatoperand address comesfrom IR and data shouldbe loaded into AC11.2.10CS150 Newton/PisterIR<15:14>=00/ IR<13:0> → MARWait/ MAR → Memory, 1 → Read/Write, 1 → RequestWait/Mem → MBRWait/MBR → ACWait/Wait/ 1 → Read/Write, 1 → Request, MAR → MemoryWait/ODLD0LD1LD2RESDeriving the State Diagram and DatapathExecution SequencesLoad Sequencelike IFetch, except thatoperand address comesfrom IR and data shouldbe loaded into AC11.2.11CS150 Newton/PisterDeriving the State Diagram and DatapathExecution SequencesLoad Sequencelike IFetch, except thatoperand address comesfrom IR and data shouldbe loaded into ACIR<15:14>=00/ IR<13:0> → MARWait/ MAR → Memory, 1 → Read/Write, 1 → RequestWait/Mem → MBRWait/MBR → ACWait/Wait/ 1 → Read/Write, 1 → Request, MAR → MemoryWait/ODLD0LD1LD2RES11.2.12CS150 Newton/PisterIR<15:14>=01/ IR<13:0> → MAR, AC → MBRWait/ MAR → Memory, MBR → Memory, 0 → Read/Write, 1 → RequestWait/Wait/Wait/Wait/ 0 → Read/Write, 1 → Request, MAR → Memory, MBR → MemoryWait/ODST0ST1ST2RESDeriving the State Diagram and DatapathStore Execution SequenceMemory write sequence11.2.13CS150 Newton/PisterIR<15:14>=01/ IR<13:0> → MAR, AC → MBRWait/ MAR → Memory, MBR → Memory, 0 → Read/Write, 1 → RequestWait/Wait/Wait/Wait/ 0 → Read/Write, 1 → Request, MAR → Memory, MBR → MemoryWait/ODST0ST1ST2RESDeriving the State Diagram and DatapathStore Execution SequenceMemory write sequence11.2.14CS150 Newton/PisterIR<15:14>=01/ IR<13:0> → MAR, AC → MBRWait/ MAR → Memory, MBR → Memory, 0 → Read/Write, 1 → RequestWait/Wait/Wait/Wait/ 0 → Read/Write, 1 → Request, MAR → Memory, MBR → MemoryWait/ODST0ST1ST2RESDeriving the State Diagram and DatapathStore Execution SequenceMemory write sequence11.2.15CS150 Newton/PisterDeriving the State Diagram and DatapathIR<15:14>=10/ IR<13:0> → MARWait/ MAR → Memory, 1 → Read/Write, 1 → RequestWait/Mem → MBRWait/ MBR + AC → ACWait/Wait/ 1 → Read/Write, 1 → Request, MAR → MemoryWait/ODAD0AD1AD2RESAdd Execution SequenceSimilar to Load sequence Add MBR, AC rather than simply transfer MBR to AC11.2.16CS150 Newton/PisterIR<15:14>=10/ IR<13:0> → MARWait/ MAR → Memory, 1 → Read/Write, 1 → RequestWait/Mem → MBRWait/ MBR + AC → ACWait/Wait/ 1 → Read/Write, 1 → Request, MAR → MemoryWait/ODAD0AD1AD2RESDeriving the State Diagram and DatapathAdd Execution SequenceSimilar to Load sequence Add MBR, AC rather than simply transfer MBR to AC11.2.17CS150 Newton/PisterIR<15:14>=10/ IR<13:0> → MARWait/ MAR → Memory, 1 → Read/Write, 1 → RequestWait/Mem → MBRWait/ MBR + AC → ACWait/Wait/ 1 → Read/Write, 1 → Request, MAR → MemoryWait/ODAD0AD1AD2RESDeriving the State Diagram and DatapathSimilar to Load sequence Add MBR, AC rather than simply transfer MBR to AC11.2.18CS150 Newton/PisterIR<15:14>=10/ IR<13:0> → MARWait/ MAR →


View Full Document

Berkeley COMPSCI 150 - Lecture Notes

Documents in this Course
Lab 2

Lab 2

9 pages

Debugging

Debugging

28 pages

Lab 1

Lab 1

15 pages

Memory

Memory

13 pages

Lecture 7

Lecture 7

11 pages

SPDIF

SPDIF

18 pages

Memory

Memory

27 pages

Exam III

Exam III

15 pages

Quiz

Quiz

6 pages

Problem

Problem

3 pages

Memory

Memory

26 pages

Lab 1

Lab 1

9 pages

Memory

Memory

5 pages

Load more
Download Lecture Notes
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture Notes and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture Notes 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?