Figure 10.1. A flip-flop with an enable input. D Q Q Q R Clock E 0 1.

Slides:



Advertisements
Similar presentations
Multiplication and Division
Advertisements

Table 7.1 Verilog Operators.
//HDL Example 5-1 // //Description of D latch (See Fig.5-6) module D_latch (Q,D,control); output Q; input.
Verilog. 2 Behavioral Description initial:  is executed once at the beginning. always:  is repeated until the end of simulation.
FSM examples.
ECE 331 – Digital System Design Flip-Flops and Registers (Lecture #18) The slides included herein were taken from the materials accompanying Fundamentals.
1 COMP541 Sequencing and Control Montek Singh Mar 29, 2007.
Counters Discussion 12.1 Example 33. Counters 3-Bit, Divide-by-8 Counter 3-Bit Behavioral Counter in Verilog Modulo-5 Counter An N-Bit Counter.
Design example Binary Multiplier.
ELEN 468 Advanced Logic Design
COE 202 Introduction to Verilog Computer Engineering Department College of Computer Sciences and Engineering King Fahd University of Petroleum and Minerals.
COMPUTER ARCHITECTURE & OPERATIONS I Instructor: Hao Ji.
Registers and Shift Registers Discussion D8.2. D Flip-Flop X 0 Q 0 ~Q 0 D CLK Q ~Q D gets latched to Q on the rising edge of the clock. Positive.
D Flip-Flops in Verilog Discussion 10.3 Example 27.
Chapter 6 Memory and Programmable Logic Devices
Chapter 7 – Registers and Register Transfers Part 1 – Registers, Microoperations and Implementations Logic and Computer Design Fundamentals.
Mantıksal Tasarım – BBM231 M. Önder Efe
ETE Digital Electronics
CS/EE 3700 : Fundamentals of Digital System Design
Figure 7.1. Control of an alarm system. Memory element Alarm Sensor Reset Set OnOff 
Verilog Digital System Design Z. Navabi, 2006
CHAPTER 12 REGISTERS AND COUNTERS
Registers & Counters M. Önder Efe
Figure 6.1. A 2-to-1 multiplexer.
CoE3DJ4 Digital Systems Design Register transfers, sequencing and control (from chapters 7 and 8 of Mano and Kime)
Registers CPE 49 RMUTI KOTAT.
Logic and Computer Design Dr. Sanjay P. Ahuja, Ph.D. FIS Distinguished Professor of CIS ( ) School of Computing, UNF.
Lecture 9 RTL Design Methodology Sorting Example.
Figure 5.1. Conversion from decimal to binary.. Table 5.1. Numbers in different systems.
Figure 5.1. Conversion from decimal to binary.. Table 5.1. Numbers in different systems.
Chap 8. Sequencing and Control. 8.1 Introduction Binary information in a digital computer –data manipulated in a datapath with ALUs, registers, multiplexers,
1 Copyright © 2013 Elsevier Inc. All rights reserved. Chapter 5 Digital Building Blocks.
1 Workshop Topics - Outline Workshop 1 - Introduction Workshop 2 - module instantiation Workshop 3 - Lexical conventions Workshop 4 - Value Logic System.
Slide 1 6. VHDL/Verilog Behavioral Description. Slide 2 Verilog for Synthesis: Behavioral description Instead of instantiating components, describe them.
Register Transfer Level & Design with ASM
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Logic Circuits II.
1 COMP541 Sequential Circuits Montek Singh Feb 1, 2012.
Final Project. System Overview Description of Inputs reset: When LOW, a power on reset is performed. mode: When LOW, NORMal mode selected When HIGH,
Lecture 9 RTL Design Methodology. Structure of a Typical Digital System Datapath (Execution Unit) Controller (Control Unit) Data Inputs Data Outputs Control.
Behavioral Modelling - 1. Verilog Behavioral Modelling Behavioral Models represent functionality of the digital hardware. It describes how the circuit.
Figure ASM chart for the bit counter.. Figure Verilog code for the bit-counting circuit (Part a). module bitcount (Clock, Resetn, LA, s,
Figure 7.6. Gated SR latch. (a) Circuit Q Q R S R S R Clk Q Q S Time (c) Timing diagram Clk ? ? SR xx Q(t) (no change) 0 1.
Digital Electronics.
Instructor: Alexander Stoytchev CprE 281: Digital Logic.
Algorithmic State Machines Sorting Signed & Unsigned Data Types
Teaching Digital Logic courses with Altera Technology
ECE/CS 352 Digital System Fundamentals© T. Kaminski & C. Kime 1 ECE/CS 352 Digital Systems Fundamentals Fall 2000 Chapter 5 – Part 2 Tom Kaminski & Charles.
SYEN 3330 Digital SystemsJung H. Kim 1 SYEN 3330 Digital Systems Chapter 7 – Part 2.
Chapter 11: System Design Methodology Digital System Designs and Practices Using Verilog HDL and 2008, John Wiley11-1 Chapter 11: System Design.
Chapter 8 Solving Larger Sequential Problems.
ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU 99-1 Under-Graduate Project Design of Datapath Controllers Speaker: Shao-Wei Feng Adviser:
Figure Implementation of an FSM in a CPLD..
EKT 221 : DIGITAL 2.
Supplement on Verilog FF circuit examples
Supplement on Verilog for Algorithm State Machine Chart
Figure 8.1. The general form of a sequential circuit.
Lecture 11 Registers and Counters
Chapter 9: Sequential Logic Modules
Table 8.1 Verilog 2001 HDL Operators
Lecture 18 SORTING in Hardware.
Analog-to-Digital Converters
ECE 448 Lecture 13 Multipliers Timing Parameters
Register-Transfer Level Components in Verilog
Switching Theory and Logic Design Chapter 5:
The Verilog Hardware Description Language
RTL Design Methodology
RTL Design Methodology
RTL Design Methodology
RTL Design Methodology
RTL Design Methodology
Presentation transcript:

Figure A flip-flop with an enable input. D Q Q Q R Clock E 0 1

Figure Code for a D flip-flop with enable. module rege (R, Clock, Resetn, E, Q); input R, Clock, Resetn, E; output Q; reg Q; Clock or negedge Resetn) if (Resetn == 0) Q <= 0; else if (E) Q <= R; endmodule

Figure An n-bit register with an enable input. module regne (R, Clock, Resetn, E, Q); parameter n = 8; input [n-1:0] R; input Clock, Resetn, E; output [n-1:0] Q; reg [n-1:0] Q; Clock or negedge Resetn) if (Resetn == 0) Q <= 0; else if (E) Q <= R; endmodule

