(Sequential-Circuit Building Blocks)

Slides:



Advertisements
Similar presentations
Tutorial 2 Sequential Logic. Registers A register is basically a D Flip-Flop A D Flip Flop has 3 basic ports. D, Q, and Clock.
Advertisements

VHDL 4 Building blocks of a computer VHDL 4 : (ver.5a) 1.
1 Sequential Circuits Dr. Pang. 2 Outline Introduction to sequential circuits Basic latch Gated SR latch and gated D latch D flip-flop, T flip-flop, JK.
Fundamentals of Digital Signal Processing יהודה אפק, נתן אינטרטור אוניברסיטת תל אביב.
1 VLSI DESIGN USING VHDL Part II A workshop by Dr. Junaid Ahmed Zubairi.
Sequential-Circuit Building Blocks
Simple Sequential Circuits in VHDL. Contents Sequential circuit examples: - SR latch in dataflow style - D flip-flop in behavioral style - shift register.
CSCI 660 EEGN-CSCI 660 Introduction to VLSI Design Lecture 3 Khurram Kazi Some of the slides were taken from K Gaj ’ s lecture slides from GMU ’ s VHDL.
Kazi Fall 2006 EEGN 4941 EEGN-494 HDL Design Principles for VLSI/FPGAs Khurram Kazi Some of the slides were taken from K Gaj’s lecture slides from GMU’s.
Latches and Flip-Flops Discussion D4.1 Appendix J.
CSCI 660 EEGN-CSCI 660 Introduction to VLSI Design Lecture 2 Khurram Kazi Some of the slides were taken from K Gaj ’ s lecture slides from GMU ’ s VHDL.
ECE 545 Lecture 7 Behavioral Modeling of Sequential-Circuit Building Blocks Mixing Design Styles Modeling of Circuits with a Regular Structure.
ECE 448: Spring 12 Lab Midterm Exam Review. Part 1: Detailed discussion of a selected midterm from Spring Part 2: Review & discussion of common.
System Arch 2008 (Fire Tom Wada) /10/9 Field Programmable Gate Array.
CprE / ComS 583 Reconfigurable Computing Prof. Joseph Zambreno Department of Electrical and Computer Engineering Iowa State University Lecture #17 – Introduction.
1 Sequential Logic Lecture #7. 모바일컴퓨팅특강 2 강의순서 Latch FlipFlop Shift Register Counter.
George Mason University ECE 545 – Introduction to VHDL ECE 545 Lecture 5 Finite State Machines.
CprE / ComS 583 Reconfigurable Computing
ENG2410 Digital Design LAB #6 LAB #6 Sequential Logic Design (Flip Flops)
CSET 4650 Field Programmable Logic Devices Dan Solarek VHDL Additional Details & Examples.
1 ECE 545 – Introduction to VHDL ECE 545 Lecture 4 Behavioral & Structural Design Styles.
ENG241 Digital Design Week #8 Registers and Counters.
2’s Complement 4-Bit Saturator Discussion D2.8 Lab 2.
Feb. 26, 2001Systems Architecture I1 Systems Architecture I (CS ) Lecture 12: State Elements, Registers, and Memory * Jeremy R. Johnson Mon. Feb.
George Mason University Behavioral Modeling of Sequential-Circuit Building Blocks ECE 545 Lecture 6 Mixing Design Styles.
VHDL Discussion Finite State Machines
VHDL Discussion Sequential Sytems. Memory Elements. Registers. Counters IAY 0600 Digital Systems Design Alexander Sudnitson Tallinn University of Technology.
9/9/2006DSD,USIT,GGSIPU1 Concurrent vs Sequential Combinational vs Sequential logic –Combinational logic is that in which the output of the circuit depends.
04/26/20031 ECE 551: Digital System Design & Synthesis Lecture Set : Introduction to VHDL 12.2: VHDL versus Verilog (Separate File)
CDA 4253 FPGA System Design Sequential Circuit Building Blocks Hao Zheng Dept of Comp Sci & Eng USF.
ENG241 Digital Design Week #7 Sequential Circuits (Part B)
ECE 545—Digital System Design with VHDL Lecture 1
ECE DIGITAL LOGIC LECTURE 20: REGISTERS AND COUNTERS Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2015, 11/19/2015.
July 2, 2001Systems Architecture I1 Systems Architecture II (CS 282) Lab 3: State Elements, Registers, and Memory * Jeremy R. Johnson Monday July 2, 2001.
VHDL 4 Building blocks of a computer VHDL 4 : (ver.6a) 1.
George Mason University Behavioral Modeling of Sequential-Circuit Building Blocks ECE 545 Lecture 8.
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.
Fundamentals of Digital System Design Pradondet Nilagupta Lecture 7: Flip-flops, Registers, Counters Chapter 7.
Algorithmic State Machine (ASM) Charts: VHDL Code & Timing Diagrams
Sequential statements (1) process
Combinational logic circuit
LAB #6 Sequential Logic Design (Flip Flops, Shift Registers)
Finite State Machines (part 1)
Class Exercise 1B.
Describing Combinational Logic Using Processes
Registers and Counters
Figure 7.1 Control of an alarm system
Part II A workshop by Dr. Junaid Ahmed Zubairi
CHAPTER 17 VHDL FOR SEQUENTIAL LOGIC
Part IV: VHDL CODING.
Sequential-Circuit Building Blocks
Field Programmable Gate Array
Field Programmable Gate Array
Field Programmable Gate Array
Building blocks of a computer
CHAPTER 17 VHDL FOR SEQUENTIAL LOGIC
VHDL (VHSIC Hardware Description Language)
ECE 545 Lecture 6 Behavioral Modeling of Sequential-Circuit Building Blocks Mixing Design Styles Modeling of Circuits with a Regular Structure.
Concurrent vs Sequential
CPE 528: Lecture #5 Department of Electrical and Computer Engineering University of Alabama in Huntsville.
Behavioral Modeling of Sequential-Circuit Building Blocks
Sequntial-Circuit Building Blocks
Figure 8.1. The general form of a sequential circuit.
Finite State Machines (part 1)
Dr. Tassadaq Hussain Introduction to Verilog – Part-3 Expressing Sequential Circuits and FSM.
ECE 545 Lecture 9 Behavioral Modeling of Sequential-Circuit Building Blocks Mixing Design Styles Modeling of Circuits with a Regular Structure.
ECE 448 Lecture 6 Finite State Machines State Diagrams, State Tables, Algorithmic State Machine (ASM) Charts, and VHDL code ECE 448 – FPGA and ASIC Design.
CprE / ComS 583 Reconfigurable Computing
Sequntial-Circuit Building Blocks
디 지 털 시 스 템 설 계 UP2 Kit를 이용한 카운터 설계
Presentation transcript:

