VHDL revision 15a1 VHDL revision. VHDL revision 15a2 Q1 A clocked 4-to-2-bit encoder circuit (with synchronous reset) has the following interfaces: RESET:

Slides:



Advertisements
Similar presentations
Lecture 23: Registers and Counters (2)
Advertisements

Registers and Counters
Analysis of Clocked Sequential Circuits
1 EE24C Digital Electronics Project Theory: Sequential Logic (part 2)
Shift Register Application Chapter 22 Subject: Digital System Year: 2009.
1 VLSI DESIGN USING VHDL Part II A workshop by Dr. Junaid Ahmed Zubairi.
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.
ENGIN112 L27: Counters November 5, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 27 Counters.
Lab 10 RT methodology (cont’d) Example 1 – a counter Example 2 – a repetitive-adder multiplier.
CS370 Counters. Overview °Counter: A register that goes through a prescribed series of states °Counters are important components in computers. °Counters.
Sequential Circuit Introduction to Counter
Counters and Registers
Lecture 21 Overview Counters Sequential logic design.
Lecture #5 In this lecture we will introduce the sequential circuits.
SEQUENTIAL CIRCUITS USING TTL 74XX ICS
Counting with Sequential Logic Experiment 8. Experiment 7 Questions 1. Determine the propagation delay (in number of gates) from each input to each output.
Introduction to Counter in VHDL