Figure A shift register with parallel-load and enable control inputs.

Figure A right-to-left shift register with an enable input. module shiftlne (R, L, E, w, Clock, Q); parameter n = 4; input [n-1:0] R; input L, E, w, Clock; output [n-1:0] Q; reg [n-1:0] Q; integer k; Clock) begin if (L) Q <= R; else if (E) begin Q[0] <= w; for (k = 1; k < n; k = k+1) Q[k] <= Q[k-1]; end endmodule

Figure An SRAM cell. Sel Data

Figure A 2 x 2 array of SRAM cells. Sel 1 0 Data 0 1

Figure A 2 m x n SRAM block. Sel m 1” Read Write d 0 d n1– d n2– q 0 q n1– q n2– m -to-2 m decoder Address a 0 a 1 a m1– Data outputs Data inputs

Figure Pseudo-code for the bit counter. B=0; while A  0 do if a 0 =1 then B=B+1 ; end if; Right-shift A ; end while;

Figure ASM chart for the pseudo-code in Figure Please see “portrait orientation” PowerPoint file for Chapter 10

Figure Datapath for the ASM chart in Figure

Figure ASM chart for the bit counter datapath circuit.

Figure Verilog code for the bit-counting circuit. Please see “portrait orientation” PowerPoint file for Chapter 10

