

















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


















th
CSCE 491CSCE 491
Capstone Computer Design ProjectCapstone Computer Design Project
Ā© 2003 Dr. James P. Davis Page 2
Week 2Week 2 -- OutlineOutline
z Digital Systems Design Methods.
z Clocking specification.
z ASM Diagrams.
Ā© 2003 Dr. James P. Davis Page 3
Week 2Week 2 -- ObjectiveObjective
z Objective: To gain comprehensive enough understanding of
Algorithmic State Machine notation in order to use it to create
digital circuit and systems architecture.
z Means:
9 Modeling the control path as a Finite State Machine (FSM).
9 Modeling the data path operations using the Register Transfer Notation (RTN).
9 Applying the underlying assumptions about timing behavior based on whether we use registered or non-registered elements in the data path. Registered elements have a one-cycle delay from when they are scheduled in the FSM and when the result appears on the output of data path registers.
9 Assuming āunit delayā in the scheduling of data path operations from the control path of the state machine.
z Result: Construct architectures easily from abstract system models
described in UML, where these models are ācycle accurateā, but
not necessarily accurate in terms of a set of specific VLSI circuit delays.
Ā© 2003 Dr. James P. Davis Page 4
I. Overview:
Review of Logic Concepts and
Basic Device Functions
Ā© 2003 Dr. James P. Davis Page 5
Levels of Abstraction in VLSI System DesignLevels of Abstraction in VLSI System Design
z A design transforms from
"concept" to "implementation" in
a series of ordered levels.
z From the highest level to lower
levels of design "abstraction", a design is iteratively refined.
z The design description is verified
and validated at each level, often cycling between levels of
abstraction.
z Design descriptions are
described using one or more
domain representations (Behavior, Structure, Physical).
Ā© 2003 Dr. James P. Davis Page 6
Systems Design Systems Design ā ā Structure of ComputersStructure of Computers
z Basic systems components of
Computer:
z CPU further decomposes into
basic components:
Ā© 2003 Dr. James P. Davis Page 10
Review of Boolean Representation Review of Boolean Representation
z Laws and Theorems of Boolean algebra:
9 Used to transform Boolean equations into appropriate forms.
9 Used to simplify or expand Boolean expressions, depending on the form of the expression.
Source: Tanenbaum, 4 th^ ed. Ā© 1999, Prentice-Hall
Ā© 2003 Dr. James P. Davis Page 11
Review of GateReview of Gate--level Deviceslevel Devices
z Symbols and Truth tables for 5 basic gate-level logic gates: NOT,
NAND, NOR, AND, OR.
Source: Tanenbaum, 4 th^ ed. Ā© 1999, Prentice-Hall
Ā© 2003 Dr. James P. Davis Page 12
Review of GateReview of Gate--level Deviceslevel Devices
9 There is generally no XOR gate in a technology library. It is realized using other gate structures.
9 The Truth table for XOR and 3 different circuits that realize the function for two input signals.
Source: Tanenbaum, 4 th^ ed. Ā© 1999, Prentice-Hall
Ā© 2003 Dr. James P. Davis Page 13
Review of GateReview of Gate--level Deviceslevel Devices
9 This circuit takes two single- bit inputs and adds them together to produce a Sum as output.
9 The Full Adder also has a Carry (called a Carry Out) like the Half Adder.
9 The Full Adder also has a Carry In signal, allowing Carry Out from earlier adder stage to be connected.
9 This allows a multi-bit, multi- stage adder circuit to be constructed.
Source: Tanenbaum, 4 th^ ed. Ā© 1999, Prentice-Hall
Ā© 2003 Dr. James P. Davis Page 14
Review of Gate- Review of Gate-level Deviceslevel Devices
9 COMP allows comparison of two different inputs to check if they are equal. Alternate circuits evaluate the relative magnitude of two inputs.
9 If they are equal, the output is HIGH, but if they are not equal, the output is LOW.
9 The comparison must be done with two signal inputs of equal width.
9 The output of the Comparator operation is a single-bit signal.
Source: Tanenbaum, 4 th^ ed. Ā© 1999, Prentice-Hall
Ā© 2003 Dr. James P. Davis Page 15
Review of Gate- Review of Gate-level Deviceslevel Devices
9 MUX allows the signal value of one of its data inputs (D0 ā D7) to pass to the output F.
9 The selection of the signal to be passed is controlled by SELECT lines (A, B, C).
9 The number of select lines, n, is based on a power of 2 for the number of inputs, m. So, if we have m inputs, weāll need n select lines so that 2n=m.**
9 The MUX inputs and output must be the same width, and the SELECT lines are 1-bit each.
Source: Tanenbaum, 4 th^ ed. Ā© 1999, Prentice-Hall
Ā© 2003 Dr. James P. Davis Page 19
II. Overview:
Digital Systems Modeling &
Design
Ā© 2003 Dr. James P. Davis Page 20
SummarySummary -- Specifying a Digital SystemSpecifying a Digital System
s
s
s
aSig
outSig
idleSig
^RESCLK (rising)
01
outSig
^outSig aReg <- '4'bReg <- '2' aReg <- '4'bReg <- '2'
aReg <- inBus bReg <- '1'
aReg <- '0' bReg <- '0'
Block_1 Block_
Block_
Block_1 Block_
Block_ Block_4Block_
A B C D f(A,B,C,D) 00 00 00 00 11 00 00 00 01 10 00 00 01 00 01 00 00 00 10 10 00 00 10 00 01
entity DRAM_Controller is port ( CLK : in bit; RES : in bit; WORD_IN : in bit_vector (7 downto 0 ); end DRAM_Controller; architecture ARTIFACT of DRAM_Controlle signal CYCLES_DONE : in bit; ...
Concurrent Flowdiagrams
Hierarchical Datapath Diagrams
Hierarchical Block Diagrams
Truth Tables
VHDL & Verilog
Timing Diagrams
CLK STATE1 s0 s1 s6 s1 s6 s1 s STATE2 s2 s STATE C
ASSERT_
AS
s4 s
ASSERT_
AS
s
C
RES
LCK ADR BMR
PRK
State Diagrams
Ā© 2003 Dr. James P. Davis Page 21
Systems DesignSystems Design -- StructureStructure
z Block diagram: Used to partition and decompose a design into its functional units.
Higher-level
Block
Block name Block type
block name
Bounding Box (Encapsulates block's internal structure and interconnect)
UART block_ Architectural - Local Input pin Input port
Output pin (appears as Output port
Bi-directional pin (appears as Bi-directional port
Internal output/Buffer pin (appears as Buffer port
Functional
at higher level)
at higher level)
at higher level)
Top_Level UART Architectural - Local
Ā© 2003 Dr. James P. Davis Page 22
802.11 WLAN802.11 WLAN āā MAC Block DiagramMAC Block Diagram
Ā© 2003 Dr. James P. Davis Page 23
Gate Level DesignGate Level Design āā Circuit StructureCircuit Structure
z 1-bit Arithmetic Logic Unit (ALU)
th
Ā© 2003 Dr. James P. Davis Page 24
Register Level Design ā Register Level Designā Circuit StructureCircuit Structure
z Arithmetic Logic Unit (ALU)
Ā© 2003 Dr. James P. Davis Page 28
Systems DesignSystems Design āā Behavior (Response)Behavior (Response)
z Timing Diagram:
Ā© 2003 Dr. James P. Davis Page 29
Gate Level DesignGate Level Design āā Device TimingDevice Timing
z Setup Time
z Hold Time
z Example: D flip flop
th
Ā© 2003 Dr. James P. Davis Page 30
Register Level DesignRegister Level Design āā Clocking SchemesClocking Schemes
Ā© 2003 Dr. James P. Davis Page 31
Control Unit
steering logic register clocked
logic
register clocked
MUX
Data Path Unit
Data in
Data out
Control in
Status Select
Control out
combin.
State Registers
input/next state decoding logic (^) CLK
inputs
present state information
next state information
output decoding logic
control outputs
^RES
Ā© 2003 Dr. James P. Davis Page 32
Finite State Machine ModelFinite State Machine Model
input/next state decoding logic
inputs
present state information
next state information
output decoding logic CLK
input synchronizing registers
control outputs output filtering registers
inputs
Dn Qn Dn Qn Dn Qn
Ā© 2003 Dr. James P. Davis Page 33
Finite State Machine ModelFinite State Machine Model
z Moore machines:
9 Control outputs generated by the state machine are dependent only on the present state information****.
9 The control outputs are synchronized to the clock that controls state transitions. 9 Moore machines are used when it is important to synchronize all control actions with the change in state, and thus, by the clock. 9 Moore machines effectively filter out transients, and can be used to eliminate race conditions when inputs are unfiltered.
Ā© 2003 Dr. James P. Davis Page 37
Register Level DesignRegister Level Design āā Clocking SchemesClocking Schemes
9 Single-phase, rising or falling edge clocks.
9 Two-phase overlapping, rising or falling edge clocks.
9 Two-phase non-overlapping, rising and/or falling edge clocks.
Ā© 2003 Dr. James P. Davis Page 38
III. Lecture:
Model-Based Design Notation:
The Algorithmic State Machine
Ā© 2003 Dr. James P. Davis Page 39
Taxonomy of ASM Diagram Concepts Taxonomy of ASM Diagram Concepts
State (^) Binary_Condition
Conditional_Output
Case_Condition
RTN_Expression
Flowdiagram_Model ASM_Construct 1..*
Contains_Model_Us ing 1..*
State_Block
Thread
Clock_Spec
Event_Spec
Bus Bus_Name : type = Text
Single-bit_Signal Multi-bit_Bus Synchronous_Enable_Event Reset_Event
Case_Expression Condition_Expression Assertion Bus_Assignment Macro-function_Assignment
Ā© 2003 Dr. James P. Davis Page 40
Flowdiagram_Model
Thread
1..1..
Contains
State_Block
1..1..
Contains
St ate
11
Contains
Binary_Condition
0.. *0.. *
Contains
Case_Condition
0..0..
Contains
Conditional_Out put
0..0..
Contains
A given register-transfer expression must appear on a St ate, Condit ion, Case, or Conditional_Output. However, it can appear on States and Conditional Out puts but , because of the syntax, cannot appear on st ates and conditional outputs AND on Conditions and Cases (because condition expressions are of a different synt ax than Moore and Mealy assignm ents and assert ions ).
RTN_Expres sion 0..*
0..*
0..*
0..*
Schedules
1
0.. *
1
0.. * Evaluates
1
0..*
1
0..*
Evaluates
1..*
0..*
1..*
0..*
Schedules
Event_Spec
1..1..
Contains
Bus Bus_Name : ty pe = Text
Contains
1..1.. 1..1..
References
1..1..
Contains
1..*
Clock_Spec
11
Contains
1..*
Contains
1..* Contains
1..*
Ā© 2003 Dr. James P. Davis Page 41
Bus_Width Width : type = Integer
Bus_Element_Type Type : type = Enum
Bus_Mode Mode : type = Enum
Bus Bus_Name : type = Text 1
Has_Property 1
Has_Property
Has_Property
Input Output Internal Bi-directional
Register Latch Wire
State
State_Sequence
+previous_state
+next_state 0..*
Ā© 2003 Dr. James P. Davis Page 42
Ā© 2003 Dr. James P. Davis Page 46
ASM DiagramASM Diagram āā Nested Control StructuresNested Control Structures
Source: Roth Ā© 1998 PWS Publishing
Ā© 2003 Dr. James P. Davis Page 47
s
s2 (^) s
a (^0001 ) s1 (^) s
0010 0100 default
a= s0 s
s
a=
s
s
a=
a=
others? ^a & b s0 s
s
^a & c & d
s
s
a & b
^b & c
s
s
a & b 0
s
s
s
^a & b
^a & c & d
^b & c 0
Ā© 2003 Dr. James P. Davis Page 48
Ā© 2003 Dr. James P. Davis Page 49
s
s
a 0
s
1
0
0
s
a 1
1
^RES
a
s
s
s
s ^RES : P
a : P
explicit conditional tests
synchronous enable event
Ā© 2003 Dr. James P. Davis Page 50
Ā© 2003 Dr. James P. Davis Page 51
Storage Registers
Synchronizing Clock Signal
Storage Registers
Synchronizing Clock Signal
Inputs Outputs
p
p
Ā© 2003 Dr. James P. Davis Page 55
ASMASM -- Modeling Complex MacroModeling Complex Macro--functionsfunctions
s1 bBus <- nmux(add(a,b), add(a,c), or(band(xnor('b00,cmp(b, 'd1'))),d)
z Create complex datapath descriptions that are efficient, in terms of gate count and delay.
z Pure functional representation that is mathematically sound.
z Lends itself to compact annotation without requiring operator precedence rules.
z Things to remember:
z Macro arguments should match, in terms of bus width , signal type (binary, MVL9, etc.) and signal mode (input, output, etc.).
z Macros should not have an output argument fed back as an input without proper buffering (with register or latch definition for signal/bus specified on LHS of expression.
z Donāt drive a signal/bus as both registered and unregistered (as this causes a multi-drive error , unless using MVL data types with resolution tables).
Ā© 2003 Dr. James P. Davis Page 56
ASM ASM ā ā User Defined Datapath OperationsUser Defined Datapath Operations
z RTL macro-functions: approx. 30 primitive data path elements in a library.
z Macros are "scalable" - with any number of buses and any bus widths.
z Macros can be used to construct more complex user-defined data path
functions.
A_Bus
B_Bus
C_Bus
nPort
CollIn
select
CollisionEvent
Ā© 2003 Dr. James P. Davis Page 57
ASM - ASM- Arithmetic MacroArithmetic Macro--functionsfunctions
Ā© 2003 Dr. James P. Davis Page 58
Moore Machine - Moore Machine- MacroMacro--function Assignmentsfunction Assignments
Ā© 2003 Dr. James P. Davis Page 59
Ā© 2003 Dr. James P. Davis Page 60