(Sequential-Circuit Building Blocks) EEL4712 Digital Design (Sequential-Circuit Building Blocks)

Register Transfer Level (RTL) Design Description Today’s Topic Combinational Logic Combinational Logic … Registers

Sequential Circuit In combinational circuits, the value of each output depend solely on the value of input signals In sequential circuits, the value of outputs depend not only on the present value of the inputs, but also Past behavior of the circuit Such circuit include storage elements to store the value of logic signals The content of the storage elements are said the state of the circuit Set Sensor Memory Element On/Off Alarm Reset

D Latch Graphical symbol Truth table Q(t+1) Clock D Q(t) – 1 1 1 1 – 1 1 1 1 Timing diagram t t t t 1 2 3 4 Clock D Q Time

D Latch LIBRARY ieee ; USE ieee.std_logic_1164.all ; ENTITY latch IS PORT ( D, Clock : IN STD_LOGIC ; Q : OUT STD_LOGIC) ; END latch ; ARCHITECTURE behavioral OF latch IS BEGIN PROCESS ( D, Clock ) IF Clock = '1' THEN Q <= D ; END IF ; END PROCESS ; END behavioral; D Q Clock

D Flip-Flop Graphical symbol Truth table Q(t+1) Clk D   1 1 – Q(t) 1 Clock   1 1 – Q(t) 1 – Q(t) Timing diagram t t t t 1 2 3 4 Clock D Q Time

D Flip-Flop LIBRARY ieee ; USE ieee.std_logic_1164.all ; ENTITY flipflop IS PORT ( D, Clock : IN STD_LOGIC ; Q : OUT STD_LOGIC) ; END flipflop ; ARCHITECTURE behavioral OF flipflop IS BEGIN PROCESS ( Clock ) IF Clock'EVENT AND Clock = '1' THEN Q <= D ; END IF ; END PROCESS ; END behavioral ; D Q Clock

D Flip-Flop LIBRARY ieee ; USE ieee.std_logic_1164.all ; ENTITY flipflop IS PORT ( D, Clock : IN STD_LOGIC ; Q : OUT STD_LOGIC) ; END flipflop ; ARCHITECTURE behavioral2 OF flipflop IS BEGIN PROCESS ( Clock ) IF rising_edge(Clock) THEN Q <= D ; END IF ; END PROCESS ; END behavioral2; D Q Clock

D Flip-Flop LIBRARY ieee ; USE ieee.std_logic_1164.all ; ENTITY flipflop IS PORT ( D, Clock : IN STD_LOGIC ; Q : OUT STD_LOGIC) ; END flipflop ; ARCHITECTURE behavioral3 OF flipflop IS BEGIN PROCESS WAIT UNTIL rising_edge(Clock) ; Q <= D ; END PROCESS ; END behavioral3 ; D Q Clock