Elevator Controller We’re hired to design a digital elevator controller for a four-floor building st try: Design a counter that counts up.
Synchronous Counters ET 5. Thinking back In the past we have seen that asynchronous counters can be used to count binary in the order that we have filled.
Registers CPE 49 RMUTI KOTAT.
1 Registers and Counters A register consists of a group of flip-flops and gates that affect their transition. An n-bit register consists of n-bit flip-flops.
Rabie A. Ramadan Lecture 3
P. 4.1 Digital Technology and Computer Fundamentals Chapter 4 Digital Components.
Chapter 14 Introduction to Microprocessors. 2 Microcomputer A self-contained computer system that consists of CPU (central processing unit), memory (RAM.
Chapter 10 State Machine Design. 2 State Machine Definitions State Machine: A synchronous sequential circuit consisting of a sequential logic section.
VHDL in 1h Martin Schöberl. AK: JVMHWVHDL2 VHDL /= C, Java,… Think in hardware All constructs run concurrent Different from software programming Forget.
Introduction to Sequential Logic Design Finite State-Machine Design.
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Lecture 17 Dr. Shi Dept. of Electrical and Computer Engineering.
Important Components, Blocks and Methodologies. To remember 1.EXORS 2.Counters and Generalized Counters 3.State Machines (Moore, Mealy, Rabin-Scott) 4.Controllers.
ENG241 Digital Design Week #8 Registers and Counters.
Reaction Timer Project
Modern VLSI Design 4e: Chapter 8 Copyright  2008 Wayne Wolf Topics VHDL register-transfer modeling: –basics using traffic light controller; –synthesis.
Digital Logic Design.
CHAPTER 6 Sequential Circuits’ Analysis CHAPTER 6 Sequential Circuits’ Analysis Sichuan University Software College.
Registers and Counters
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.
Counters and Registers Synchronous Counters. 7-7 Synchronous Down and Up/Down Counters  In the previous lecture, we’ve learned how synchronous counters.
Digital System Design using VHDL
VHDL Project I: Serial Adder Matthew Murach Slides Available at:
VHDL 7: use of signals v.5a1 VHDL 7 Use of signals In processes and concurrent statements.
Chap 5. Registers and Counters
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.
Sequential statements (1) process
Class Exercise 1B.
LATCHED, FLIP-FLOPS,AND TIMERS
Homework Reading Machine Projects Labs Tokheim Chapter 9.1 – 9.6
Registers and Counters
Revision2 for CENG34340 (Self study exercise no need to submit)
CHAPTER 17 VHDL FOR SEQUENTIAL LOGIC
Revision Name __________ Student number______
Part IV: VHDL CODING.
EKT 221 : Digital 2 COUNTERS.
SLIDES FOR CHAPTER 12 REGISTERS AND COUNTERS
Sequential Circuit: Counter
Lecture 16 Arithmetic Circuits
Instructor: Alexander Stoytchev
Registers and Counters Register : A Group of Flip-Flops. N-Bit Register has N flip-flops. Each flip-flop stores 1-Bit Information. So N-Bit Register Stores.
In processes and concurrent statements
CHAPTER 17 VHDL FOR SEQUENTIAL LOGIC
29-Nov-18 Counters Chapter 5 (Sections ).
VHDL (VHSIC Hardware Description Language)
Introduction to Sequential Circuits
Lecture 17 Logistics Last lecture Today HW5 due on Wednesday
Lecture #5 In this lecture we will introduce the sequential circuits.
Figure 8.1. The general form of a sequential circuit.
Lecture 17 Logistics Last lecture Today HW5 due on Wednesday
Outline Registers Counters 5/11/2019.
Presentation transcript:

VHDL revision 15a1 VHDL revision

VHDL revision 15a2 Q1 A clocked 4-to-2-bit encoder circuit (with synchronous reset) has the following interfaces: RESET: in STD_LOGIC; CLK: in STD_LOGIC; D_IN: in STD_LOGIC_VECTOR(3 downto 0); D_OUT: out STD_LOGIC_VECTOR(1 downto 0). At each rising edge of CLK, D_OUT will depend on D_IN as follows: when D_IN is "0001", D_OUT will be "00" ; when D_IN is "0010", D_OUT will be "10" ; when D_IN is "0100", D_OUT will be "01" ; when D_IN is "1000", D_OUT will be "11". Write the VHDL entity declaration and architecture of the encoder.

VHDL revision 15a3 Q2(a)Write entity declaration (b) architecture A traffic light controller for controlling two sets of traffic lights (red and green lights facing pedestrians; and red, yellow, green lights facing cars and their drivers) at a pedestrian crossing has the following input/output signals: clk : This is an input signal. It will be connected to an external square wave source with a 1 second period. reset: An asynchronous reset signal. ped_red, pet_green: Two output signals for controlling the two (red, green) output lights facing pedestrains. When the signal is ‘1’ the corresponding light is on, otherwise the light is off. car_red, car_yellow, car_green: Three output signals for controlling the three (red, yellow, green) output lights facing cars and their drivers. When the signal is ‘1’ the corresponding light is on, otherwise the light is off. When the asynchronous reset= ‘1’, it will enter state1; when reset = ‘0’, it starts to change states. The traffic light pattern is changing at a rate of one state (or one pattern) per 16 seconds, and the sequence of the states and their display patterns are as follows: StateDisplay pattern for the state Next State (state1) ped_green is on and car_red is on  (state2) (state2) ped_red is on and car_red and car_yellow are on  (state3) (state3) ped_red is on and car_green is on  (state4) (state4) ped_red is on and car_yellow is on  (back to state1).

VHDL revision 15a4 Q2(b) Write VHDL –A synchronous input std_logic signal called “ped_request” is added to the design in (b). This signal is connected to a button for pedestrians to make road crossing requests. Normally, when no one presses the button (ped_request = ‘0’), the traffic light is changing according to the state sequence in (b). However, when somebody presses the button (ped_request = ‘1’), the traffic light controller should jump to state1 with a delayed of 8 or less seconds.

VHDL revision 15a5 Q3 Q3. A state machine has states A, B, C and D. It has an asynchronous RESET, a clock signal CLK, a 1-bit synchronous input signal INX and a 2-bit output signal OUTX. The flow diagram is shown below. Write the complete VHDL program for this design. State A OUTX = “01” State B OUTX= “11” State C OUTX = “10” State D OUTX= “00” RESET INX=’0’ INX=‘1’ INX=‘0’ RESET= ‘1’

VHDL revision 15a6 Q4 Q4. A 3-bit synchronous binary even/odd code counter has the following specifications. –It has a synchronous input EO and a clock signal CLK. –It has a 3-bit output (OUTX) –It has an asynchronous reset RST. –When RST is high, OUTX is reset to “000”, otherwise the counting is as follows: When EO is high the counter is counting even codes (Hex: 0,2,4,6,0,2,…), otherwise the counter is counting odd codes (Hex: 1,3,5,7,1,3,…). When the input EO has changed, the output is incremented once after the next clock rising edge. For example, the current output is 2 and EO is changed from high to low, the output after the next clock rising edge is 3, then the counter will start to count odd codes for subsequent clock rising edges. Or, when the current output is 5 and EO is changed from low to high, the output is 6 after the next clock rising edge, then the counter will start to count even codes for subsequent clock rising edges, etc. Write the VHDL program of the entity and architecture of the counter, the use of the operator ‘+’ is not allowed.

VHDL revision 15a7 Q5 Q5. A serial full-adder adds two bits at one time. Using two shift registers we can shift parallel inputs to the serial adder for adding, and the results can be converted back to parallel bits by the third shift register at the output of the serial full-adder. The inputs/outputs of the serial full-adder are as follows. –Single bit inputs: A, B, RESET, CLOCK. –Single bit outputs: SUM, CARRY. When RESET is 1, SUM and CARRY will be 0 irrespective of A, B, CARRY and CLOCK. When RESET is 0 and after each rising edge of CLOCK, A and B will be added according to the state of CARRY before the rising edge of CLOCK. After adding the result will be shown at SUM and CARRY. Write the VHDL program. Shift register Serial full-adder Shift register CLOCK BUS_A BUS_B ABAB CARRY SUM RESET

VHDL revision 15a8 a) Fill in the table. A, B should be stable at the rising edges of CLOCK. CARRY before the rising edge of CLOCK Inputs AB Result: SUM after the rising edge of CLOCK Result: CARRY after the rising edge of CLOCK