Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chap. 4: A Systematic Approach to Logic Design

Similar presentations


Presentation on theme: "Chap. 4: A Systematic Approach to Logic Design"— Presentation transcript:

1 Chap. 4: A Systematic Approach to Logic Design
Design of complex synchronous sequential digital circuits based on converting algorithmic descriptions into hardware Uses a systematic step-by-step approach FSM (Finite State Machine) method insufficient Only suitable for small sequential circuits with small numbers of external inputs Set of design heuristics for “safe” design "Computer Design" by Sunggu Lee

2 Using Digital Circuits to Implement General Algorithms in Hardware
Formal definition of an “algorithm” A general step-by-step procedure for solving a problem that is CORRECT and TERMINATES. Informal definition of an “algorithm” A computer-program-like procedure for solving the problem given. Algorithm description methods Old (outdated) method: flowchart Pseudocode: free-form procedural description "Computer Design" by Sunggu Lee

3 ASM (Algorithmic State Machine)
Originally introduced in 1973 by C. R. Clare Example designs: automatic bank tellers, soccer robot systems, computers Advantages Uses a systematic S/W-to-H/W conversion method Can be used to design large circuits with many inputs Disadvantages Highly dependent on the use of a graphical notation called an ASM chart  cumbersome for large designs "Computer Design" by Sunggu Lee

4 Introduction to Hardware Design
Classification of Design Methods Top-down, bottom-up, combined Design Level Hierarchy architectural (CPUs, IOPs, memory modules, etc.) register-transfer (registers, adders, counters, etc.) gate (NAND, NOR, AND, flip-flops, etc.) switch (view transistors as voltage-controlled switches) transistor (lowest level used in circuit design) "Computer Design" by Sunggu Lee

5 VLSI Chip Design versus Board-Level Design
VLSI Design (or ASIC Design) Full-custom design Draw patterns for each individual transistor and connection Standard cell based design Use a standard cell library (pre-design adder, counter, etc.) and automatic place-and-route tools Board-Level Design Produce acceptable design using available parts (chips) PCB routing typically done by “PCB artwork” experts "Computer Design" by Sunggu Lee

6 Design Method Differences
VLSI Chip Design Uses PLAs, transistor-level-designed MSI devices Uses latches and multi-phase clocks instead of FFs Extremely short signal delays (within the chip) Board-Level Design Uses mostly standard, off-the-shelf (OTS) chips Logic minimization less important than for chip design Uses FFs and buffer (transceiver) chips Uses PLDs and FPGAs extensively Relatively long chip-to-chip signal delays "Computer Design" by Sunggu Lee

7 Design Method Similarities
High-level design is the same particularly for synchronous sequential circuits ASM-based (modified ASM) high-level design methodology equally applicable to both Heuristics for “safe” design should be followed for both VLSI chip design and board-level design use of edge-triggered flip-flops is a possible exception "Computer Design" by Sunggu Lee

8 Partitioning of Digital Circuits
Control Logic Section logic required to generate control signals for registers, adders, counters, etc. Datapath Section all logic not included in the control logic section typically the “word”-sized data manipulation and storage components through which the data “flows” "Computer Design" by Sunggu Lee

9 "Computer Design" by Sunggu Lee
input data control and status signals output data datapath elements "Computer Design" by Sunggu Lee

10 Structure of General Digital Circuit
"Computer Design" by Sunggu Lee

11 Register Transfer Notation (RTN)
Common notation for describing high-level behavior of digital systems Fact: All (or almost all) synchronous sequential digital systems can be viewed as a set of registers and data transfer operations. Operations in RTN are always of the form: REGx  f(REG1, REG2, … , REGn) "Computer Design" by Sunggu Lee

12 "Computer Design" by Sunggu Lee
"Computer Design" by Sunggu Lee

13 "Computer Design" by Sunggu Lee
(Modified) ASM Method (1) Pseudocode create an algorithm to describe desired circuit operation (2) ASM Chart convert the pseudocode into an ASM chart (3) Datapath design the datapath based on the ASM chart (4) Detailed ASM Chart based on the ASM chart and datapath (5) Control Logic Design "Computer Design" by Sunggu Lee

14 "Computer Design" by Sunggu Lee
ASM Chart A method for describing the sequential operations of a digital system direct conversion from a computer algorithm contains all information contained in a “state diagram” Depiction of an ASM chart original, graphical notation: similar to a “flowchart” tabular notation possible text notation possible "Computer Design" by Sunggu Lee

15 Original ASM Chart Constructs
don’t need state box condition box conditional output "Computer Design" by Sunggu Lee