Figure Simulation results for the bit-counting circuit.

Figure An algorithm for multiplication. (a)Manualmethod P=0 ; for i=0 to n1 do if b i =1 then P=P+A ; endif; Left-shift A ; endfor; (b)Pseudo-code Multiplicand1 1 Product Multiplier  Binary  Decimal –

Figure ASM chart for the multiplier. Please see “portrait orientation” PowerPoint file for Chapter 10

Figure Datapath circuit for the multiplier. Please see “portrait orientation” PowerPoint file for Chapter 10

Figure ASM chart for the multiplier control circuit. Please see “portrait orientation” PowerPoint file for Chapter 10

Figure Verilog code for the multiplier circuit. Please see “portrait orientation” PowerPoint file for Chapter 10

Figure Simulation results for the multiplier circuit.

Figure An algorithm for division. R=0 ; for i=0 to n1 do Left-shift R  A ; ifR  B then q i =1 ; R=RB ; else q i =0 ; endif; endfor; (c) Pseudo-code Q A B R (a) An example using decimal numbers (b) Using binary numbers – –

Figure ASM chart for the divider. Please see “portrait orientation” PowerPoint file for Chapter 10

Figure Datapath circuit for the divider.

Figure ASM chart for the divider control circuit. Please see “portrait orientation” PowerPoint file for Chapter 10

Figure An example of division using n = 8 clock cycles. Load A, B Clock cycle A/Q rr 0 R AB Shift left Subtract, Q 0 1  Shift left, Q 0 0 , Q 0 0 , Q 0 0  Subtract, Q 0 1 , Q 0 1 , Q 0 1  Shift left, Q 0 0 

Figure ASM chart for the enhanced divider control circuit. Please see “portrait orientation” PowerPoint file for Chapter 10

Figure Datapath circuit for the enhanced divider. Please see “portrait orientation” PowerPoint file for Chapter 10

Figure Verilog code for the divider circuit. Please see “portrait orientation” PowerPoint file for Chapter 10

Figure Simulation results for the divider circuit.

Figure An algorithm for finding the mean of k numbers. Please see “portrait orientation” PowerPoint file for Chapter 10

Figure Datapath circuit for the mean operation. Please see “portrait orientation” PowerPoint file for Chapter 10

Figure ASM chart for the mean operation control circuit. Please see “portrait orientation” PowerPoint file for Chapter 10

Figure Schematic of the mean circuit with an SRAM block.

Figure Simulation results for the mean circuit using SRAM.

Figure Pseudo-code for the sort operation. for i=0 to k2 do A=R i ; for j=i+1 to k1 do B=R j ; if B<A then R i =B ; R j =A ; A=R i ; end if; end for; – –

Figure ASM chart for the sort operation. Please see “portrait orientation” PowerPoint file for Chapter 10

Figure A part of the datapath circuit for the sort operation.

Figure A part of the datapath circuit for the sort operation.

Figure ASM chart for the control circuit. Please see “portrait orientation” PowerPoint file for Chapter 10

Figure Verilog code for the sorting circuit. Please see “portrait orientation” PowerPoint file for Chapter 10

Figure Simulation results for the sort operation. Please see “portrait orientation” PowerPoint file for Chapter 10

Figure Using tri-state buffers in the datapath circuit.

Figure Clock enable circuit. D Q Q Data Clock E

Figure An H tree clock distribution network. Clock ff

Figure A flip-flop in an integrated circuit.

Figure Flip-flop timing in a chip.

Figure Asynchronous inputs. D Q Q Data Clock (asynchronous) D Q Q Data (synchronous)

Figure Switch debouncing circuit. Data S R V DD R V R (a) Single-pole single-throw switch Data V DD R (b) Single-pole double-throw switch with a basic SR latch

Figure P10.1. Pseudo-code for integer division. Q=0 ; R=A ; while ((RB)>0) do R=RB ; Q=Q +1 ; end while; – –

Figure P10.2. The 555 programmable timer chip. 5 V R b R a 555 Timer C  F Clock (output)