Revision2 for CENG34340 (Self study exercise no need to submit)

Slides:



Advertisements
Similar presentations
VHDL Lecture 1 Megan Peck EECS 443 Spring 08.
Advertisements

Analysis of Clocked Sequential Circuits
EKT 221 : Digital 2 ASM.
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:
8.4 Counters NextReturn Any clocked sequential circuit whose state diagram contains a single cycle is called a counter. The number of states in the cycle.
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.
CS370 Counters. Overview °Counter: A register that goes through a prescribed series of states °Counters are important components in computers. °Counters.
Registers and Counters
Design of Counters ..
1 Sequential Circuits Registers and Counters. 2 Master Slave Flip Flops.
Introduction to Counter in VHDL
Advanced FPGA Based System Design Lecture-9 & 10 VHDL Sequential Code By: Dr Imtiaz Hussain 1.
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Lecture 17 Dr. Shi Dept. of Electrical and Computer Engineering.
Counters. November 5, 2003 Introduction: Counters  Counters are circuits that cycle through a specified number of states.  Two types of counters: 
ENG241 Digital Design Week #8 Registers and Counters.
Asynch 1.1 Asynchronous Counters 1 ©Paul Godin Last Edit Sept 2009.
Chapter 1_4 Part III more on … Counters Chapter 1_4 Part III more on … Counters.
CHAPTER 8 - COUNTER -.
CascadedBCDCntr&Display Aim : Capture, simulate and implement a 2-digit, loadable BCD up/down counter, with chip enable I/P (CE) and chip enable O/P (CEO).
Counters - II. Outline  Synchronous (Parallel) Counters  Up/Down Synchronous Counters  Designing Synchronous Counters  Decoding A Counter  Counters.
Digital Logic Design.
June 9, s Massachusetts Institute of Technology 6.11s: Design of Motors, Generators and Drive Systems Switching Patterns and Simple Implementation.
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.
Counting with the Count.
Digital System Design using VHDL
VHDL 7: use of signals v.5a1 VHDL 7 Use of signals In processes and concurrent statements.
THEME 6: Frequency dividers. Digital counters with reduced counting modulus. Programmable digital counters. If the input pulses are more than K, the counter.
Synchronous Counters, ripple counter & other counters Lecture 2
UP/DOWN SYNCHRONOUS COUNTERS An up/down counter is one that is capable of progressing in either direction through a certain sequence. An up/down counter,
Why are Timer Functions Important?
Sequential statements (1) process
FLIP FLOPS Binary unit capable of storing one bit – 0 or 1
Demodulation PWM Signal
LATCHED, FLIP-FLOPS,AND TIMERS
Registers and Counters
Synchronous Counter with MSI Gates
Computer Organization
CHAPTER 17 VHDL FOR SEQUENTIAL LOGIC
Revision Name __________ Student number______
EKT 221 – Counters.
SLIDES FOR CHAPTER 12 REGISTERS AND COUNTERS
Sequential Circuit: Counter
Flip-Flop.
Instructor: Alexander Stoytchev
DIGITAL ELECTRONICS ТHEME 4: SEQUENTIAL LOGIC CIRCUITS. FLIP- FLOPS – ASYNCHRONOUS AND SYNCHRONOUS, R - S, D, T, J - K FLIP- FLOPS. The value of the outputs.
Digital Fundamentals with PLD Programming Floyd Chapter 10
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
Implementing Combinational and Sequential Logic in VHDL
Instructor: Alexander Stoytchev
Pulse-Width Modulation (PWM)
Synchronous Counters with MSI Gates
Developing More Advanced Testbenches
Programmable Interval timer 8253 / 8254
Synchronous Counters with MSI Gates
Digital Control Systems Waseem Gulsher
Registers and Register Transfers
Chapter 8 Counters Changjiang Zhang
Instructor: Alexander Stoytchev
Programmable Interval timer 8253 / 8254
MTE 202, Summer 2016 Digital Circuits Dr.-Ing. Saleh Hussin
Instructor: Alexander Stoytchev
Finite State Machines (part 1)
8253 – PROGRAMMABLE INTERVAL TIMER (PIT). What is a Timer? Timer is a specialized type of device that is used to measure timing intervals. Timers can.
Registers and Register Transfers
Instructor: Alexander Stoytchev
Counters.
System Controller Approach
Presentation transcript:

Revision2 for CENG34340 (Self study exercise no need to submit) Q2.1 : A signal generator is generating pulses of a repeating pattern at the 3-bit output ‘outx’, one cycle of the pattern is shown in the following figure.  The signal specifications of the generator are as follows. -- ‘clk’ is a clock input signal. -- ‘arst’ is an asynchronous input reset signal. When ‘arst’ is ‘1’, ‘outx’ is reset to ‘000’. Otherwise ‘outx’ is generating the pattern as specified above. a) Write the VHDL program of the signal generator. c) Quote the frequency of ‘clk’ used in your design. (version10) TA Time Outx 1Sec. 1Sec 0.5Sec. 0.5 sec. Outx= “010” Outx= “100” Outx=“001” Outx=“101” CENG3430 revision2 v.7b

Q2.2 : These are questions on counters and pattern generators. A pulse-width-modulation (PWM) generator converts an 8-bit digital input ‘Din’ into PWM pulses at the single bit output ‘outy’. One cycle of the PWM signal is 20ms and is shown below. The pulse on_time (y) is linearly proportional to the value of ‘Din’. Such that, when ‘Din’ is ‘0’, y is 0, and when ‘Din’ is 255, y is [255*(20/256)] ms, the signal specifications are as follows. ‘clk’ is a clock input signal. ‘Din’ is an 8-bit digital input signal. ‘outy’ is an output signal for the PWM pulses. ‘srst’ is a synchronous input reset signal. When ‘srst’ is 1, ‘outy’ is reset to 0. Otherwise ‘outy’ is generating pulses as specified. Sketch 1 cycle of the waveform of ‘outy’ when Din=’1’. Mark on your diagram the time (in ms) when ‘outy’ changes states. Sketch 1 cycle of the waveform of ‘outy’ when Din =’255’. Mark on your diagram the time (in ms) when ‘outy’ changes states. Write the VHDL program of this signal generator. Quote the frequency of ‘clk’ used in your design. (version10) Digital level 20ms : One cycle of the PWM pulses of ‘outy’ High =’1’ Low =’0’ On_time=y Off_time=20ms-y Time (ms) CENG3430 revision2 v.7b

Q2.3 A pattern generator system has a reset input RST, an input TAG, a clock input C1 and an output X which is a vector consisting of X(2), X(1), X(0). Write the entity declaration of a VHDL program for the above interface signals. Write the architecture body in each of the following different systems. (System 1) The reset (RST) of the system is synchronous. The system is an up/down counter. After reset (RST=1), output X is cleared. When RST=0, the pattern generator is a binary up/down counter, at each rising edge of C1, output X changes states. When TAG=1, the continuous counting sequence at X is counting upward. When TAG=0, the continuous counting sequence at X is counting downward. (System 2) The reset (RST) of the system is asynchronous. Every time after reset (RST=1), output X is cleared. When RST =0, at each rising edge of C1, output X changes states depending on TAG as follows. (During counting, TAG and RST remain unchanged.) If TAG is 1, the counting sequence at X is “111”, “101” , “010” , “011” and then X remains unchanged until the next reset arrives (when RST=1). If TAG is 0, the counting sequence at X is “000”, “111” , “001” and then X remains unchanged until the next reset arrives (when RST=1). (Version 9) CENG3430 revision2 v.7b

Hint: In VHDL you may write the value A in Hex as “1010” or x“A”. Q2.4 :A state machine (having states: s0,s1,s2,s3) changes states at the rising edge of a clock (CLK). The input and output signals used are shown as follows. Clock input: CLK Asynchronous Input: RST, Synchronous Input: INX, Output: OUTX (3 downto 0)  You are required to design the basic version of the state machine. When RST is ‘1’, the state is reset to s0, otherwise at each rising edge of CLK the state changes according to this pattern: s0s1s2s3back to s0 and so on. The output specification for each state is as follows. When INX is ‘1’, OUTX at state s0, s1, s2 and s3 are 1, 3, 5 and 7 (in hex) respectively. When INX is ‘0’, OUTX at state s0, s1, s2 and s3 are A,B,C and D (in hex) respectively. Hint: In VHDL you may write the value A in Hex as “1010” or x“A”.  Write the VHDL entity declaration and architecture for the state machine.  -You are required to modify the above version of the state machine based the following specification.  Add a signal: OUTY (3 downto 0), which has a value representing the difference between the OUTX of the current state and OUTX of the previous state. Describe how to modify the state machine in part (a) to fulfil the requirement. You may rewrite the VHDL entity declaration and architecture, or show the instructions needed to be added. Hint: You may add additional signals to the system. (version 9) CENG3430 revision2 v.7b