Simple Sequential Circuits in VHDL. Contents Sequential circuit examples: - SR latch in dataflow style - D flip-flop in behavioral style - shift register.

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 Lecture 1 Megan Peck EECS 443 Spring 08.
Synchronous Sequential Logic
28/10/2007DSD,USIT,GGSIPU1 Latch & Register Inference.
1 Lecture 13 VHDL 3/16/09. 2 VHDL VHDL is a hardware description language. The behavior of a digital system can be described (specified) by writing a.
Arbitrary Waveform Discussion 5.5 Example 34.
Edge-Triggered D Flip-Flops Discussion D4.2 Example 26.
Latches and Flip-Flops
1 VLSI DESIGN USING VHDL Part II A workshop by Dr. Junaid Ahmed Zubairi.
Ring Counter Discussion D5.3 Example 32. Ring Counter if rising_edge(CLK) then for i in 0 to 2 loop s(i)
Logic Design Fundamentals - 3 Discussion D3.2. Logic Design Fundamentals - 3 Basic Gates Basic Combinational Circuits Basic Sequential Circuits.
Registers VHDL Tutorial R. E. Haskell and D. M. Hanna T2: Sequential Logic Circuits.
Integer Square Root.
6/27/20061 Sequence Detectors Lecture Notes – Lab 5 Sequence detection is the act of recognizing a predefined series of inputs A sequence detector is a.
6/12/20151 Sequence Detectors Lecture Notes – Lab 4 Sequence detection is the act of recognizing a predefined series of inputs A sequence detector is a.
FPGAs and VHDL Lecture L12.1. FPGAs and VHDL Field Programmable Gate Arrays (FPGAs) VHDL –2 x 1 MUX –4 x 1 MUX –An Adder –Binary-to-BCD Converter –A Register.
Counters Discussion D5.3 Example 33. Counters 3-Bit, Divide-by-8 Counter 3-Bit Behavioral Counter in Verilog Modulo-5 Counter An N-Bit Counter.
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.
VHDL And Synthesis Review. VHDL In Detail Things that we will look at: –Port and Types –Arithmetic Operators –Design styles for Synthesis.
Latches and Flip-Flops Discussion D4.1 Appendix J.
Advanced Verilog EECS 270 v10/23/06.
Shift Registers Discussion D5.2 Example Bit Shift Register qs(3) qs(2) qs(1) qs(0) if rising_edge(CLK) then for i in 0 to 2 loop s(i) := s(i+1);
4-bit Shift Register. 2-bit Register Serial-in-serial-out Shift Register.
Introduction to VHDL (part 2)
CprE / ComS 583 Reconfigurable Computing Prof. Joseph Zambreno Department of Electrical and Computer Engineering Iowa State University Lecture #17 – Introduction.
Chapter 10 State Machine Design. 2 State Machine Definitions State Machine: A synchronous sequential circuit consisting of a sequential logic section.
1 Sequential Logic Lecture #7. 모바일컴퓨팅특강 2 강의순서 Latch FlipFlop Shift Register Counter.
Copyright © 1997 Altera Corporation & 提供 What is VHDL Very high speed integrated Hardware Description Language (VHDL) –is.
ENG241 Digital Design Week #8 Registers and Counters.
VHDL for Combinational Circuits. VHDL We Know Simple assignment statements –f
Lab 05 Sen Ma.
Introduction to VHDL Simulation … Synthesis …. The digital design process… Initial specification Block diagram Final product Circuit equations Logic design.
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.
VHDL Discussion Sequential Sytems. Memory Elements. Registers. Counters IAY 0600 Digital Systems Design Alexander Sudnitson Tallinn University of Technology.
 Seattle Pacific University EE Logic System DesignCounters-1 Shift Registers DQ clk DQ DQ ShiftIn Q3Q3 Q2Q2 DQ Q1Q1 Q0Q0 A shift register shifts.
