ECE 406 - PowerPoint PPT Presentation

About This Presentation
Title:

ECE 406

Description:

W. Rhett Davis with slight modification by Dean Brock. UNCA ECE 406. Slide 1 ... Davis with slight modification by Dean Brock. UNCA ECE 406. Slide 3. Detail of ... – PowerPoint PPT presentation

Number of Views:46
Avg rating:3.0/5.0
Slides: 16
Provided by: rhett2
Learn more at: https://www.cs.unca.edu
Category:
Tags: ece | brock

less

Transcript and Presenter's Notes

Title: ECE 406


1
ECE 406 Design of Complex Digital Systems
Lecture 13 MemAccess Block
Spring 2007 W. Rhett Davis NC State
University with significant material from Paul
Franzon, Bill Allen, Xun Liu
2
MemAccess
  • Receives Address to be read/written from Execute
    block
  • Receives Data to be written from Decode block
  • Master of the shared Memory bus during the Read
    Memory, Write Memory, and Indirect Address
    Read states.
  • Provides Data read from Memory to Writeback block

3
Detail of Memory Bus
4
MemAccess Signals
  • What is meant by the M_Data signal? Why does it
    come from the Decode block?
  • What is meant by the M_Addr signal? Why does it
    come from the Execute block?
  • What is meant by the memout signal?

5
MemAccess States
6
Read Memory State LD, LDR
  • Determine the Memory Bus Signals
  • rd
  • addr
  • din

7
Write Memory State ST, STR
  • Determine the Memory Bus Signals
  • rd
  • addr
  • din

8
Read Indirect Address State LDI, STI
  • Determine the Memory Bus Signals
  • rd
  • addr
  • din

9
Example LDI
  • Location of Indirect Address 16h300A
  • Indirect Address 16h3010
  • Value Stored at Indirect Address 16h1234

Note that dout is the same as addr
10
Example STI
  • Location of Indirect Address 16h300A
  • Indirect Address 16h3010
  • Value to be Stored at Indirect Address 16h1234

Note that dout is the same as addr
11
Read Indirect Address State
  • During this state, what will dout be set to?
  • What needs to happen to this value on the next
    cycle?
  • How can we ensure that this happens?

12
Read/Write Memory States Revisited
  • Read State Memory Bus Signals
  • rd
  • addr
  • din
  • Write State Memory Bus Signals
  • rd
  • addr
  • din

13
Verilog Code for MemAccess
  • Read Memory State
  • if(M_Control0) addrltM_Addr else
    addrltdout
  • dinlt16'h0 // dont care
  • rdlt1'b1
  • Read Indirect Address State
  • addrltM_Addr
  • dinlt16'h0 // dont care
  • rdlt1'b1
  • Write Memory State
  • if(M_Control0) addrltM_Addr else
    addrltdout
  • dinltM_Data
  • rdlt1'b0
  • All Other States
  • addrlt16'hz
  • dinlt16'h0 // dont care
  • rdlt1'bz

Remember that this is combinational logic!
14
Complete the Table

Operation mode M_Control
ADD 0
1
AND 0
1
NOT
BR
JMP/RET
JSR
JSRR
LD
LDR
LDI
LEA
ST
STR
STI
15
What about memout?
  • memout needs to present the value read from
    memory to the Writeback block.
  • Theres really no reason why it cant just be
    connected to dout permanently (with an assign
    statement).
  • assign memout dout
Write a Comment
User Comments (0)
About PowerShow.com