16 ASM Chart Construction Rules
State boxes should contain only RTN statements plus control signals (if necessary) All operations within a state box must be executable in one clock cycle Combine two state boxes if all operations in both state boxes can be executed in same clock cycle Condition boxes should contain only simple “combinational logic” queries "Computer Design" by Sunggu Lee

17 "Computer Design" by Sunggu Lee
Example 4.1: ASM Chart "Computer Design" by Sunggu Lee

18 Tabular Form of ASM Chart
"Computer Design" by Sunggu Lee

19 "Computer Design" by Sunggu Lee
Text Form of ASM Chart "Computer Design" by Sunggu Lee

20 "Computer Design" by Sunggu Lee
Datapath for Example 4.1 "Computer Design" by Sunggu Lee

21 "Computer Design" by Sunggu Lee
Detailed ASM Chart One-to-one correspondence with ASM chart RTN operation  list of control signals unspecified control signals  default value of ‘0’ Condition box query  status signal State box contains either csig1, csig2, …, csigN cond:(csig1, csig2, …, csigN) "Computer Design" by Sunggu Lee

22 Detailed ASM Chart for Ex. 4.1
"Computer Design" by Sunggu Lee

23 Tabular Form of Detailed ASM Chart
"Computer Design" by Sunggu Lee

24 Text Form of Detailed ASM Chart
"Computer Design" by Sunggu Lee

25 "Computer Design" by Sunggu Lee
(Assume C = FFH initially) FFH (zeroC = 1 initially) "Computer Design" by Sunggu Lee

26 Control Logic Design Methods
One-FF-per-state method also referred to as “one-hot” or “delay element” method MUX-based method PLD-based method results in the most compact implementation Sequence-counter method for use with cyclical state transition patterns outputs of the “counter” are the control logic “states” "Computer Design" by Sunggu Lee

27 One-FF-Per-State Method
Uses one-to-one transformations from detailed ASM chart constructs to digital logic components State box transformation "Computer Design" by Sunggu Lee

28 "Computer Design" by Sunggu Lee
Multiple-path transformation Condition box transformation "Computer Design" by Sunggu Lee

29 Example of Transformation Process
(D FF’s not shown here) "Computer Design" by Sunggu Lee

30 "Computer Design" by Sunggu Lee
"Computer Design" by Sunggu Lee

31 MUX-Based Control Logic Design
"Computer Design" by Sunggu Lee

32 "Computer Design" by Sunggu Lee
"Computer Design" by Sunggu Lee

33 "Computer Design" by Sunggu Lee
PLD-Based Approaches "Computer Design" by Sunggu Lee

34 "Computer Design" by Sunggu Lee
"Computer Design" by Sunggu Lee

35 "Computer Design" by Sunggu Lee
"Computer Design" by Sunggu Lee

36 Overall (Modified) ASM Process
Write down a pseudocode solution test it out using a short computer program Convert the pseudocode to an ASM chart try to “optimize” ASM chart, so it uses few states Derive the datapath from the ASM chart figure out the datapath components and signals needed Form a detailed ASM Chart Derive the control logic design "Computer Design" by Sunggu Lee

37 ASM Design Example (Prob. 4.14)
"Computer Design" by Sunggu Lee

38 "Computer Design" by Sunggu Lee
Solution Approach Assume input voltage range is [0 , Vmax] Use a binary approximation algorithm Actual value 0 Volts Vmax Volts Guess 3 Guess 2 Guess 1 "Computer Design" by Sunggu Lee

39 Step 1: Possible Pseudocode Solution
While (true) do /* all H/W circuits run “infinitely” */ 1. done <- 0; 2. If (START) then done <- 0; i <- 7; output < ; /* binary value */ While (!done) do If (greater) then output<i> <- 1; else if (less) then output<i> <- 0; else /* equal */ done <- 1; If (i > 0) then i <- i - 1; else done <- 1; If (!done) then output<i> <- 1; "Computer Design" by Sunggu Lee

40 "Computer Design" by Sunggu Lee
"Computer Design" by Sunggu Lee

41 "Computer Design" by Sunggu Lee
"Computer Design" by Sunggu Lee

42 Step 2: ASM Chart (Text Form)
s0: done  1; c0: if (START) goto s1; else goto s0; s1: done  0; i  7; output  80H; s2: c1: if (greater) goto s3; else if (less) goto s4; s3: output<i>  1; if (i > 0) i < i – 1; if (i > 0) goto s5; else goto s0; s4: output<i>  0; if (i > 0) i < i – 1; if (i > 0) goto s5; else goto s0; s5: output<i>  1; goto s2; "Computer Design" by Sunggu Lee