D Flip-Flop with Asynchronous Reset LIBRARY ieee ; USE ieee.std_logic_1164.all ; ENTITY flipflop_ar IS PORT ( D, Resetn, Clock : IN STD_LOGIC ; Q : OUT STD_LOGIC) ; END flipflop_ar ; ARCHITECTURE behavioral OF flipflop_ar IS BEGIN PROCESS ( Resetn, Clock ) IF Resetn = '0' THEN Q <= '0' ; ELSIF rising_edge(Clock) THEN Q <= D ; END IF ; END PROCESS ; END behavioral ; D Q Clock Resetn

D Flip-Flop with Synchronous Reset LIBRARY ieee ; USE ieee.std_logic_1164.all ; ENTITY flipflop_sr IS PORT ( D, Resetn, Clock : IN STD_LOGIC ; Q : OUT STD_LOGIC) ; END flipflop_sr ; ARCHITECTURE behavioral OF flipflop_sr IS BEGIN PROCESS(Clock) IF rising_edge(Clock) THEN IF Resetn = '0' THEN Q <= '0' ; ELSE Q <= D ; END IF ; END IF; END PROCESS ; END behavioral ; D Q Clock Resetn

Asychronous vs. Synchronous In the IF loop, asynchronous items are Before the rising_edge(Clock) statement In the IF loop, synchronous items are After the rising_edge(Clock) statement

8-bit Register with Asynchronous Reset LIBRARY ieee ; USE ieee.std_logic_1164.all ; ENTITY reg8 IS PORT ( D : IN STD_LOGIC_VECTOR(7 DOWNTO 0) ; Resetn, Clock : IN STD_LOGIC ; Q : OUT STD_LOGIC_VECTOR(7 DOWNTO 0) ) ; END reg8 ; ARCHITECTURE behavioral OF reg8 IS BEGIN PROCESS ( Resetn, Clock ) IF Resetn = '0' THEN Q <= "00000000" ; ELSIF rising_edge(Clock) THEN Q <= D ; END IF ; END PROCESS ; END behavioral ;` Resetn Clock reg8 8 D Q

N-bit Register with Asynchronous Reset LIBRARY ieee ; USE ieee.std_logic_1164.all ; ENTITY regn IS GENERIC ( N : INTEGER := 16 ) ; PORT ( D : IN STD_LOGIC_VECTOR(N-1 DOWNTO 0) ; Resetn, Clock : IN STD_LOGIC ; Q : OUT STD_LOGIC_VECTOR(N-1 DOWNTO 0) ) ; END regn ; ARCHITECTURE behavioral OF regn IS BEGIN PROCESS ( Resetn, Clock ) IF Resetn = '0' THEN Q <= (OTHERS => '0') ; ELSIF rising_edge(Clock) THEN Q <= D ; END IF ; END PROCESS ; END behavioral ; Resetn Clock regn N D Q

A Word on Generics Generics are typically integer values In this class, the entity inputs and outputs should be std_logic or std_logic_vector But the generics can be integer Generics are given a default value GENERIC ( N : INTEGER := 16 ) ; This value can be overwritten when entity is instantiated as a component Generics are very useful when instantiating an often-used component Need a 32-bit register in one place, and 16-bit register in another Can use the same generic code, just configure them differently

Use of OTHERS OTHERS stand for any index value that has not been previously mentioned. Q <= “00000001” can be written as Q <= (0 => ‘1’, OTHERS => ‘0’) Q <= “10000001” can be written as Q <= (7 => ‘1’, 0 => ‘1’, OTHERS => ‘0’) or Q <= (7 | 0 => ‘1’, OTHERS => ‘0’) Q <= “00011110” can be written as Q <= (4 downto 1=> ‘1’, OTHERS => ‘0’)

N-bit Register with Enable LIBRARY ieee ; USE ieee.std_logic_1164.all ; ENTITY regne IS GENERIC ( N : INTEGER := 8 ) ; PORT ( D : IN STD_LOGIC_VECTOR(N-1 DOWNTO 0) ; Enable, Clock : IN STD_LOGIC ; Q : OUT STD_LOGIC_VECTOR(N-1 DOWNTO 0) ) ; END regne ; ARCHITECTURE behavioral OF regne IS BEGIN PROCESS (Clock) IF rising_edge(Clock) THEN IF Enable = '1' THEN Q <= D ; END IF ; END IF; END PROCESS ; END behavioral ; N N Enable D Q Clock regn

References https://ece.gmu.edu/coursewebpages/ECE/ECE545/F18/

Questions?