1 Part III: VHDL CODING. 2 Design StructureData TypesOperators and AttributesConcurrent DesignSequential DesignSignals and VariablesState Machines A VHDL.
CEC 220 Digital Circuit Design Latches and Flip-Flops Monday, March 03 CEC 220 Digital Circuit Design Slide 1 of 19.
04/26/20031 ECE 551: Digital System Design & Synthesis Lecture Set : Introduction to VHDL 12.2: VHDL versus Verilog (Separate File)
CEC 220 Digital Circuit Design VHDL in Sequential Logic Wednesday, March 25 CEC 220 Digital Circuit Design Slide 1 of 13.
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.
George Mason University Behavioral Modeling of Sequential-Circuit Building Blocks ECE 545 Lecture 8.
Registers and Counters Discussion D8.1. Logic Design Fundamentals - 3 Registers Counters Shift Registers.
Fundamentals of Digital System Design Pradondet Nilagupta Lecture 7: Flip-flops, Registers, Counters Chapter 7.
Combinational logic circuit
LAB #6 Sequential Logic Design (Flip Flops, Shift Registers)
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
Combinational Circuits Using VHDL
Chapter 6 VHDL models of sequential logic blocks
Sequential-Circuit Building Blocks
CHAPTER 17 VHDL FOR SEQUENTIAL LOGIC
VHDL (VHSIC Hardware Description Language)
VHDL Structural Architecture
Concurrent vs Sequential
IAS 0600 Digital Systems Design
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.
CprE / ComS 583 Reconfigurable Computing
Sequntial-Circuit Building Blocks
4-Input Gates VHDL for Loops
디 지 털 시 스 템 설 계 UP2 Kit를 이용한 카운터 설계
(Sequential-Circuit Building Blocks)
EEL4712 Digital Design (Midterm 1 Review).
Presentation transcript:

Simple Sequential Circuits in VHDL

Contents Sequential circuit examples: - SR latch in dataflow style - D flip-flop in behavioral style - shift register (8-bit) in behavioral style

Definition of an SR latch Using Dataflow library IEEE; use IEEE. std_logic_1164.all; entity SRlatch is port (S,R: in std_logic; - - SR latch control inputs. Q, QN: out std_logic); -- outputs. end SRlatch; -- Dataflow. No processes or components. architecture SRlatch_arch1 of SRlatch is -- recall that all of the following are executed in parallel. begin QN <= S nor Q; -- a change in S or Q executes the command. Q <= R nor QN; -- a change in R or QN executes the command. end SRlatch_arch1; -- terminate execution when there are no more changes.

D flip-flop in Behavioral Style (I/II) library IEEE; use IEEE.std_logic_1164.all; entity VposD is port (CLK, CLR, D: in std_logic; -- inputs, D specifies what needs to be stored Q, QN: out std_logic); -- flip-flop contents end VposDff; -- for behavioral style, use a process. architecture VposDff_arch of VposDff is begin process (CLK, CLR) begin -- execution if there is a change in CLK or CLR if CLR='1' then Q<='0'; QN<='1' -- asynchronous CLR. elsif CLK' event and CLK='1' then Q<=D; QN<=not D; -- changes at rising edges end if; end process; end VposDff_arch;

Here is a simplified version: process -- without a sensitivity list, it will always be executed -- recall that the following are executed serially (as in "C“) wait until CLK='1'; Q<= D; end process Or for an even simpler implementation, we include the following line in an architecture definition, where everything is executed in parallel: Q<= D when CLK' event and CLK='1' else Q; … where everything has been defined as of type std_logic. D flip-flop in Behavioral Style (II/II)

Shift-register in Behavioral Style (Wakerly, p. 742) library IEEE; use IEEE.std_logic_1164.all; -- Use processes for behavioral style -- CLK defines the clock. All changes occur at the rising edges. -- S selects the function to be executed -- D stores the information that we would like to load. -- Q contains the register contents. entity Vshftreg is – define inputs and outputs to the register port (CLK, CLR, RIN, LIN: in STD_LOGIC; -- Clock, clear, shift bits in/out S: in STD_LOGIC_VECTOR (2 downto 0); -- select function D: in STD_LOGIC_VECTOR (7 downto 0); -- load data Q: out STD_LOGIC_VECTOR (7 downto 0)); -- register contents end Vshftreg;

Αrchitecture Vshftreg_arch of Vshftreg is signal IQ : STD_LOGIC_VECTOR (7 downto 0) – local signal variables begin process (CLK, CLR, IQ) – execution if there is a change in CLK, CLR, IQ begin -- internally, all commands are executed serially (as in "C"). if (CLR='1') then IQ '0'); -- Asynchronous clear elsif (CLK => 'event and CLK='1') then -- load at the rising edge case CONV_INTEGER(S) is when 0 => null;--Hold when 1 => IQ <= D;--Load when 2 => IQ <= RIN & IQ (7 downto 1)--Shift right when 3 => IQ <= IQ(6 downto 0) & LIN;--Shift left when 4 => IQ <= IQ(0) & IQ(7 downto 1);--Shift circular right when 5 => IQ <= IQ(6 downto 0) & IQ(7);--Shift circular left when 6 => IQ <= IQ(7) & IQ(7 downto 1);--Shift circular right when 7 => IQ <= IQ(6 downto 0) & '0';--Shift circular left when others => null; end case; end if; Q <= IQ; -- read what has been stored. end process; end Vshftreg_arch;