43 "Computer Design" by Sunggu Lee
Step 3: Datapath "Computer Design" by Sunggu Lee

44 Step 4: Detailed ASM Chart
s0: setdone c0: if (START) goto s1; else goto s0; s1: cleardone, loadi, initbits s2: c1: if (greater) goto s3; else if (less) goto s4; s3: setbit, zeroi’:(countDi), zeroi’:(goto s5), zeroi:(goto s0) s4: zeroi’:(countDi). zeroi’:(goto s5), zeroi:(goto s0) s5: setbit, (goto s2) "Computer Design" by Sunggu Lee

45 "Computer Design" by Sunggu Lee
Step 5: Control Logic "Computer Design" by Sunggu Lee

46 "Computer Design" by Sunggu Lee
Overall Design "Computer Design" by Sunggu Lee

47 Floating-Point Adder Example
Dedicated floating-point addition unit for IEEE standard 32-bit floating-point numbers Simplify the problem by assuming only positive floating-point numbers with no special cases IEEE Standard for floating-point numbers based on draft proposed by Kahan et. al. in 1979. "Computer Design" by Sunggu Lee

48 "Computer Design" by Sunggu Lee
"Computer Design" by Sunggu Lee

49 Floating-Point Addition Process
"Computer Design" by Sunggu Lee

50 "Computer Design" by Sunggu Lee
Step 1: Pseudocode "Computer Design" by Sunggu Lee

51 "Computer Design" by Sunggu Lee
Step 2: ASM Chart "Computer Design" by Sunggu Lee

52 "Computer Design" by Sunggu Lee
Step 3: Datapath "Computer Design" by Sunggu Lee

53 "Computer Design" by Sunggu Lee
Step 3: Datapath, version 2 "Computer Design" by Sunggu Lee

54 "Computer Design" by Sunggu Lee
Step 4: Detailed ASM "Computer Design" by Sunggu Lee

55 "Computer Design" by Sunggu Lee
Step 5: Control Logic "Computer Design" by Sunggu Lee

56 Derivation of Control Logic Equations
"Computer Design" by Sunggu Lee

57 Heuristics for Safe Design
Keep design modular and simple Develop good documentation during design Use design techniques to avoid clock skew Be careful with external asynchronous inputs Beware of noise on power and signal lines Avoid dependencies on minimum delays Initialize all flip-flops to known values "Computer Design" by Sunggu Lee

58 Modular Design and Documentation
Partition complex design into separate modules Each module should be separately testable Insert test input paths and mechanisms to observe intermediate signal values Start with the simplest versions of each module and follow an “iterative” design process Keep good documentation during design process net lists, physical placement maps HDL (hardware description language) documents "Computer Design" by Sunggu Lee

59 "Computer Design" by Sunggu Lee
Clock Skew Clock skews can lead to a violation of the synchronous circuit assumption and system failure Example of problem shown in Fig (p. 164) Solutions Try to equalize wire paths for all flip-flop clock inputs Don’t use “gated” clocks Use only positive-edge-triggered or only negative-edge-triggered flip-flops "Computer Design" by Sunggu Lee

60 "Computer Design" by Sunggu Lee
"Computer Design" by Sunggu Lee

61 "Computer Design" by Sunggu Lee
Asynchronous Inputs Avoid asynchronous inputs whenever possible Buffer remaining asynchronous inputs using FF’s For critical signals, use debounced switches debounced switch circuit shown in Fig (p. 167) Un-debounced switch circuit "Computer Design" by Sunggu Lee

62 Noise and Drive Problems
Connect all unused inputs to Ground or Vdd Use decoupling capacitors between Gnd and Vdd about one mF capacitor between all Vdd and Gnd pins perhaps one additional large (about 10 mF) capacitor Ensure sufficient drive from chip outputs to inputs VOHmin > VIHmin , VOLmax < VILmax , |IOHmax| >= S |IIHmax| at all receivers, |IOLmax| >= S |IILmax| at all receivers "Computer Design" by Sunggu Lee

63 "Computer Design" by Sunggu Lee
Question: How many 74ALS chip inputs can be driven by one 74AS chip output? "Computer Design" by Sunggu Lee

64 "Computer Design" by Sunggu Lee
Avoid delay dependencies Don’t use “delay lines” (series of inverters used to create certain “minimum” desired delays minimum delays cannot be relied upon Delay-insensitive design Flip-flop initialization "Computer Design" by Sunggu Lee


Download ppt "Chap. 4: A Systematic Approach to Logic Design"

Similar presentations


Ads by Google