BR 1/991 Dice Game Chap 22 1-to-6 Cntr Adder CntbCnta Point Register Comparator dicesum Test Logic ControlControl Roll D7 D11 D2312 eq Dpathb.vhd Dpatha.vhd.

Slides:



Advertisements
Similar presentations
Basic Finite State Machines 1. 2 Finite State Machines Binary encoded state machines –The number of flip-flops is the smallest number m such that 2 m.
Advertisements

General Sequential Design
CDA 3100 Recitation Week 11.
Lecture 23: Registers and Counters (2)
Registers and Counters
BR 1/991 Rb?Ra? D7 or D11? Roll D2312? Sp Rb?Ra?Eq?D7? Roll Lose Win S0 S1 S2 S4 S3 S5 Fig 1: Dice Game ASM Chart.
Registers and Counters. Register Register is built with gates, but has memory. The only type of flip-flop required in this class – the D flip-flop – Has.
BR 1/991 Hints on Meeting Project Constraints Clock Cycle Constraint (12 clocks) – More resources (multipliers, adders), less clocks –Can be done with.
CS 151 Digital Systems Design Lecture 25 State Reduction and Assignment.
CS 300 – Lecture 3 Intro to Computer Architecture / Assembly Language Sequential Circuits.
Contemporary Logic Design Sequential Case Studies © R.H. Katz Transparency No Chapter #7: Sequential Logic Case Studies 7.1, 7.2 Counters.
Asynchronous FSMs and Verilog. PLD registered output.
ENGIN112 L25: State Reduction and Assignment October 31, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 25 State Reduction and Assignment.
1 Lecture 15 Registers Counters Finite State Machine (FSM) design.
Computer Architecture Lecture 12 Fasih ur Rehman.
CS3350B Computer Architecture Winter 2015 Lecture 5.2: State Circuits: Circuits that Remember Marc Moreno Maza [Adapted.
Dr. H.v.d.Biggelaar / Mar3-Ver2 / 1 Engineering Technology Dr. H.v.d.Biggelaar March 22, 2000 State Machines in VHDL.
Chapter 2Basic Digital Logic1 Chapter 2. Basic Digital Logic2 Outlines  Basic Digital Logic Gates  Two types of digital logic circuits Combinational.
Computer Organization & Programming Chapter 5 Synchronous Components.
BR 1/991 Dice Game Implementation Why was dice game implemented in three 22V10 PLDs? What are the resources needed by the Dice Game? –Outputs: 6 for dice.
BR 1/991 Dice Game (Chapter 22) The dice game in Chapter 22 is a good example of a Finite State Machine controlling a Datapath. –The combined FSM/Datapath.
Finite State Machine (FSM) Nattha Jindapetch December 2008.
BR 1/991 DataPath Elements Altera LPM library has many elements useful for building common datapath functions –lpm_ram_dq - recommended for either asynchronous.
1 COMP541 State Machines – 2 Registers and Counters Montek Singh Feb 11, 2010.
Instructor: Alexander Stoytchev CprE 281: Digital Logic.
CEC 220 Digital Circuit Design Dice Game Wed, April 06 CEC 220 Digital Circuit Design Slide 1 of 15.
CDA 4253 FPGA System Design RTL Design Methodology 1 Hao Zheng Comp Sci & Eng USF.
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Logic Design Dr. Oliver Faust.
Chapter 8 Solving Larger Sequential Problems.
AND Gate Inputs Output Input A (Switch) Input B (Switch) Output Y (Lamp) 0 (Open) 0 (OFF) A B Lamp.
Interrupt, again! Lin Zhong ELEC424, Fall 2010.
Counters and registers Eng.Maha Alqubali. Registers Registers are groups of flip-flops, where each flip- flop is capable of storing one bit of information.
1 강의노트 09 Logic Design with ASM Charts: Based on Digital Systems Design Using VHDL, Chapter 5, by Charles H. Roth, Jr.
CSE260 Revision Final. MSI a) Implement the following function with 8:1 mux F(A,B,C,D) =∑(0,1,3,4,8,9,15) b) Construct AND, OR and NOT gates using 2:1.
Digital Design with SM Charts
Sequential statements (1) process
Class Exercise 1B.
Figure 8.1. The general form of a sequential circuit.
Digital Electronics Multiplexer
Flip Flops Lecture 10 CAP
Question 8.18 (page 397) Design a digital system that multiplies two unsigned binary numbers by the repeated addition method. For example, to multiply.
Digital Electronics Tutorial: Sequential Logic
Sequential Logic Counters and Registers
Digital Electronics Multiplexer
ECE 448 Lecture 6 Finite State Machines State Diagrams vs. Algorithmic State Machine (ASM) Charts.
Instructor: Alexander Stoytchev
Inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture #21 State Elements: Circuits that Remember Hello to James Muerle in the.
Instructor: Alexander Stoytchev
ECE 434 Advanced Digital System L13
Lecture 21 Logistics Today
Chapter 6 – Part 4 SYEN 3330 Digital Systems SYEN 3330 Digital Systems
Instructor: Alexander Stoytchev
CSE 370 – Winter Sequential Logic-2 - 1
CSE 370 – Winter Sequential Logic - 1
CSE 370 – Winter Sequential Logic-2 - 1
Lecture 17 Logistics Last lecture Today HW5 due on Wednesday
Instructor: Alexander Stoytchev
Week 10, Finite State Machine
FIGURE 1: SERIAL ADDER BLOCK DIAGRAM
Instructor: Alexander Stoytchev
Figure 8.1. The general form of a sequential circuit.
Switching Theory and Logic Design Chapter 5:
Lecture 17 Logistics Last lecture Today HW5 due on Wednesday
Advanced Computer Architecture Lecture 1
Lecture 18 Logistics Last Lecture Today HW6 due today Midterm 2
Lecture 18 Logistics Last lecture Today HW5 due today (with extra 10%)
Lecture 22 Logistics Last lecture Today HW7 is due on Friday
Lecture 22 Logistics Last lecture Today HW7 is due on Friday
CSE 370 – Winter Sequential Logic-2 - 1
CSE140: System Design Xinyuan Wang 05/31/2019.
Presentation transcript:

BR 1/991 Dice Game Chap 22 1-to-6 Cntr Adder CntbCnta Point Register Comparator dicesum Test Logic ControlControl Roll D7 D11 D2312 eq Dpathb.vhd Dpatha.vhd control.vhd Rb Ra sp win lose

BR 1/992 Dice Game Implementation Dice game implemented in three 22V10 PLDs –control.vhd (Finite State Machine) –dpatha.vhd (two 1-6 counters, adder) –dpathb.vhd (point register, comparator, test logic) The Control FSM is implemented using one-hot encoding. –Outputs q0, q1, q5 are states S0, S1, S5. Output “win” is state S2, output “lose” is state S3. Outputs q0,q1,q5 are available just for debugging purposes.

BR 1/993 Finite State Machine Changes Asynchronous Reset now use to exit states S2, S3. Resets back to State S0. S2 Win S3 Lose

BR 1/994 Finite State Machine Changes (cont). Because we don’t have debounced switches, added extra “roll” input called “Ra”. Changed States S1, S5 to use Ra, not Rb. S1 Ra 0 1 Roll S5 Ra 0 1 Roll This means that to roll the dice, you use flip switch Rb up, then down. This starts the dice rolling. To stop the dice, Flip Ra switch up then down.

BR 1/995 “dpatha” Details Clk C 3 EN R Cntr Q Roll (from control) Reset C 3 EN R Q Logic Roll Clk Reset Cntb Cnta AdderAdder 4 dicesum 3 Ena Ena = 1 when Cntb = 6 and Roll = 1 Counters count 1,2,3,4,5,6,1,2, etc

BR 1/996 “dpathb” Details DIN 4 C LD Register Point 4 R Dicesum (from dpatha) sp (from control) Compare Clk Reset Eq (1 if point = sum) Test Logic D7 (1 if sum=7) D7 (1 if sum=11) D2312 (1 if sum=2,3 or 12) “sp” (save point) loads value of dicesum into register.