COMPUTER ENGINEERING PROGRAM
|
|
- Merry Hoover
- 7 years ago
- Views:
Transcription
1 Learning Objectives COMPUTER ENGINEERING PROGRAM California Polytechnic State University CPE 169 Experiment 8 Basic Binary Counter Design Using Sequential Logic 1. Digital Systems Design To design and implement several sequential binary arithmetic circuits 2. Xilinx Design Methodology and VHDL To gain more experience with VHDL structural modeling To use VHDL to design basic sequential circuits To use the iterative modular design technique to construct a complex sequential circuit To gain more experience using the Logic Analyzer Introduction and Overview This experiment introduces the most basic element of sequential circuits: the flip-flop. Flip-flops are commonly used in the design of binary counters. In this experiment you will use VHDL behavioral modeling to design a basic flip-flop. This design is then extended using the iterative modular design approach and VHDL structural modeling to generate a 4-bit binary counter. This binary counter is tested using two methods: 1) visual inspection based on the outputs of the 7-segment display and, 2) by directly viewing its outputs on the logic analyzer. Latches and flip-flops are the fundamental building blocks of sequential circuits. The outputs of sequential circuits depend on both the current circuit outputs as well as the circuit s inputs. The current outputs of a sequential circuit are fed back to the input circuitry which uses them in combination with the current inputs to generate a new output. Sequential circuits are often referred to as state machines which allow certain outputs of the circuit to be referred to as the current state of the machine. The state of the machine is stored in the bit-storage elements of the circuit, namely the flip-flops. Examples of other common sequential circuits include registers, counters, finite state machines (FSMs), and semiconductor-based memory. Latches and flip-flops are available as discrete components (e.g., 74xx series parts) or as part of a programmable logic device (e.g., the Xilinx FPGA we use in lab). There are four standard flip-flops: the D data flip-flop, the T toggle flip-flop, the JK (Rowling??) flip-flop, and the SR set-reset flip-flop. Each different flip-flop has its own set of behavioral characteristics. The manner in which a flip-flop behaves, i.e., how the next output is affected by the current state and current inputs, is described by its characteristic equation. The characteristic equations of the four standard flip-flops are shown in Table 1. Flip-flop D T Characteristic Equation + Q = D Q + = Q T JK SR Q Q + + = J Q + K Q = S + R Q Table 1: The characteristic equations for the common types of flip-flops. 3/1/
2 It is worth noting that you can implement any standard flip-flop using any other type of flip-flop with the help of some additional logic gates. Therefore, virtually all PLDs on the market today only provide D flipflops as their on-board storage elements. The other three flip-flops are more typically found in custom chips (ASICs) as they tend to minimize next-state and output logic for sequential logic circuits, due to the fact that different operating characteristics are embedded in the behavior of the flip-flop itself. For example, in today s lab, you ll design a T flip-flop in VHDL and use this building block (iterative modular design again) to design and implement a 4-bit binary counter. The toggling behavior of the T flip-flop makes it particularly well suited for creating binary counters (whose output bits toggle in coordinated ways at different rates). Using VHDL for Sequential Circuits All the circuits we ve implemented up until now have been combinational logic circuits. In other words, none of the circuits we ve examined so far were able to store information. This section describes some of the various methods used to describe simple sequential circuits. You ll later extend this knowledge in the procedural portion of this experiment. This discussion is limited to VHDL behavioral models for several different flavors of D flip-flops. The approaches to designing flip-flops shown in this section cover just about all the possible functionality you could imagine adding to a D flip-flop. Once you understand these basics, you ll be on your way to understanding how to use VHDL to design interesting circuits such as counters and Finite State Machines. Simple Storage Elements Using VHDL The general approach to learning about storage elements is to study the properties of the basic crosscoupled cell. The cross-coupled cell is able to store one bit of data and is often referred to as a latch. Although latches are highly useful, increased functionality from the latch is obtained by adding some type of control signal. This control signal, which is usually some type of clock signal, is further modified by limiting the window of time in which a change in the cell s inputs can cause a change in the cell s output. The addition of pulse narrowing circuitry to the clock, or the arrangement of two latches in a masterslave configuration, has the effect of transmogrifying the lowly latch into the illustrious flip-flop. Flipflops, due to their added control and functionality, are much more common than latches in typical real world digital circuits. The following notes on VHDL for storage elements starts at the simplest form of an edge-triggered D flipflop. The VHDL examples that follow present the basic edge-triggered D flip-flop with an assortment of added functionality. EXAMPLE 1 Write the VHDL code that describes a D flip-flop shown to the right. Use a behavioral model in your description. Solution: The solution to EXAMPLE 1 is shown in Figure 1. Listed below are a few interesting things to note about the solution. The given architecture body describes the my_d_ff version of the d_ff entity. Because the example requested the use of a behavioral model, the architecture body is comprised of a process statement. The statements within the process are executed sequentially. The process is executed each time a change is detected in any of the signals in the process s sensitivity list. In this case, the statements within the process are executed each time there is a change in logic level of the D or CLK signals. 3/1/
3 The rising_edge() is a system-defined function that is used in the if statement to indicate that changes in the circuit output can occur only on the rising edge of the CLK input. The way the if statement is written makes this circuit synchronous since changes are synchronized with the rising edge of the clock signal. In this case, the action is a transfer of the logic level on the D input to the Q output. The D flip-flop is best known and loved for its ability to store (save, remember) a single bit of information. The way that the VHDL code listed in Figure 1 is able to store a bit, however, is not obvious. The bitstorage capability in the VHDL is not explicitly stated; but is implied by both the VHDL code statements and the way the VHDL code is interpreted. The implied storage results from the if statement not providing any indication of what should happen when the listed if condition is not met. In other words, if the if condition is not met (does not evaluate as true ), the device does not change the current value of Q and therefore must remember that current value (so it can be maintained on the output). The remembering of the current value of Q, or the current state, constitutes the advertised bit-storage quality of a flip-flop. Consider reading this again; it s vitally important in all digital circuit design. Providing an action to be performed when the if condition is not met is generally done by using an else clause in the VHDL code. Therefore, if no else clause appears for an if statement, you can count on the VHDL compiler creating some bit-storage circuitry as a result. entity d_ff is port ( end d_ff; D : in std_logic; CLK : in std_logic; Q : out std_logic); architecture my_d_ff of d_ff is dff: process (D, CLK) if (rising_edge(clk)) then Q <= D; end process dff; end my_d_ff; Figure 1: Solution to EXAMPLE 1. EXAMPLE 2 Write the VHDL code that describes the D flip-flop shown. Use a behavioral model in your description. Consider the S input to be an activelow, synchronous input that sets the D flip-flop output to 1 when asserted. Solution: The solution to EXAMPLE 2 is shown in Figure 2. There are a few things of interest regarding this solution. The S input to the flip-flop is made synchronous by only allowing it to affect the operation of the flip-flop on the rising edge of the system clock. On the rising edge of the clock, the S input takes precedence over the D input based upon the appearance of these statements in the source code. In other words, the signal on the D input is transferred to the output only on the rising edge of the clock and only if the S input is not asserted. Since the flip-flop output can only change coincident with an edge of the CLK signal (including any response to the synchronous set input S), the CLK signal is actually the only one that must appear in the process s sensitivity list. The D and S inputs in this list are not essential in this case. 3/1/
4 entity d_ff_ns is port ( end d_ff_ns; D,S,CLK : in std_logic; Q : out std_logic); architecture my_d_ff_ns of d_ff_ns is dff: process (D,S,CLK) if (rising_edge(clk)) then if (S = 0 ) then Q <= 1 ; else Q <= D; end process dff; end my_d_ff_ns; Figure 2: Solution to EXAMPLE 2. EXAMPLE 3 Write the VHDL code that describes the negative edge-triggered D flip-flop shown to the right. Use a behavioral model in your description. Consider the R input to be an active-high, asynchronous input that resets the D flip-flop outputs when asserted. Also consider the R input to have precedence over the CLK and D inputs. Solution: The solution to EXAMPLE 3 is shown in Figure 3. You can probably glean the most information about asynchronous and synchronous inputs by comparing the solutions to EXAMPLE 2 and EXAMPLE 3. The major differences you should observe include: The reset input is independent of the clock and takes priority over the clock. This is done by making the reset condition the first condition in the if statement. Evaluation of the other conditions continues only if the R input does not evaluate to a 1. Since the flip-flop output can now respond directly to the asynchronous reset input, the R input signal must now appear in the process s sensitivity list. The falling_edge( ) function is now used to achieve the desired negative (falling) edgetriggered clocking behavior for the device. entity d_ff_r is port ( end d_ff_r; D,R,CLK : in std_logic; Q : out std_logic); architecture my_d_ff_r of d_ff_r is dff: process (D,R,CLK) if (R = 1 ) then Q <= 0 ; elsif (falling_edge(clk)) then Q <= D; end process dff; end my_d_ff_r; Figure 3: Solution to EXAMPLE 3. The solutions of EXAMPLE 2 and EXAMPLE 3 represent what can be considered the standard VHDL approaches to handling synchronous and asynchronous inputs, respectively. The general forms of these solutions are actually considered templates for synchronous and asynchronous inputs by several VHDL references. As you ll see later, these solutions form the foundation to finite state machine design using VHDL. 3/1/
5 Output Signals Used as Inputs Note in Figure 3 that there is no need to use any of the entity output signals as an input in an equation. (Recall that input signals appear on the right side of the signal assignment operator while output signals appear on the left side). The reason that this worked out so nicely was that in the original excitation equations for the flip-flops given in Table 1, there are no Q s on the right side of the signal assignment operator for the D flip-flop. For this experiment, you ll be building a T flip-flop (which is not so fortunate), so you ll need to take appropriate action. The key to your success on this is to use intermediate signals to temporarily hold the output values when they are assigned inside the process statement, and then to reassign these intermediate signals to the appropriate entity output signals using concurrent signal assignments outside of the process. Since a process statement is also a concurrent signal assignment, you ve not added any new hardware. You ve simply performed a standard work-around of this fairly typical VHDL dilemma. For your pleasure and enjoyment, Figure 4 shows an example of what is being described here with words. The cool thing to note here is that the intermediate signals, unlike the signals appearing in the entity, do not have mode specifiers (such as in or out) associated with them. Keep in mind that entity signals with modes of output can not appear on the right side of the signal assignment operator. (Entity outputs can not be used as inputs to the logic for other signals.) However, intermediate signals can be used on either side of an assignment statement. (Good thing for us!) entity my_thang is port ( CLK : in std_logic; Y1,Y2 : out std_logic); end my_thang; architecture my_thangy of my_thang is signal t_y1,t_y2 : std_logic; -- intermediate signals process (CLK,t_y1,t_y2) if (rising_edge(clk)) then -- assignment to the intermediate signals; note that -- t_y1 & t_y2 appear on right side of <= t_y1 <= t_y1 and (not t_y2); -- f(t_y1,t_y2) t_y2 <= (not t_y2) or t_y1; -- f(t_y1,t_y2) end process; Y1 <= t_y1; -- assignment to external interface variables Y2 <= t_y2; end my_thangy; Figure 4: An example showing clever way to use output as input. Procedure Procedure Overview: In this experiment, you ll design two modules which are later integrated into one circuit. An outline of the procedure is listed below. 1) Design and simulate a T flip-flop. 2) Design, simulate, and test a 4-bit binary counter using four T flip-flops and structural modeling. 3) Visually test the 4-bit counter by using it to drive a BCD to 7-segment decoder (Experiment 6). 4) Verify the outputs of the counter using the Logic Analyzer. 3/1/
6 Procedure 1: Implementation of a T Flip-Flop 1. Design a rising-edge triggered (RET) T flip-flop in VHDL by entering the characteristic equation of the T flip-flop using VHDL syntax. This flip-flop should contain an enable input EN that controls when and if the flip-flop toggles its present state. A description of the T flip-flop is provided in Figure 5. Include a black-box diagram for your flip-flop and include it in your report along with your VHDL code. EN CLK T Q Q 1 0 Q 1 1 Q Figure 5: Black-box diagram and operational characteristics of the T flip-flop. 2. Verify the operation of your flip-flop using ModelSim and include an annotated printout of the simulation with your lab report. Note that since this is a synchronous circuit that uses a clock (CLK), you should set the Clock Information in the Initial Timing and Clock Wizard to Single Clock instead of Combinatorial, when creating the new Testbench Waveform source. Note also that the simulator often generates an unknown output level for sequential circuits such as flip-flops. If this is the case, assign an initial value to your intermediate signal as follows: signal t_q : std_logic := 0 ; -- signal initialization Procedure 2: 4-bit Counter with Enable 1. Using the T flip-flop you designed in Procedure 1, design a 4-bit counter. A black-box diagram of this counter is shown in Figure 6 and should be included in your lab report. a. The output of the counter increments on the rising edge of the clock signal (clk). b. This counter should contain an enable input (en), which when asserted allows the counter to count up in a normal binary sequence. If the enable input is not asserted, the counter does not change state (meaning it does not count). c. Individual T flip-flops provide each of the 4 output count bits. (Each count bit is the output of a different T flip-flop.) NOTE: Implementing this counter requires that additional logic be included in addition to the T flip-flops. In determining the necessary logic, keep in mind that any bit position toggles only when all lower-order bits are 1 and the enable signal is asserted. There are multiple ways to design this counter. Think about the basic characteristics of a T flip-flop and how that would relate to the individual bit values in a binary count sequence. Your lab report should also contain a block diagram showing the underlying logic you used to generate the 4-bit counter. Figure 6: Black-box diagram of the 4-bit counter. 3/1/
7 2. Implement the 4-bit counter using VHDL structural modeling using individual T flip-flops as components that provide each of the 4 output count bits. Include any additional glue logic required to make it count in a normal binary sequence. Create your VHDL source module for the counter in the same Project as the T flip-flop. 3. Test your counter using ModelSim to verify its proper operation. Include an annotated printout of the simulation in your lab report. Procedure 3: Visual Testing of 4-Bit Counter 1. Using VHDL structural modeling, create a new circuit comprised of the 4-bit counter designed in Procedure 2 and the BCD-to-7-segment decoder that you designed in Experiment 6. Connect the output of the counter so that it displays the count value on a 7-segment display. This circuit allows for visual testing of your 4-bit counter. Block diagrams of this circuit and its connection to the 7-segment display are shown in Figure 7. Note that if you re using a Nexys board, you need to include and integrate the CLK_DIV module into your circuit in order to slow down the clock that is incrementing the counter. The VHDL code for the CLK_DIV module is found on the CPE 169 course website. Be sure to include a block diagram of your circuit that matches your VHDL structural design in your lab report. 2. Import your BCD-to-7-Segment Display module source code into the project and connect the output of the counter so that it displays the count value on a 7-segment display. 3. Implement your 4-bit counter with output display on your Development Board and demonstrate it to your instructor. Figure 7: Circuit used for visually testing the 4-bit counter on the Nexys board. Procedure 4: Logic Analyzer Testing of Counter (Optional Check with your lab instructor) 1. Complete an FPGA pin assignment (Assign Package Pins) and create a configuration file for your counter circuit from Procedure 2. Refer to the Reference Manual for your development board to determine FPGA pin assignments needed to connect the counter output bits to signals that are wired to an Expansion connector, to make the signals available to the Logic Analyzer. 2. Following the same procedure as detailed in Experiment 5, connect the 4-bit counter designed in Procedure 2 to the Logic Analyzer POD and view the count output on the screen. 3. Demonstrate to your instructor that the Logic Analyzer is correctly displaying the counter s output. Include a printout of the waveform from the Logic Analyzer (if available) in your report. 3/1/
8 Questions 1. How would you implement a T flip-flop using a D flip-flop and some additional logic gates? Use discrete logic for your solution and draw the circuit in your report. 2. How would you implement a D flip-flop using a T flip-flop and some additional logic gates? Use discrete logic for your solution and draw the circuit in your report. 3. What were the operational characteristics of the circuit used in Procedure 2? In other words, completely describe the operation of the 4-bit counter used in this procedure. What output values were expected? How often would each output change? What controlled whether or not and when the outputs updated? What determined the particular sequence of values seen on the output? 4. The 4-bit counter implemented in this experiment was designed using T flip-flops and structural modeling. There was one major drawback of this design approach. What was that drawback? Is there a better method of designing counters using VHDL? (Hint: Check the VHDL source code for the CLK_DIV module provided.) 5. The BCD to 7-segment decoder used in this experiment was reused from a previous experiment. The original device, however, was not designed to be as generic as it could have been; but was designed specifically to work with the displays on your particular development board. Describe an approach to designing and applying a BCD to 7-segment decoder design that is more generic. 6. In the final test circuit, what was displayed on the output when the count value is greater than nine? Why is this? Is this a problem? 7. Completely describe the operation of the circuit used in Procedure 3. What should be observed if it is functioning correctly? What initiates or stops the behavior observed? What controls the rate of updates in the observed outputs? What is the function of each device used, and how does it contribute to the overall functioning of the system? 8. The Nexys Board includes a Xilinx XCF02S Flash PROM that can more permanently store the FPGA's configuration program so that it does not have to be downloaded every time the board is powered up. This is the other device that keeps showing up in the Scan Chain along with the FPGA whenever you program the Nexys board using the Digilent ExPORT tool. A Flash PROM is a reprogrammable, nonvolatile memory device; which means that it will "remember" its programming even when there is no power supplied to it (nonvolatile); and it can be erased and programmed more than once (reprogrammable). In a typical "real world" design with an FPGA, a nonvolatile memory like a Flash PROM is interconnected with the FPGA so that the FPGA program will be loaded from the PROM automatically when the system is powered up or reset; thus making it appear that the FPGA is nonvolatile. For the specific Flash PROM used on the Nexys board, how long can a particular FPGA configuration be reliably stored (retained) in the Flash PROM once it has been programmed? How many times can the configuration information be reprogrammed in the Flash PROM? (Check out the data sheets for this device.) 3/1/
Modeling Latches and Flip-flops
Lab Workbook Introduction Sequential circuits are digital circuits in which the output depends not only on the present input (like combinatorial circuits), but also on the past sequence of inputs. In effect,
More informationCHAPTER 11 LATCHES AND FLIP-FLOPS
CHAPTER 11 LATCHES AND FLIP-FLOPS This chapter in the book includes: Objectives Study Guide 11.1 Introduction 11.2 Set-Reset Latch 11.3 Gated D Latch 11.4 Edge-Triggered D Flip-Flop 11.5 S-R Flip-Flop
More informationSequential Logic. (Materials taken from: Principles of Computer Hardware by Alan Clements )
Sequential Logic (Materials taken from: Principles of Computer Hardware by Alan Clements ) Sequential vs. Combinational Circuits Combinatorial circuits: their outputs are computed entirely from their present
More informationCounters and Decoders
Physics 3330 Experiment #10 Fall 1999 Purpose Counters and Decoders In this experiment, you will design and construct a 4-bit ripple-through decade counter with a decimal read-out display. Such a counter
More informationEngr354: Digital Logic Circuits
Engr354: igital Circuits Chapter 7 Sequential Elements r. Curtis Nelson Sequential Elements In this chapter you will learn about: circuits that can store information; Basic cells, latches, and flip-flops;
More informationModeling Sequential Elements with Verilog. Prof. Chien-Nan Liu TEL: 03-4227151 ext:34534 Email: jimmy@ee.ncu.edu.tw. Sequential Circuit
Modeling Sequential Elements with Verilog Prof. Chien-Nan Liu TEL: 03-4227151 ext:34534 Email: jimmy@ee.ncu.edu.tw 4-1 Sequential Circuit Outputs are functions of inputs and present states of storage elements
More informationModule 3: Floyd, Digital Fundamental
Module 3: Lecturer : Yongsheng Gao Room : Tech - 3.25 Email : yongsheng.gao@griffith.edu.au Structure : 6 lectures 1 Tutorial Assessment: 1 Laboratory (5%) 1 Test (20%) Textbook : Floyd, Digital Fundamental
More informationExperiment # 9. Clock generator circuits & Counters. Eng. Waleed Y. Mousa
Experiment # 9 Clock generator circuits & Counters Eng. Waleed Y. Mousa 1. Objectives: 1. Understanding the principles and construction of Clock generator. 2. To be familiar with clock pulse generation
More informationECE380 Digital Logic
ECE38 igital Logic Flip-Flops, Registers and Counters: Flip-Flops r.. J. Jackson Lecture 25- Flip-flops The gated latch circuits presented are level sensitive and can change states more than once during
More informationTo design digital counter circuits using JK-Flip-Flop. To implement counter using 74LS193 IC.
8.1 Objectives To design digital counter circuits using JK-Flip-Flop. To implement counter using 74LS193 IC. 8.2 Introduction Circuits for counting events are frequently used in computers and other digital
More informationCDA 3200 Digital Systems. Instructor: Dr. Janusz Zalewski Developed by: Dr. Dahai Guo Spring 2012
CDA 3200 Digital Systems Instructor: Dr. Janusz Zalewski Developed by: Dr. Dahai Guo Spring 2012 Outline SR Latch D Latch Edge-Triggered D Flip-Flop (FF) S-R Flip-Flop (FF) J-K Flip-Flop (FF) T Flip-Flop
More informationLatches, the D Flip-Flop & Counter Design. ECE 152A Winter 2012
Latches, the D Flip-Flop & Counter Design ECE 52A Winter 22 Reading Assignment Brown and Vranesic 7 Flip-Flops, Registers, Counters and a Simple Processor 7. Basic Latch 7.2 Gated SR Latch 7.2. Gated SR
More informationMemory Elements. Combinational logic cannot remember
Memory Elements Combinational logic cannot remember Output logic values are function of inputs only Feedback is needed to be able to remember a logic value Memory elements are needed in most digital logic
More informationLAB #4 Sequential Logic, Latches, Flip-Flops, Shift Registers, and Counters
LAB #4 Sequential Logic, Latches, Flip-Flops, Shift Registers, and Counters LAB OBJECTIVES 1. Introduction to latches and the D type flip-flop 2. Use of actual flip-flops to help you understand sequential
More informationDIGITAL COUNTERS. Q B Q A = 00 initially. Q B Q A = 01 after the first clock pulse.
DIGITAL COUNTERS http://www.tutorialspoint.com/computer_logical_organization/digital_counters.htm Copyright tutorialspoint.com Counter is a sequential circuit. A digital circuit which is used for a counting
More informationSequential Logic: Clocks, Registers, etc.
ENEE 245: igital Circuits & Systems Lab Lab 2 : Clocks, Registers, etc. ENEE 245: igital Circuits and Systems Laboratory Lab 2 Objectives The objectives of this laboratory are the following: To design
More informationTheory of Logic Circuits. Laboratory manual. Exercise 3
Zakład Mikroinformatyki i Teorii Automatów yfrowych Theory of Logic ircuits Laboratory manual Exercise 3 Bistable devices 2008 Krzysztof yran, Piotr zekalski (edt.) 1. lassification of bistable devices
More informationDesign Example: Counters. Design Example: Counters. 3-Bit Binary Counter. 3-Bit Binary Counter. Other useful counters:
Design Eample: ers er: a sequential circuit that repeats a specified sequence of output upon clock pulses. A,B,C,, Z. G, O, T, E, R, P, S,!.,,,,,,,7. 7,,,,,,,.,,,,,,,,,,,. Binary counter: follows the binary
More informationContents COUNTER. Unit III- Counters
COUNTER Contents COUNTER...1 Frequency Division...2 Divide-by-2 Counter... 3 Toggle Flip-Flop...3 Frequency Division using Toggle Flip-flops...5 Truth Table for a 3-bit Asynchronous Up Counter...6 Modulo
More informationWEEK 8.1 Registers and Counters. ECE124 Digital Circuits and Systems Page 1
WEEK 8.1 egisters and Counters ECE124 igital Circuits and Systems Page 1 Additional schematic FF symbols Active low set and reset signals. S Active high set and reset signals. S ECE124 igital Circuits
More informationDigital Design with VHDL
Digital Design with VHDL CSE 560M Lecture 5 Shakir James Shakir James 1 Plan for Today Announcement Commentary due Wednesday HW1 assigned today. Begin immediately! Questions VHDL help session Assignment
More informationFlip-Flops and Sequential Circuit Design. ECE 152A Winter 2012
Flip-Flops and Sequential Circuit Design ECE 52 Winter 22 Reading ssignment Brown and Vranesic 7 Flip-Flops, Registers, Counters and a Simple Processor 7.5 T Flip-Flop 7.5. Configurable Flip-Flops 7.6
More informationFlip-Flops and Sequential Circuit Design
Flip-Flops and Sequential Circuit Design ECE 52 Winter 22 Reading ssignment Brown and Vranesic 7 Flip-Flops, Registers, Counters and a Simple Processor 7.5 T Flip-Flop 7.5. Configurable Flip-Flops 7.6
More informationDigital Logic Design Sequential circuits
Digital Logic Design Sequential circuits Dr. Eng. Ahmed H. Madian E-mail: ahmed.madian@guc.edu.eg Dr. Eng. Rania.Swief E-mail: rania.swief@guc.edu.eg Dr. Eng. Ahmed H. Madian Registers An n-bit register
More informationCS311 Lecture: Sequential Circuits
CS311 Lecture: Sequential Circuits Last revised 8/15/2007 Objectives: 1. To introduce asynchronous and synchronous flip-flops (latches and pulsetriggered, plus asynchronous preset/clear) 2. To introduce
More informationModeling Registers and Counters
Lab Workbook Introduction When several flip-flops are grouped together, with a common clock, to hold related information the resulting circuit is called a register. Just like flip-flops, registers may
More informationLesson 12 Sequential Circuits: Flip-Flops
Lesson 12 Sequential Circuits: Flip-Flops 1. Overview of a Synchronous Sequential Circuit We saw from last lesson that the level sensitive latches could cause instability in a sequential system. This instability
More informationSequential Logic Design Principles.Latches and Flip-Flops
Sequential Logic Design Principles.Latches and Flip-Flops Doru Todinca Department of Computers Politehnica University of Timisoara Outline Introduction Bistable Elements Latches and Flip-Flops S-R Latch
More informationDigital Systems Based on Principles and Applications of Electrical Engineering/Rizzoni (McGraw Hill
Digital Systems Based on Principles and Applications of Electrical Engineering/Rizzoni (McGraw Hill Objectives: Analyze the operation of sequential logic circuits. Understand the operation of digital counters.
More informationFlip-Flops, Registers, Counters, and a Simple Processor
June 8, 22 5:56 vra235_ch7 Sheet number Page number 349 black chapter 7 Flip-Flops, Registers, Counters, and a Simple Processor 7. Ng f3, h7 h6 349 June 8, 22 5:56 vra235_ch7 Sheet number 2 Page number
More informationETEC 2301 Programmable Logic Devices. Chapter 10 Counters. Shawnee State University Department of Industrial and Engineering Technologies
ETEC 2301 Programmable Logic Devices Chapter 10 Counters Shawnee State University Department of Industrial and Engineering Technologies Copyright 2007 by Janna B. Gallaher Asynchronous Counter Operation
More informationThe 104 Duke_ACC Machine
The 104 Duke_ACC Machine The goal of the next two lessons is to design and simulate a simple accumulator-based processor. The specifications for this processor and some of the QuartusII design components
More informationAsynchronous Counters. Asynchronous Counters
Counters and State Machine Design November 25 Asynchronous Counters ENGI 25 ELEC 24 Asynchronous Counters The term Asynchronous refers to events that do not occur at the same time With respect to counter
More informationHaving read this workbook you should be able to: recognise the arrangement of NAND gates used to form an S-R flip-flop.
Objectives Having read this workbook you should be able to: recognise the arrangement of NAND gates used to form an S-R flip-flop. describe how such a flip-flop can be SET and RESET. describe the disadvantage
More informationDigital Logic Design. Basics Combinational Circuits Sequential Circuits. Pu-Jen Cheng
Digital Logic Design Basics Combinational Circuits Sequential Circuits Pu-Jen Cheng Adapted from the slides prepared by S. Dandamudi for the book, Fundamentals of Computer Organization and Design. Introduction
More informationAsynchronous counters, except for the first block, work independently from a system clock.
Counters Some digital circuits are designed for the purpose of counting and this is when counters become useful. Counters are made with flip-flops, they can be asynchronous or synchronous and they can
More informationCHAPTER 3 Boolean Algebra and Digital Logic
CHAPTER 3 Boolean Algebra and Digital Logic 3.1 Introduction 121 3.2 Boolean Algebra 122 3.2.1 Boolean Expressions 123 3.2.2 Boolean Identities 124 3.2.3 Simplification of Boolean Expressions 126 3.2.4
More informationLab #5: Design Example: Keypad Scanner and Encoder - Part 1 (120 pts)
Dr. Greg Tumbush, gtumbush@uccs.edu Lab #5: Design Example: Keypad Scanner and Encoder - Part 1 (120 pts) Objective The objective of lab assignments 5 through 9 are to systematically design and implement
More informationLecture 8: Synchronous Digital Systems
Lecture 8: Synchronous Digital Systems The distinguishing feature of a synchronous digital system is that the circuit only changes in response to a system clock. For example, consider the edge triggered
More informationUsing Altera MAX Series as Microcontroller I/O Expanders
2014.09.22 Using Altera MAX Series as Microcontroller I/O Expanders AN-265 Subscribe Many microcontroller and microprocessor chips limit the available I/O ports and pins to conserve pin counts and reduce
More informationChapter 9 Latches, Flip-Flops, and Timers
ETEC 23 Programmable Logic Devices Chapter 9 Latches, Flip-Flops, and Timers Shawnee State University Department of Industrial and Engineering Technologies Copyright 27 by Janna B. Gallaher Latches A temporary
More information7. Latches and Flip-Flops
Chapter 7 Latches and Flip-Flops Page 1 of 18 7. Latches and Flip-Flops Latches and flip-flops are the basic elements for storing information. One latch or flip-flop can store one bit of information. The
More informationDigital Fundamentals. Lab 8 Asynchronous Counter Applications
Richland College Engineering Technology Rev. 0 B. Donham Rev. 1 (7/2003). Horne Rev. 2 (1/2008). Bradbury Digital Fundamentals CETT 1425 Lab 8 Asynchronous Counter Applications Name: Date: Objectives:
More informationState Machines in VHDL
State Machines in VHDL Implementing state machines in VHDL is fun and easy provided you stick to some fairly well established forms. These styles for state machine coding given here is not intended to
More informationBINARY CODED DECIMAL: B.C.D.
BINARY CODED DECIMAL: B.C.D. ANOTHER METHOD TO REPRESENT DECIMAL NUMBERS USEFUL BECAUSE MANY DIGITAL DEVICES PROCESS + DISPLAY NUMBERS IN TENS IN BCD EACH NUMBER IS DEFINED BY A BINARY CODE OF 4 BITS.
More informationDecimal Number (base 10) Binary Number (base 2)
LECTURE 5. BINARY COUNTER Before starting with counters there is some vital information that needs to be understood. The most important is the fact that since the outputs of a digital chip can only be
More informationEXPERIMENT 8. Flip-Flops and Sequential Circuits
EXPERIMENT 8. Flip-Flops and Sequential Circuits I. Introduction I.a. Objectives The objective of this experiment is to become familiar with the basic operational principles of flip-flops and counters.
More informationCounters. Present State Next State A B A B 0 0 0 1 0 1 1 0 1 0 1 1 1 1 0 0
ounter ounters ounters are a specific type of sequential circuit. Like registers, the state, or the flip-flop values themselves, serves as the output. The output value increases by one on each clock cycle.
More informationCHAPTER IX REGISTER BLOCKS COUNTERS, SHIFT, AND ROTATE REGISTERS
CHAPTER IX-1 CHAPTER IX CHAPTER IX COUNTERS, SHIFT, AN ROTATE REGISTERS REA PAGES 249-275 FROM MANO AN KIME CHAPTER IX-2 INTROUCTION -INTROUCTION Like combinational building blocks, we can also develop
More informationFinite State Machine Design and VHDL Coding Techniques
Finite State Machine Design and VHDL Coding Techniques Iuliana CHIUCHISAN, Alin Dan POTORAC, Adrian GRAUR "Stefan cel Mare" University of Suceava str.universitatii nr.13, RO-720229 Suceava iulia@eed.usv.ro,
More informationCOMBINATIONAL and SEQUENTIAL LOGIC CIRCUITS Hardware implementation and software design
PH-315 COMINATIONAL and SEUENTIAL LOGIC CIRCUITS Hardware implementation and software design A La Rosa I PURPOSE: To familiarize with combinational and sequential logic circuits Combinational circuits
More informationTake-Home Exercise. z y x. Erik Jonsson School of Engineering and Computer Science. The University of Texas at Dallas
Take-Home Exercise Assume you want the counter below to count mod-6 backward. That is, it would count 0-5-4-3-2-1-0, etc. Assume it is reset on startup, and design the wiring to make the counter count
More informationThe components. E3: Digital electronics. Goals:
E3: Digital electronics Goals: Basic understanding of logic circuits. Become familiar with the most common digital components and their use. Equipment: 1 st. LED bridge 1 st. 7-segment display. 2 st. IC
More information1.1 The 7493 consists of 4 flip-flops with J-K inputs unconnected. In a TTL chip, unconnected inputs
CALIFORNIA STATE UNIVERSITY LOS ANGELES Department of Electrical and Computer Engineering EE-246 Digital Logic Lab EXPERIMENT 1 COUNTERS AND WAVEFORMS Text: Mano, Digital Design, 3rd & 4th Editions, Sec.
More informationLecture-3 MEMORY: Development of Memory:
Lecture-3 MEMORY: It is a storage device. It stores program data and the results. There are two kind of memories; semiconductor memories & magnetic memories. Semiconductor memories are faster, smaller,
More informationCHAPTER 11: Flip Flops
CHAPTER 11: Flip Flops In this chapter, you will be building the part of the circuit that controls the command sequencing. The required circuit must operate the counter and the memory chip. When the teach
More information150127-Microprocessor & Assembly Language
Chapter 3 Z80 Microprocessor Architecture The Z 80 is one of the most talented 8 bit microprocessors, and many microprocessor-based systems are designed around the Z80. The Z80 microprocessor needs an
More informationChapter 5. Sequential Logic
Chapter 5 Sequential Logic Sequential Circuits (/2) Combinational circuits: a. contain no memory elements b. the outputs depends on the current inputs Sequential circuits: a feedback path outputs depends
More informationEE 42/100 Lecture 24: Latches and Flip Flops. Rev B 4/21/2010 (2:04 PM) Prof. Ali M. Niknejad
A. M. Niknejad University of California, Berkeley EE 100 / 42 Lecture 24 p. 1/20 EE 42/100 Lecture 24: Latches and Flip Flops ELECTRONICS Rev B 4/21/2010 (2:04 PM) Prof. Ali M. Niknejad University of California,
More informationMaster/Slave Flip Flops
Master/Slave Flip Flops Page 1 A Master/Slave Flip Flop ( Type) Gated latch(master) Gated latch (slave) 1 Gate Gate GATE Either: The master is loading (the master in on) or The slave is loading (the slave
More informationDigital Systems Design! Lecture 1 - Introduction!!
ECE 3401! Digital Systems Design! Lecture 1 - Introduction!! Course Basics Classes: Tu/Th 11-12:15, ITE 127 Instructor Mohammad Tehranipoor Office hours: T 1-2pm, or upon appointments @ ITE 441 Email:
More informationCounters & Shift Registers Chapter 8 of R.P Jain
Chapter 3 Counters & Shift Registers Chapter 8 of R.P Jain Counters & Shift Registers Counters, Syllabus Design of Modulo-N ripple counter, Up-Down counter, design of synchronous counters with and without
More informationDIGITAL TECHNICS II. Dr. Bálint Pődör. Óbuda University, Microelectronics and Technology Institute. 2nd (Spring) term 2012/2013
DIGITAL TECHNICS II Dr. Bálint Pődör Óbuda University, Microelectronics and Technology Institute 4. LECTURE: COUNTERS AND RELATED 2nd (Spring) term 2012/2013 1 4. LECTURE: COUNTERS AND RELATED 1. Counters,
More informationLAB #3 VHDL RECOGNITION AND GAL IC PROGRAMMING USING ALL-11 UNIVERSAL PROGRAMMER
LAB #3 VHDL RECOGNITION AND GAL IC PROGRAMMING USING ALL-11 UNIVERSAL PROGRAMMER OBJECTIVES 1. Learn the basic elements of VHDL that are implemented in Warp. 2. Build a simple application using VHDL and
More informationA Digital Timer Implementation using 7 Segment Displays
A Digital Timer Implementation using 7 Segment Displays Group Members: Tiffany Sham u2548168 Michael Couchman u4111670 Simon Oseineks u2566139 Caitlyn Young u4233209 Subject: ENGN3227 - Analogue Electronics
More informationDigital Electronics Detailed Outline
Digital Electronics Detailed Outline Unit 1: Fundamentals of Analog and Digital Electronics (32 Total Days) Lesson 1.1: Foundations and the Board Game Counter (9 days) 1. Safety is an important concept
More informationL4: Sequential Building Blocks (Flip-flops, Latches and Registers)
L4: Sequential Building Blocks (Flip-flops, Latches and Registers) Acknowledgements: Materials in this lecture are courtesy of the following sources and are used with permission. Prof. Randy Katz (Unified
More informationASYNCHRONOUS COUNTERS
LB no.. SYNCHONOUS COUNTES. Introduction Counters are sequential logic circuits that counts the pulses applied at their clock input. They usually have 4 bits, delivering at the outputs the corresponding
More informationLab 1: Introduction to Xilinx ISE Tutorial
Lab 1: Introduction to Xilinx ISE Tutorial This tutorial will introduce the reader to the Xilinx ISE software. Stepby-step instructions will be given to guide the reader through generating a project, creating
More informationUpon completion of unit 1.1, students will be able to
Upon completion of unit 1.1, students will be able to 1. Demonstrate safety of the individual, class, and overall environment of the classroom/laboratory, and understand that electricity, even at the nominal
More informationA New Paradigm for Synchronous State Machine Design in Verilog
A New Paradigm for Synchronous State Machine Design in Verilog Randy Nuss Copyright 1999 Idea Consulting Introduction Synchronous State Machines are one of the most common building blocks in modern digital
More informationAC 2007-2485: PRACTICAL DESIGN PROJECTS UTILIZING COMPLEX PROGRAMMABLE LOGIC DEVICES (CPLD)
AC 2007-2485: PRACTICAL DESIGN PROJECTS UTILIZING COMPLEX PROGRAMMABLE LOGIC DEVICES (CPLD) Samuel Lakeou, University of the District of Columbia Samuel Lakeou received a BSEE (1974) and a MSEE (1976)
More informationTechnical Aspects of Creating and Assessing a Learning Environment in Digital Electronics for High School Students
Session: 2220 Technical Aspects of Creating and Assessing a Learning Environment in Digital Electronics for High School Students Adam S. El-Mansouri, Herbert L. Hess, Kevin M. Buck, Timothy Ewers Microelectronics
More information(Refer Slide Time: 00:01:16 min)
Digital Computer Organization Prof. P. K. Biswas Department of Electronic & Electrical Communication Engineering Indian Institute of Technology, Kharagpur Lecture No. # 04 CPU Design: Tirning & Control
More informationCombinational Logic Design Process
Combinational Logic Design Process Create truth table from specification Generate K-maps & obtain logic equations Draw logic diagram (sharing common gates) Simulate circuit for design verification Debug
More informationDIGITAL ELECTRONICS. Counters. By: Electrical Engineering Department
Counters By: Electrical Engineering Department 1 Counters Upon completion of the chapter, students should be able to:.1 Understand the basic concepts of asynchronous counter and synchronous counters, and
More informationGETTING STARTED WITH PROGRAMMABLE LOGIC DEVICES, THE 16V8 AND 20V8
GETTING STARTED WITH PROGRAMMABLE LOGIC DEVICES, THE 16V8 AND 20V8 Robert G. Brown All Rights Reserved August 25, 2000 Alta Engineering 58 Cedar Lane New Hartford, CT 06057-2905 (860) 489-8003 www.alta-engineering.com
More informationECE 3401 Lecture 7. Concurrent Statements & Sequential Statements (Process)
ECE 3401 Lecture 7 Concurrent Statements & Sequential Statements (Process) Concurrent Statements VHDL provides four different types of concurrent statements namely: Signal Assignment Statement Simple Assignment
More informationRAPID PROTOTYPING OF DIGITAL SYSTEMS Second Edition
RAPID PROTOTYPING OF DIGITAL SYSTEMS Second Edition A Tutorial Approach James O. Hamblen Georgia Institute of Technology Michael D. Furman Georgia Institute of Technology KLUWER ACADEMIC PUBLISHERS Boston
More informationTechnical Note. Micron NAND Flash Controller via Xilinx Spartan -3 FPGA. Overview. TN-29-06: NAND Flash Controller on Spartan-3 Overview
Technical Note TN-29-06: NAND Flash Controller on Spartan-3 Overview Micron NAND Flash Controller via Xilinx Spartan -3 FPGA Overview As mobile product capabilities continue to expand, so does the demand
More informationDesigning Digital Circuits a modern approach. Jonathan Turner
Designing Digital Circuits a modern approach Jonathan Turner 2 Contents I First Half 5 1 Introduction to Designing Digital Circuits 7 1.1 Getting Started.......................... 7 1.2 Gates and Flip
More information9/14/2011 14.9.2011 8:38
Algorithms and Implementation Platforms for Wireless Communications TLT-9706/ TKT-9636 (Seminar Course) BASICS OF FIELD PROGRAMMABLE GATE ARRAYS Waqar Hussain firstname.lastname@tut.fi Department of Computer
More informationChapter 8. Sequential Circuits for Registers and Counters
Chapter 8 Sequential Circuits for Registers and Counters Lesson 3 COUNTERS Ch16L3- "Digital Principles and Design", Raj Kamal, Pearson Education, 2006 2 Outline Counters T-FF Basic Counting element State
More informationRegisters & Counters
Objectives This section deals with some simple and useful sequential circuits. Its objectives are to: Introduce registers as multi-bit storage devices. Introduce counters by adding logic to registers implementing
More informationChapter 7. Registers & Register Transfers. J.J. Shann. J. J. Shann
Chapter 7 Registers & Register Transfers J. J. Shann J.J. Shann Chapter Overview 7- Registers and Load Enable 7-2 Register Transfers 7-3 Register Transfer Operations 7-4 A Note for VHDL and Verilog Users
More informationIntroduction to Programmable Logic Devices. John Coughlan RAL Technology Department Detector & Electronics Division
Introduction to Programmable Logic Devices John Coughlan RAL Technology Department Detector & Electronics Division PPD Lectures Programmable Logic is Key Underlying Technology. First-Level and High-Level
More informationif-then else : 2-1 mux mux: process (A, B, Select) begin if (select= 1 ) then Z <= A; else Z <= B; end if; end process;
if-then else : 2-1 mux mux: process (A, B, Select) begin if (select= 1 ) then Z
More informationDigital Fundamentals
igital Fundamentals with PL Programming Floyd Chapter 9 Floyd, igital Fundamentals, 10 th ed, Upper Saddle River, NJ 07458. All Rights Reserved Summary Latches (biestables) A latch is a temporary storage
More informationENEE 244 (01**). Spring 2006. Homework 5. Due back in class on Friday, April 28.
ENEE 244 (01**). Spring 2006 Homework 5 Due back in class on Friday, April 28. 1. Fill up the function table (truth table) for the following latch. How is this latch related to those described in the lectures
More informationA Verilog HDL Test Bench Primer Application Note
A Verilog HDL Test Bench Primer Application Note Table of Contents Introduction...1 Overview...1 The Device Under Test (D.U.T.)...1 The Test Bench...1 Instantiations...2 Figure 1- DUT Instantiation...2
More informationLayout of Multiple Cells
Layout of Multiple Cells Beyond the primitive tier primitives add instances of primitives add additional transistors if necessary add substrate/well contacts (plugs) add additional polygons where needed
More informationFig1-1 2-bit asynchronous counter
Digital electronics 1-Sequential circuit counters Such a group of flip- flops is a counter. The number of flip-flops used and the way in which they are connected determine the number of states and also
More informationRAM & ROM Based Digital Design. ECE 152A Winter 2012
RAM & ROM Based Digital Design ECE 152A Winter 212 Reading Assignment Brown and Vranesic 1 Digital System Design 1.1 Building Block Circuits 1.1.3 Static Random Access Memory (SRAM) 1.1.4 SRAM Blocks in
More informationCombinational-Circuit Building Blocks
May 9, 24 :4 vra6857_ch6 Sheet number Page number 35 black chapter 6 Combinational-Circuit Building Blocks Chapter Objectives In this chapter you will learn about: Commonly used combinational subcircuits
More informationUsing Xilinx ISE for VHDL Based Design
ECE 561 Project 4-1 - Using Xilinx ISE for VHDL Based Design In this project you will learn to create a design module from VHDL code. With Xilinx ISE, you can easily create modules from VHDL code using
More informationSo far we have investigated combinational logic for which the output of the logic devices/circuits depends only on the present state of the inputs.
equential Logic o far we have investigated combinational logic for which the output of the logic devices/circuits depends only on the present state of the inputs. In sequential logic the output of the
More informationCNC FOR EDM MACHINE TOOL HARDWARE STRUCTURE. Ioan Lemeni
CNC FOR EDM MACHINE TOOL HARDWARE STRUCTURE Ioan Lemeni Computer and Communication Engineering Department Faculty of Automation, Computers and Electronics University of Craiova 13, A.I. Cuza, Craiova,
More informationChapter 7 Memory and Programmable Logic
NCNU_2013_DD_7_1 Chapter 7 Memory and Programmable Logic 71I 7.1 Introduction ti 7.2 Random Access Memory 7.3 Memory Decoding 7.5 Read Only Memory 7.6 Programmable Logic Array 77P 7.7 Programmable Array
More informationManchester Encoder-Decoder for Xilinx CPLDs
Application Note: CoolRunner CPLDs R XAPP339 (v.3) October, 22 Manchester Encoder-Decoder for Xilinx CPLDs Summary This application note provides a functional description of VHDL and Verilog source code
More information