Title: EECE 631 Microcomputer System Design Lecture 18: Timing
1EECE 631Microcomputer System DesignLecture 18
Timing
- Spring 2008
- Chris Lewis
- clewis_at_ksu.edu
2General System Block Diagram
CLKOUT
Transfer Acknowledge generation
Memory
TA
Delayed Chip Select
Chip Select Buffer
Chip Select
Chip Select Logic
Read/ Write Buffer
Micro
Delayed Read/Write line
Read/Write line
Delayed Addr lines
Address lines
Addr. Buffer
Delayed in one direction
Data Bus
Data Buffer
Data Bus
R
R
W
W
3System Block Diagram
Delayed Chip Select
Chip Select Buffer
Peripheral
Chip Select
Chip Select Logic -------- Micro
Read/ Write Buffer
Delayed Read/Write line
Read/Write line
Delayed Addr lines
Addr. Buffer
Address lines
Data Buffer
Data Bus
Data Bus
R
W
W
R
Delayed in one direction
4Simple Timing Problem
- Lets take a very simple problem. Adding a
KM6256CL RAM with no buffers using the EBI chip
selects. First look at memory. - What do pins do?
- What to connect to?
KM62256CL 32K x 8 bit STATIC RAM
/CS
/WE
/OE
A0-A14
I/O0-I/O7
5The external memory ControllerAT91SAM7SE
(external memory)SDRAM interface
Clock Clock Enable Chip Select Bank Select Row
Signal Column Signal Write enable Data mask
enable Address Data
6Static Memory Controller
7Timing Analysis Procedure
- Develop the block diagram of the desired system.
- Determine whether using internal chip selects or
external chip select as well as internal or
external transfer acknowledge. - Determine if buffers are needed.
- Collect timing data on the microprocessor/microcon
troller, buffers, and all peripheral chips
(memory, I/O, display driver, etc.) - Determine where all pins on the peripheral device
are connected.
8Placement in memory
- We must determine where to place it in memory so
as not to conflict with existing onboard
peripherals. - Must get memory map.
9(No Transcript)
10Placement in Memory
- EBI has special features for different types of
memory - Address buss has only 23 bits A0-A22
- Data buss has 32 bits
- 8 different chip selects
- Other control pins
11Mapping Memory (SMC)
12SMC Determines Range of Memory Locations available
- Unanswered Questions
- What happens when a
- single byte is read?
- What happens when an
- integer is read?
- How does the SMC/EBI/MC
- know what its getting from
- physical memory?
13Configuration
- Configure EBI and MC to use SMC for the address
selected (typical montage of control registers) - Configure to meet timing requirements if
possible. - Wait states
- External Wait Request
- Hold times
- Timing Analysis is Required
14Write Cycle Timing
15Read Cycle
16Configurable Timing
17Wait States
18Wait State
191. Address and Chip select can be as short at one
clock cycle 2. Write-Enable is ½ clock cycle 3.
Data seems to follow this second half cycle, and
last for about a full clock cycle
20Each Wait state adds one full cycle to Address
and CS Each Wait state adds one half cycle to
Data and WE
21(No Transcript)
22(No Transcript)
23(No Transcript)
24Where Are We?
- We are beginning to understand what each signal
does, and who controls it. - CS
- Address
- Data
- WE
- RD
- CLK
- Must READ the DESCRIPTIONS of various Timing
Diagrams in the Manual - Must understand how to configure the External
Memory Controller - Must decide which if any wait states are necessary
25Lets attempt, to only use standard Wait states
Why different?
26Timing Analysis
- Assemble timing diagrams and tables of
specifications and requirements - Memory
- CPU
- For each memory parameter
- Write an inequality equation that must be met
- Use the specifications given to make sure its
met
27Graph the problem
- Draw the requirement or specification on the
cpus timing diagram. - Write an inequality
- Add up the terms to see if requirement is met.
- Pay careful attention to max/mins
- DO THIS FOR EACH TERM
- 9 terms for read cycle in our case
- 10 terms for write cycle in our case
28Timing Diagram for CPU
29The Memory
30Timing Diagrams for the Memory
31Parameter Table for Memory
32Timing Diagram for CPU
33Tables of Specs
34Timing Diagram for CPU
SMC_7 not labeled on diagram
35Consider Twc
- Does the address signal last long enough?
- Do we need wait states? How many?
- Memory stipulates the following requirements
- Twc_min 55,70ns
- Address must be valid at least 55 or 70 ns
- How long is address guaranteed to be valid by the
cpu? - 1/40Mhz 25ns
- Is 1 wait state enough for fast memory?
- Are 2 wait states enough for slow?
36Timing Analysis
- For each parameter, an equation must be written
to ensure that the specification is met. These
equations are inequalities. - For memory to work it must allow sequences
without contention on any line. - Reading then reading
- Writing then writing
- Read then write
- Write then read
37Graph the problem
- Draw the requirement or specification on the
cpus timing diagram. - Write an inequality
- Add up the terms to see if requirement is met.
- Pay careful attention to max/mins
- DO THIS FOR EACH TERM
- 9 terms for read cycle in our case
- 10 terms for write cycle in our case
38Timing Diagrams for the Memory
Twc on both Read and Write
39Memory Requires Twc to be at least 5570ns
NOT HERE
40Address and Chip Select are same according to text
2.5ns accounts for rise and fall times relative
to cpmck My best guess is that rise and fall
times are 1.25 and 2.5ns MCK is 40 MHz, or 25ns,
therefore, we need Twc minimum allowed by memory
is 5570ns SMC_7 gt Twc (n1)t_cpmck -1.25 gt 5570
(inequality equation) N gt 2 for this to work
41Next Parameter Tcw
42Chip Select to end of write
43Add to CPU timing diagram
44Memory requires the time between chip select
going low till write goes high to be greater than
45(55) or 60(70) ns
- How long does the CPU guarantee that same time to
be? - SMC_18(provided as a min) relates these two
signals, however, it measures from end of chip
select, not the beginning - SMC_7-SMC_18 gt Tcw
45Next Parameter Tas
46Address to WE
47Add to CPU timing diagram
48Problem
- (SMC_7 SMC_18 SMC_26)_min gt Tas
- SMC_7_min SMC_18_max-SMC_26_maxgtTas
- This would have been nice max vals not given
- Refer to previous description to determine
- WE occurs ½ clock cycle after address and CS
- 1/2MCK rise time gt Tas (0ns)
49Next Parameter Taw
50Taw mins(45,60 ns)
51Add to CPU timing diagram
52Problem
- min(SMC_7 SMC_18) gt Taw
- Min(SMC_7) Max(SMC_18) gt Taw
- This would have been nice max vals not given
- Refer to previous description to determine
- WE occurs ½ clock cycle after address and CS
- ½ Tclk t_rise Min(SMC_27) gt Taw
53Simple Timing Problem
- Consider adding a pair of KM6256CL RAM with no
buffers using the Static Memory Controller (SMC)
54Timing Analysis
- For each parameter, an equation must be written
to ensure that the specification is met. These
equations are inequalities. - For memory to work it must allow sequences
without contention on any line. - Reading then reading
- Writing then writing
- Read then write
- Write then read
55Static Memory Controller
56Consider Twc
- Does the address signal last long enough?
- Do we need wait states? How many?
- Memory stipulates the following requirements
- Twc_min 55,70ns
- Address must be valid at least 55 or 70 ns
- How long is address guaranteed to be valid by the
cpu? - 1/40Mhz 25ns
- Is 1 wait state enough for fast memory?
- Are 2 wait states enough for slow?
57Word Transfer?
58(No Transcript)