ECE / COMP SCI 352 DIGITAL SYSTEMS FUNDAMENTALS. Design Project 2. Spring 2003 Due: Beginning of class on Friday 5/02/2003

Size: px
Start display at page:

Download "ECE / COMP SCI 352 DIGITAL SYSTEMS FUNDAMENTALS. Design Project 2. Spring 2003 Due: Beginning of class on Friday 5/02/2003"

Transcription

1 ECE / COMP SCI 352 DIGITAL SYSTEMS FUNDAMENTALS Design Project 2 Spring 2003 Due: Beginning of class on Friday 5/02/2003 Projects 1 and 2 together will be the design of a simple digital stopwatch. In Project 1, you have designed five combinational circuits that are used for counting up (for stop-watch mode) and counting down (for timer mode) the digits of the watch. These circuits will be combined with storage elements and additional data and control logic in Project 2 to form the logic core of the stopwatch. The goals of this project are to: 1. Increase your familiarity with Mentor Graphics design and simulation tools, and familiarize you with CAFE (a logic simplification tool), 2. Improve your understanding of material covered in class, and Objective: This project is to be performed by teams of two students only (teams with more than two members are not allowed). Interactions between teams are to be limited to discussions of understanding of the specifications or to understanding of how to use the tools. All design and simulation work and files used are to be yours, not those of others, unless specified otherwise. I. Project Overview This semester, you will be designing and implementing the datapath and control logic for a digital stopwatch shown in Figure 1. The stopwatch is to have a five digit 7-segment LCD display and four buttons to control its operation. It can measure the elapsed time in seconds starting with 0:00:00 up to 9:59:59 (9 hours, 59 minutes and 59 seconds). It can also be set to a specified time and can count down to 0:00:00. Notice that there are labels for digits and buttons that we will be using for the references through out this description. The stopwatch has two modes, namely 1) stopwatch mode and 2) timer mode. In a stopwatch mode (a default mode), the stopwatch can be reset to 0:00:00 by pressing and releasing the RESET button. When you push START_STOP button once, it will count up and display the elapsed time in a resolution of seconds. Second push of START_STOP button will stop or pause the current clock (time count). The stopwatch counts up or pauses with each push of START_STOP button. When the mode button is pressed, the stopwatch will go to a timer mode where it counts the time in backward. In a timer mode, hour, high minute and low minute digit can be selected by pressing SET button repeatedly. The MODE_INC button will increase the selected field, which allows to be set to any desired time in a resolution of minutes. Count down starts with the push of START_STOP button. ECE/CS 352 Spring 2003 Project 2 Document Version 1.1 1

2 Similar to the stopwatch mode, count down can be paused or restarted with each push of START_STOP button. Table 1 describes functions of digits and push buttons. Figure 1. Stop-watch Display TABLE 1. Function(s) of digits and push buttons Name Function(s) Digits Push buttons H HM LM HS LS SET RESET MODE_INC START_STOP Hour digit Higher minute digit Lower minute digit Higher second digit Lower second digit In a timer mode, select a digit to set Reset all digits to 0, then go to stopwatch mode Switch between a stopwatch mode and timer mode Increase selected digit in a timer mode Start, stop, and resume counting The stopwatch will be designed using the hierarchical structure shown in Figure 2. The top level design will contain five logic blocks (modules) and some of theses blocks will consist of smaller sub-blocks. A brief description of each block is given below: STOPWATCH : Top level component of the stop watch PBI (Push Button Interface) : Synchronize push button signal with 10Hz clock. You will place three PBI modules for each of MODE_INC, Set, and START_STOP push buttons. CSL(Control State Logic) : Sequential State machine for control. COL(Control Output Logic) : Decodes CSL output to generate control signal for COUNT_BLK CLK_DIV(Clock divider) : Generates 1 second clock signal using 10Hz system clock. COUNT_BLK(Counter block) : 5 digit (H, HM, LM, HS, and LS) up/down counter * In this project, you will design two different COUNT_BLK modules MSCNT (Mode selectable up/down counter) : Up/Down Counter with mode select (Modulo 6 or Modulo 10) ECE/CS 352 Spring 2003 Project 2 Document Version 1.1 2

3 MSINC (Mode selectable incrementer/decrementer) : In/decrement 4bit input by 1 with mode select (Modulo 6 or Modulo 10) Adder_4 : 4-bit full adder m6avg and m10avg (modulo 6 add value generator and modulo 10 add value generator) : Takes on a 4-bit BCD input and up_down signal, it generates a 4-bit offset value to be added the 4-bit BCD input. mux21_4 (4-bit 2-to-1 multiplexer): Select between a pair of 4-bit inputs using a control signal. Figure 2. Hierarchical structure of stop-watch design In project 1, you already designed following five modules: Adder_4, m10avg, m6avg, mux21_4 and MSINC. The additional modules will be completed in Project 2 using those five modules. II. Design and Project Report Guidelines You and your partner are to submit only one copy of joint project report for your group. Any project reports that do not conform following design and project report guidelines are subject to a penalty (point deduction). A late project submission carries a hefty 10% late penalty for each 24- hour period, up to 72-hours. For example, a project submitted between after lecture on Friday and same time on following Saturday will be deducted by 10 points. No project report will be accepted 72 hours after the due date. Here are some design and project report guidelines. Your are NOT to use a gated-clock design for this project. Wires must be drawn either horizontally or vertically. Never overlap symbols or gates; wires/buses should not cross symbols or gates. ECE/CS 352 Spring 2003 Project 2 Document Version 1.1 3

4 Always label symbols. You are to minimize the logic (gate count) whenever possible. Use the provided coversheet and your report must be in the EXACT same order as appears on the checklist. Your report must be page numbered. All schematics, symbols, trace windows, and list output files should be clearly labeled and scaled (zoomed in/out) to show all the contents. Your comments on test case should clearly demonstrate your understanding of each module s function and expected behavior. You are also required to indicate if the module is functioning properly or not. Hand-written page numbers, test cases, validations and comments are acceptable, but they should be readable. Fancy cover or binding are not required, but use a proper stable or clip to secure all pages. Finally, you are not to delete, modify or remove any of your files after the project has been submitted until you are instructed to do so. In a rare occasion, we may ask you to demonstrate your project to verify or to clarify your submitted work. III. Design of Modules 1. reg4 : 4-bit register with write enable The reg4 is a 4-bit register that stores the current value of one BCD digit. Input/output ports and functions are defined as follows: PORT NAME Function D(3:0) Input value which will be captured in 4 D FF s. If EN=1 (high), four D-FFs will capture the value on D(3:0) during IN EN the rising edge of CLK. If EN=0 (low), then 4 D FF s will not capture the value on D(3:0) and keep previous value on Q(3:0) CLK System clock RST When RST = 0, reset all D-FFs to 0 asynchronously. OUT Q(3:0) Outputs of four D-FFs. Figure 3. One bit slice of 4bit register with write enable A 1-bit register is comprised of a positive edge triggered D-FF and 1-bit 2-to-1 multiplexer to add a write enable control as shown in Figure 3. You are to use dff in gen_lib for D-FF and 2-to-1 ECE/CS 352 Spring 2003 Project 2 Document Version 1.1 4

5 mux from gen_lib. Note that this flip-flop has active-low reset (CLR) and active-low set (PRE) input ports. When any of these signals are not used, you are to connect them to logic 1 (VCC in gen_lib). For the register implementation, you are to connect CLR to RST input (an active-low reset input) and PRE to VCC. Design a 1-bit register first, then design 4-bit register by making four copies of 1-bit register. Note that you are to use BUS, D(3:0) and Q(3:0) as input and output. Please refer to your Mentor Tutorial to review on how to use bus. Since this module is simple to design and test, you are to submit only your schematic for this module. However, you should verify that your register works correctly by writing your own force file and simulating with Quicksim. Generate the symbol once you have verify its correctness. The following is to be submitted in: The schematic from Design Architect 2. MSCNT : Mode Selectable Counter The module MSINC block, designed in Project 1, was a purely combinational circuit; it did not include any state or memory elements. To implement a counter, a 4-bit register (reg4) is to be added to MSINC to store the current state information. Since the RST of reg4 is active low signal, an inverter is required to implement the active-high reset (RST)of MSCNT. The up, dn and mod control input should connect directly to the same signals in the MSINC block. Also, co and bo output ports need to be connected to those from MSINC. Note that your MSINC block from Project 1 did not have use buses. First, regenerate the symbol of MSINC with buses p(3:0) and n(3:0). Then connect reg4 and other required logic to the regenerated MSINC symbol to implement MSCNT. The names for input/and output ports are given below. You have to use the same labels to make use of the provided force file. Input : CLK for clock signal, RST for reset, up and dn for up/down control Output: D(3:0) for current value of counter, co and bo for carry out and borrow out. For output of MSCNT, use a 4-bit BUS D(3:0) as output port instead of separate D3, D2, D1 and D0. The following diagram gives the basic idea for the design of this block. Figure 3. MSCNT block diagram ECE/CS 352 Spring 2003 Project 2 Document Version 1.1 5

6 Use the provided force file MSCNT.force to test your module. Verify and show that your design works correctly with appropriate comments on your trace window printout. Non-annotated traces will be penalized. The followings are to be submitted in: The schematic from Design Architect The annotated test (trace window from Quicksim) of MSCNT.force Once you have verified your circuit with the force file, generate a symbol for this module and save it for later use. 3. COUNT_BLK : Counter Block Once you have the mode selectable up/down counter (MSCNT), you can build a 5-digit counter block. As shown in figure 1 and 2, five copies of MSCNT will be used as hour (H) digit, higher minute digit (HM), lower minute digit (LM), higher second digit (HS), and Lower second digit (LS). The port names and functions are described in following table. You have to use the same names to make use of force file we provide. Table 2. COUNT_BLK in/out port and function PORT NAME Function incsec When incsec is high, the current time value increase by 1 sec at rising edge of clock. decsec When decsec is high, the the current time value decrease by 1 sec at rising edge of clock. These two signal will be used while the stop watch is counting time, up or down. inch When inch is high, Hour digit increase by 1 at rising edge of clock. IN When inchm is high, Higher Minute digit increase by 1 at rising edge inchm of clock. inclm When inclm is high, Lower Minute digit increase by 1 at rising edge of clock. These three control signal will be used to preset the time for timer mode. CLK System clock that operates 10Hz RST Resets all digit to 0 when RST=0. H(3:0) Hour digit. HM(3:0) Higher minute digit. LM(3:0) Lower minute digit OUT HS(3:0) Higher second digit LS(3:0) Lower second digit all0 During timer mode, if the count down reach all 0, this signal goes high and indicate the controller to ring. This block is shown in Figure 4. MSCNT instances with shaded color should be set to modulo 6 counter. For this block, you have to figure out how to connect each block and what additional logic gates are necessary to implement the functions described in table 2. Designs with excessive number of gates will be penalized. Test your circuit using the provided force file COUNT_BLK. Verify that your circuit works correctly using Quicksim. Annotate your trace window to verify correct functionality. before you turn it in to facilitate easy grading. Non-annotated traces will be penalized. (One way of annotating could be to mark the actual input and output values for each ECE/CS 352 Spring 2003 Project 2 Document Version 1.1 6

7 time interval on the trace. Also, you could put a tick under each correct output and a cross under each incorrect output.) The following should be turned in: The schematic from Design Architect The annotated test (trace window from Quicksim) of COUNT_BLK.force Figure 4. The design of COUNT_BLK Once you have verified your circuit with the force file, generate a symbol for this module and save it for later use. 4. CSL : Control State Logic The CSL is the state machine that controls the operation of the stop-watch. The state machine stores current state of stop-watch and depending on push button inputs and feedback signal from the counter block, CSL changes its current state. Port names and a brief description of each are given below in table 3. You have to use the same names to make use of the force file we provide. Table 3. CSL ports and functions PORT NAME Function all0 Input from COUNT_BLK, indicating the timer hits all 0. SET In timer mode, select a digit to set MD_INC Switch between stop-watch mode and timer mode. IN ST_SP Start, stop, or resume counting SET, MD_INC, ST_SP signals are from push button interface (PBI) of each push button. RST Resets state to stop-watch stop state. CLK 10Hz system Clock input CNT_en Count enable signal. When this signal is high, the clock divider block (CLK_DIV) will generate one second signal. OUT Ring The timer rings when this signal is high. S(2:0) Current state signal. These signals will be connected to control output logic (COL) to generate control signals to the counter block. ECE/CS 352 Spring 2003 Project 2 Document Version 1.1 7

8 The state transition diagram of this block is shown in the Figure 5. For simplicity, only the arrows resulting in state transitions are shown; when there is no arrow on the state diagram for an input condition, there is an implicit arrow that stays in the same state. Since there are eight states, three D-FFs are requires to build this Moore state machine. State assignment and state transition table is also provided below. State description Stop-watch stop state Figure 5. State transition diagram for CSL Table 3. CSL state assignment and transition table. Current State state assignment Input Next state Output ST_SP SW_count(1) - SW_stop 0(000b) MD_INC T_stop(2) - Stop-watch counting state SW_count 1(001b) ST_SP SW_stop(0) CNT_en ST_SP T_count(3) - Timer stop state T_stop 2(010b) SET H_set(5) - MD_INC SW_STOP(0) - Timer counting all0 Ring(4) CNT_en T_count 3(011b) state ST_SP T_stop(2) CNT_en Ringing state Ring 4(100b) - - Ring Hour setting state H_set 5(101b) SET HM_set(6) - Higher minute setting state HM_set 6(110b) SET LM_set(7) - Lower minute setting state LM_set 7(111b) SET T_stop(2) - Based on given state transition table and diagram you will need to complete the state table in order to generate a Café input file. The partially filled state table for this block is given below. Complete the state table below and be sure to consider all implicit arrows. ECE/CS 352 Spring 2003 Project 2 Document Version 1.1 8

9 Current state Input Next state Output S2 S1 S0 MD_INC ST_SP SET TimeOut NS2 NS1 NS0 Ring CNT_en SW_stop X X X X X X X X SW_count X 0 X X X 1 X X T_stop X X X X X X X X T_count X 0 X X 0 X X 1 X X 1 X Ring X X X X H_set X X 0 X X X 1 X HM_set X X 0 X X X 1 X LM_set X X 0 X X X 1 X A partially completed Café file (CSL.cafe) is also available. Complete CSL.cafe and generate the Café output file as you did in project 1. Implement CSL with the minimum number of gates. Designs with excessive number of gates will be penalized. Test your implementation using the provided force file CSL.force provided for this block. Comment and verify that your circuit works correctly on the trace window print out Nonannotated traces will be penalized. The following should be submitted: The completed café input file CSL.cafe The schematic from Design Architect The annotated trace windows from Quicksim of CSL.force ECE/CS 352 Spring 2003 Project 2 Document Version 1.1 9

10 Once you have verified your circuit with the force file, generate a symbol for this module and save it for later use. 5. CLK_DIV : Clock Divider As described in overview section, we will assume that we will be using a 10Hz system clock. In order to count up or down every 1 second, you need to build clock divider which generates 1SEC signal once every second. This block can be built using the MSCNT block. If you set MSCNT as modulo-10 counter, the co signal of MSCNT will go high whenever it counts 10 system clocks. However, it would be very memory intensive and impractical to simulate thousands of seconds in Quicksim. Thus for a practical reason, we will simulate and test our circuit using the clock period of 10 nanosecond. In other words, for test and simulation, use the clock period of 10 ns and 1SEC signal is to be high for every 10 clock periods (100 ns). The required input and output signals for this block are shown below. Input : CLK : 10Hz system clock RST : Resets current counting to 0 state en : enable counting, if en=low, the MSCNT will hold current value. Output : 1SEC : 1 second signal. This signal will be connected to COL to generate in/decrease control for COUNT_BLK. To test this block, you have to provide your own force file. However, you have to verify following features. The clock divider can be reset by high RST signal. If en=1, the clock divider count up from current value and generates high 1SEC signal for one period of system clock cycle (rising edge to next rising edge). If en=0, the clock counter should not count system clock (hold current value). Figure 6. Example simulation for CLK_DIV An example simulation trace is given in Figure 6. Annotate and comment your tests before you turn it in. Non-annotated traces will be penalized. The following should be turned in: The schematic from Design Architect The trace window from Quicksim running your own force file ECE/CS 352 Spring 2003 Project 2 Document Version

11 Once you have verified your design, generate a symbol for this module and save it for later use. 6. PBI: Push Button Interface. Although all the blocks you have built are synchronized with system clock, the push button input entered by the user is not synchronized with the system clock. Normally any push buttons requires a debounce circuitry requiring a carefully selected set of resistor and capacitor. Regardless of whether debounce circuitry is present or not, if the user holds a button more than 100 msec, it may be misinterpreted as two or more clicks of button. Hence, an interpreter circuit is required to interface between push buttons and rest of circuit, which will be called PBI. The PBI generates one clock period of logic 1 whenever a button is pressed no matter how long it is. The following wave form describes the function of the PBI block. Figure 7. Function of PBI Input/output port names and descriptions are as follows: Input RST : Reset PBI to its initial state. IN : Push button input CLK : 10Hz system clock input Output OUT : synchronized push button signal. Design your own state diagram and state transition table. There should be no more than 4 states to achieve this functionality and hence 2 flip-flops should be sufficient. Since there is only one input (except CLK and RST which will be directly connected to the flip-flops) and 2 flip-flops, you may not need to use Café to minimize the Boolean functions. To test this block, you have to provide your own force file. However, your simulation result should be similar to Figure7. Please annotate your trace window before you turn it in. You are to submit followings: A state transition diagram and table The schematic from Design Architect The annotated test (trace window from Quicksim of your own force file) Once you verified your circuit with the force file, generate a symbol for this module and save it for later use. ECE/CS 352 Spring 2003 Project 2 Document Version

12 7. COL: Control Output Generator. The COL is only pure combinational logic block in Project 2. This block will be placed between COUNT_BLK and CSL to generate appropriate control signals for COUNT_BLK together with synchronized button inputs, 1SEC signal and current state of state machine. In/output port names, functions and conditions are shown in table blow. PORT NAME Function S(2:0) Current state input from CSL IN MD_INC Synchronized (through PBI) push button signal of MD_INC button. 1SEC 1-Second signal from CLK_DIV block incsec Increase Second signal into COUNT_BLK decsec Decrease Second signal into COUNT_BLK OUT inch Increase Hour signal into COUNT_BLK inchm Increase Higher minute signal into COUNT_BLK inclm Increase Lower minute signal into COUNT_BLK rstall Reset COUNT_BLK to 0 The COL block can be viewed as specialized decoder with two different enable signal (MD_INC and 1SEC). This block will decode current state to generate control outputs for COUNT_BLK as follows. incsec : This signal goes high when CSL state is SW_count and 1SEC signal is high. decsec : This signal goes high when CSL state is T_count and 1SEC signal is high. inch : This signal goes high when CSL state is H_set and MD_INC signal is high. inchm : This signal goes high when CSL state is HM_set and MD_INC signal is high. inclm : This signal goes high when CSL state is LM_set and MD_INC signal is high. rstall : This signal goes high when CSL state is T_stop and MD_INC signal is high or when CSL state is SW_stop and MD_INC signal is high. Implement the COL module using a minimum logic. Designs with excessive number of gates will be penalized. No force file is provided for this module; you have to provide your own force file. One way to test this circuit is for all possible value of S(2:0), give a pulse of 1SEC signal and MD_INC signal. Any incomplete test or tests with insufficient comments will be penalized. The following should be turned in: The schematic from Design Architect The annotated test (trace window from Quicksim of your own force file) Once you verified your circuit with a force file, generate a symbol for this module and save it for later use. 8. STOP_WATCH: Top Design Module Now you will build the top module of project STOP_WATCH using symbols that you have generated. The function of STOP_WATCH is already described in the overview section. Refer to the project overview section for the functional description. If you have designed each module correctly and understood the functionalities of each module, the top level design will not be complex. However, thorough testing is important for the top module design to verify that the ECE/CS 352 Spring 2003 Project 2 Document Version

13 modules are communicating with each other correctly. As specified in the overview section the stopwatch will have 4 push button input and 10Hz external clock signal as well as 5 BCD output for time information. The Input/output ports are described below. Figure 8. Design reference for STOP_WATCH Input Set_PB : SET push button input. MD_INC_PB : MD_INC push button input ST_SP_PB : START_STOP push button input These three push buttons will be synchronized by the PBI module RST : RESET push button input Note that RST do not have to be synchronized since the flip-flops we are using provide an asynchronous reset. ECE/CS 352 Spring 2003 Project 2 Document Version

14 CLK : 10Hz system clock input* Output H(3:0) : BCD output of hour Digit HM(3:0) : BCD output of higher minute digit LM(3:0) : BCD output of lower minute digit HS(3:0) : BCD output higher second digit LS(3:0) : BCD output lower second digit The STOP_WATCH module is built using following modules: PBI, CSL, CLK_DIV, COUNT_BLK, and COL. Use Figure 8 as reference. Test your top design with the provided force file STOP_WATCH.force. Be sure to use 3-bit bus for S(2:0) in your design or you may not be able to use provided force file. Carefully read comments in this force file and verify your circuit to see if it functions correctly. Once you have verified your trace, you need to submit five different portion of your annotated trace as follows. Schematic of your design. Print out of entire trace from 0ns to 1,200,000ns Print out of zoomed trace from 0ns to 2,000ns (should be annotated) Print out of zoomed trace from 477,000ns to 495,000ns (should be annotated) Print out of zoomed trace from 549,800ns to 551,500ns (should be annotated) Print out of zoomed trace from 1,094,000ns to ns 1,096,400ns (should be annotated) 9. COUNT_BLK2 : Sequential COUNT_BLK. In this section, you will design new COUNT_BLK which sequentially updates each digit. The COUNT_BLK you have designed in previous section used 5 instances of MSCNT. As you may notice, each MSCNT was fixed to be either modulo-6 or modulo-10 mode and one of m6avg or m10avg in MSINC instances will never be used for specific digit. Also, MSINC instances in MSCNT modules are doing similar job for each MSCNT instances. To reduce cost, it is possible to share only one MSINC to update each digit by adding an additional sequential controller. The diagram in Figure 9 illustrates how we can redesign COUNT_BLK. In the following sections, you will design the Sequential Update Logic (SUL) and a new counter block (COUNT_BLK2). ECE/CS 352 Spring 2003 Project 2 Document Version

15 9.1 SUL: Sequential Update Control Logic. Figure 9. Redesigned COUNT_BLK The COUNT_BLK2 will use only one copy of MSINC to update all 5 digits in the counter block. In other words the MSINC should be shared in a sequential manner by control signals to update each digit. According to the control signals (inch, inchm, inclm, incsec and decsec) and the previous digit s co and bo, the SUL will change its state as well as generating up, dn and mod signal for shared MSINC block. The following table specifies input/output port names and their purposes. PORT NAME Function inch IN inchm inclm incsec decsec co bo CLK RST OUT updateh These five signals are output of COL block and invoke the state machine to update specific digit. Will be connected to co of MSCNT to indicate update of previous(lower) digit had carry out. Will be connected to bo of MSCNT to indicate update of previous(lower) digit had borrow out. System clock Resets state machine If this signal is high, the hour digit will be updated according to up/dn signal. ECE/CS 352 Spring 2003 Project 2 Document Version

16 If this signal is high, the higher minute digit will be updated according updatehm to up/dn signal. If this signal is high, the lower minute digit will be updated according updatelm to up/dn signal. If this signal is high, the higher second digit will be updated according updatehs to up/dn signal. If this signal is high, the lower second digit will be updated according updatels to up/dn signal. up Indicates whether the MSINC should count up. dn Indicates whether the MSINC should count down. mod Indicates the MSINC whether current digit is modulo-6 or modulo-10. The SUL will operate as specified in the Figure 10. There are six states. Figure 10.State transition diagram of SUL. To implement this state machine you will use One hot state encoding A.K.A one flip-flop per state design scheme to minimize complexity of combinational logic design. If you are not familiar with this design scheme you should review the textbook (Mano and Kime, page ). The basic premise of the one flip-flop per state design method is that only a single state flip-flop will be high at any given time and the flip-flop with the 1 identifies the current state. So, the input logic for each state flip-flop simply reflects that there are only two conditions to place 1 in that flip-flop: 1. The flip-flop currently has a 1 and the conditions for moving to next state have not been met. 2. The previous state flip-flop has a 1, and the conditions for moving to the current state have been met. ECE/CS 352 Spring 2003 Project 2 Document Version

17 Since we have 6 different states, we will need 6 flip-flops to implement this state machine. Refer to following table for state assignment. State State flip-flops D5 D4 D3 D2 D1 D0 IDLE UpdateLS UpdateHS UpdateLM UpdateHM UpdateH Now you can develop the expressions for each state that correspond to the two conditions mentioned above by using the state transition diagram in Figure 11. The following table is provided to develop expressions for each state flip-flop. State IDLE (D0) Conditions required to remain the current state All control signals = 0 Conditions required to become current state UpdateLS (D1) None State = IDLE and State = UpdateH or all other state with co+bo = 0 either incsec or decsec is 1 UpdateHS (D2) None State = UpdateLS and either co or bo is 1 UpdateLM (D3) None 1. State = UpdateHS and either co or bo is 1 2. State = IDLE and inclm is 1 UpdateHM (D4) None 1. State = UpdateLM and either co or bo is 1 2. State = IDLE and inchm is 1 UpdateH (D5) None 1. State = UpdateHM and either co or bo is 1 2. State = IDLE and inch is 1 Input logic expression for each state flipflop D0= D1= D0*(incSec+decSEC) D2=D1*(co+bo) D3=D2*(co+bo) + D0*(incLM) D4= D3*(co+bo) + D0*(incHM) D5= D4*(co+bo) + D0*(incH) ECE/CS 352 Spring 2003 Project 2 Document Version

18 Now you also have to define following expressions for outputs. updateh updatehm = D5 = D4 updatelm = D3 updatehs updatels = D2 = D1 mod = D2+D4 up = previous value of ( co + incsec + inch + inchm + inclm ) dn = previous value of ( bo + decsec ) Note that previous value can be obtained by delaying them for one clock cycle. In order to delay signals by one clock cycle, you may want to insert a DFF s between outputs (up, dn) and logics generating those outputs. Once you are done with your design, you have to test this block. Write your own force file and verify your state machine and output reflects given state transition diagram and your expression table. However, you don t have to submit your force file nor trace. Instead followings are to be submitted Completed the expressions for outputs Schematic sheet of your design 9.2 COUNT_BLK2 Now you have to combine SUL, MSINC, and reg4 to build up new COUNT_BLK. Use figure 9 as a reference to combine all modules. Each update signal from SUL will be connected to EN port of corresponding registers and also connected to tri-state buffers (buf.so3.n in gen_lib). Note that you have to specify the width of bus connected to each tristate buffer by changing N into 4 as in figure 12. This can be done by Shift-F7 as you do when changing the port names. N 4 Figure 12. Specifying width of buf.n.so3 The p(3:0) bus will be shared among 5 register s output. Since only one of update signal will be 1 at a given time, there will be no contention on p(3:0) bus. Also, n(3:0) will be captured on only one register which is currently enabled. The input/output ports are exactly the same as COUNT_BLK in section 2. Once you are done with the schematic, you can reuse COUNT_BLK.force to test this block since all the port names and function of COUNT_BLK2 are the same as COUNT_BLK. However, you will notice that each digit is updated sequentially (one at one clock cycle). Once you have verified the correct functionality of your new counter block, generate a symbol which has exactly the same shape as your COUNT_BLK. In the next section you will replace the COUNT_BLK symbol with COUNT_BLK2 symbol. The following should be turned in Completed schematic of COUNT_BLK2 Annotated trace of COUNT_BLK.force. ECE/CS 352 Spring 2003 Project 2 Document Version

19 10. STOP_WATCH2: Replacement of COUNT_BLK Now, you will replace the COUNT_BLK in your top level schematic with newly designed COUNT_BLK2. Note that at this point you have generated the symbol for COUNT_BLK2 in the same shape of COUNT_BLK. Make a copy of your top level design(stop_watch) that is named STOP_WATCH2 and then replace COUNT_BLK with COUNT_BLK2. Verify the ports are connected correctly. Again, to test your STOP_WATCH2, you can reuse STOP_WATCH.force to test your new top level design. Compare the simulation trace with your original simulation trace you obtained in Section 7. Once you have verified and compared your new trace, you need to submit the same five different portions of your annotated traces: Schematic of your design. Print out of entire trace from 0ns to ns Print out of zoomed trace from 0ns to 2000ns Print out of zoomed trace from ns to ns Print out of zoomed trace from ns to ns Print out of zoomed trace from ns to ns ns Each trace should contain meaningful annotation. Poor annotation will be penalized. 11. Extra credit options You can earn up to 30% additional points for your project by pursuing one of the following additional options. Make sure you have completed the required portion of the project before attempting any of these extra credit steps. You will not receive ANY extra credit if your base required design does not work correctly. You should not attempt more than one of the options below, as each requires significant time and effort. Additional points will be distributed relative to other groups that attempt the same extra credit choice. Here is a brief description of each option. We are also willing to entertain other extra credit options; however, you *must* discuss your idea with an instructor before attempting it. No extra credit will be granted for additional work that was not discussed with an instructor ahead of time. 1) (up to 15 points) Add a lap timer function to the stopwatch by using the SET input button as the lap timer button. Pressing the lap timer button holds the current stopwatch time on the display, while the stopwatch itself keeps running. Pressing the lap timer button again will revert the display to the current time. Also, if the user presses STOP while in the lap timer display mode, the stopwatch should stop, but continue to display the lap time until the user presses the lap timer button. You must modify the control logic state diagram appropriately, add additional flip-flops to store the frozen lap time, and modify the output function for the display. This option will be worth at most 15 points. 2) (up to 30 points) Design a code converter block that converts the BCD digits supplied by the stop watch to a Roman numeral number display. The digits must be displayed as specified in the following table. Since Roman numerals require a variable number of characters, assume that the maximum number deeded for each position is available on a display device. Hence, the display device will have the ability to display a total of ECE/CS 352 Spring 2003 Project 2 Document Version

20 fourteen characters: HHHH:MMMMMMM:SSSSSSS. The display device will display one of five characters at each character according to the following 3-bit encoding: a blank space is represented with 000, I is represented with 001, V is represented with 010, X is represented with 011, and L is represented with 100. Hence, the display device has 18x3 = 54 bits controlling it, so your output function will have to generate these 54 bits as a function of the current BCD digits. All numbers should be aligned to the rightmost position (blanks, if any, should be on the left). Your code converter can be a purely combinational output function that uses the BCD digit values as inputs, or you can build it as a sequential state machine, similar in spirit to the sequential COUNT_BLK2. However, any sequential design must have few enough states that it can keep up with digit updates occurring once per second as a result of the timer or stop watch running or the user changing digits in timer mode. Digit Max letters Representation Hours 4 I, II, III, IV, V, VI, VII, VIII, IX Minutes 7 I-X,XI-XX,XXI-XXX,XXXI-XL,XLI-L,LI-LIX Seconds 7 I-X,XI-XX,XXI-XXX,XXXI-XL,XLI-L,LI-LIX 3) (up to 30 points) Redesign COUNT_BLK to minimize the number of gates by using dedicated next state and output functions instead of the existing functional blocks (adder, m6avg, etc.). The cost of your implementation (gate count) will be compared against all other such designs submitted by other groups, and the extra credit points you earn will be proportional to your cost relative to the other groups. 4) (up to 30 points) Build your design by purchasing discrete parts, assembling them on a proto board, and demonstrating your board to the instructors. If you choose this option, you are on your own, and the instructors will not be able to support or assist your efforts. Extra credit points will be distributed on a competitive basis, and will not exceed 30 points. All extra credit work must be documented in your report with a schematic, a textual description, state diagram (if relevant), a commented force file, and an annotated trace for each new or modified module. Also, if you pursue option (4) you must schedule a time with an instructor or TA to demo your implementation. Make sure you have completed the required portions of the project before attempting any extra credit work. The instructors will provide minimal, if any, support for extra credit work. ECE/CS 352 Spring 2003 Project 2 Document Version

21 Department of Electrical and Computer Engineering University of Wisconsin - Madison ECE/Comp Sci 352 Digital System Fundamentals Spring 2003 DESIGN PROJECT 2: Timer/Counter Team Member Names: Student ID Numbers: Sections: Hours by each member: Percent of effort: Signatures: MODULES ITEM POINTS YOUR POINTS Reg4 Schematic 2 MSCNT Schematic 3 Trace (MSCNT.force) 3 COUNT_BLK Schematic 4 Trace 4 (COUNT_BLK.force) CSL Café file (CSL.cafe) 4 Schematic 4 Trace (CSL.force) 4 CLK_DIV Schematic 2 Test (your own) 4 PBI State diagram 3 Schematic 3 Test (your own) 3 COL Schematic 2 Test (your own) 4 STOP_WATCH Schematic 3 Multiple traces 12 (STOP_WATCH.force) SUL Expressions for outputs 3 Schematic 5 COUNT_BLK2 Schematic 4 Trace 4 (COUNT_BLK.force) STOP_WATCH2 Schematic 3 Multiple traces 12 (STOP_WATCH.force) Report quality 5 TOTAL 100 Extra Credits Total Extra Credits 30 ECE/CS 352 Spring 2003 Project 2 Document Version

ECE / COMP SCI 352 DIGITAL SYSTEMS FUNDAMENTALS. Design Project 2. Spring 2003 Due: Beginning of class on Friday 5/02/2003

ECE / COMP SCI 352 DIGITAL SYSTEMS FUNDAMENTALS. Design Project 2. Spring 2003 Due: Beginning of class on Friday 5/02/2003 ECE / COMP SCI 352 DIGITAL SYSTEMS FUNDAMENTALS Design Project 2 Spring 2003 Due: Beginning of class on Friday 5/02/2003 Projects 1 and 2 together will be the design of a simple digital stopwatch. In Project

More information

Chapter 11 State Machine Design

Chapter 11 State Machine Design Chapter State Machine Design CHAPTER OBJECTIVES Upon successful completion of this chapter, you will be able to: Describe the components of a state machine. Distinguish between Moore and Mealy implementations

More information

Long and Fast Up/Down Counters Pushpinder Kaur CHOUHAN 6 th Jan, 2003

Long and Fast Up/Down Counters Pushpinder Kaur CHOUHAN 6 th Jan, 2003 1 Introduction Long and Fast Up/Down Counters Pushpinder Kaur CHOUHAN 6 th Jan, 2003 Circuits for counting both forward and backward events are frequently used in computers and other digital systems. Digital

More information

Asynchronous (Ripple) Counters

Asynchronous (Ripple) Counters Circuits for counting events are frequently used in computers and other digital systems. Since a counter circuit must remember its past states, it has to possess memory. The chapter about flip-flops introduced

More information

NH 67, Karur Trichy Highways, Puliyur C.F, Karur District UNIT-III SEQUENTIAL CIRCUITS

NH 67, Karur Trichy Highways, Puliyur C.F, Karur District UNIT-III SEQUENTIAL CIRCUITS NH 67, Karur Trichy Highways, Puliyur C.F, 639 114 Karur District DEPARTMENT OF ELETRONICS AND COMMUNICATION ENGINEERING COURSE NOTES SUBJECT: DIGITAL ELECTRONICS CLASS: II YEAR ECE SUBJECT CODE: EC2203

More information

PHYSICS 5620 LAB 9 Basic Digital Circuits and Flip-Flops

PHYSICS 5620 LAB 9 Basic Digital Circuits and Flip-Flops PHYSICS 5620 LAB 9 Basic Digital Circuits and Flip-Flops Objective Construct a two-bit binary decoder. Study multiplexers (MUX) and demultiplexers (DEMUX). Construct an RS flip-flop from discrete gates.

More information

ECE 555 DESIGN PROJECT Introduction and Phase 1

ECE 555 DESIGN PROJECT Introduction and Phase 1 March 15, 1998 ECE 555 DESIGN PROJECT Introduction and Phase 1 Charles R. Kime Dept. of Electrical and Computer Engineering University of Wisconsin Madison Phase I Due Wednesday, March 24; One Week Grace

More information

YEDITEPE UNIVERSITY DEPARTMENT OF COMPUTER ENGINEERING. EXPERIMENT VIII: FLIP-FLOPS, COUNTERS 2014 Fall

YEDITEPE UNIVERSITY DEPARTMENT OF COMPUTER ENGINEERING. EXPERIMENT VIII: FLIP-FLOPS, COUNTERS 2014 Fall YEDITEPE UNIVERSITY DEPARTMENT OF COMPUTER ENGINEERING EXPERIMENT VIII: FLIP-FLOPS, COUNTERS 2014 Fall Objective: - Dealing with the operation of simple sequential devices. Learning invalid condition in

More information

Logic Design. Flip Flops, Registers and Counters

Logic Design. Flip Flops, Registers and Counters Logic Design Flip Flops, Registers and Counters Introduction Combinational circuits: value of each output depends only on the values of inputs Sequential Circuits: values of outputs depend on inputs and

More information

Chapter 5 Flip-Flops and Related Devices

Chapter 5 Flip-Flops and Related Devices Chapter 5 Flip-Flops and Related Devices Chapter 5 Objectives Selected areas covered in this chapter: Constructing/analyzing operation of latch flip-flops made from NAND or NOR gates. Differences of synchronous/asynchronous

More information

Experiment # 4 Counters and Logic Analyzer

Experiment # 4 Counters and Logic Analyzer EE20L - Introduction to Digital Circuits Experiment # 4. Synopsis: Experiment # 4 Counters and Logic Analyzer In this lab we will build an up-counter and a down-counter using 74LS76A - Flip Flops. The

More information

WINTER 15 EXAMINATION Model Answer

WINTER 15 EXAMINATION Model Answer Important Instructions to examiners: 1) The answers should be examined by key words and not as word-to-word as given in the model answer scheme. 2) The model answer and the answer written by candidate

More information

1. Convert the decimal number to binary, octal, and hexadecimal.

1. Convert the decimal number to binary, octal, and hexadecimal. 1. Convert the decimal number 435.64 to binary, octal, and hexadecimal. 2. Part A. Convert the circuit below into NAND gates. Insert or remove inverters as necessary. Part B. What is the propagation delay

More information

problem maximum score 1 28pts 2 10pts 3 10pts 4 15pts 5 14pts 6 12pts 7 11pts total 100pts

problem maximum score 1 28pts 2 10pts 3 10pts 4 15pts 5 14pts 6 12pts 7 11pts total 100pts University of California at Berkeley College of Engineering Department of Electrical Engineering and Computer Sciences EECS150 J. Wawrzynek Spring 2002 4/5/02 Midterm Exam II Name: Solutions ID number:

More information

CPE 200L LABORATORY 3: SEQUENTIAL LOGIC CIRCUITS UNIVERSITY OF NEVADA, LAS VEGAS GOALS: BACKGROUND: SR FLIP-FLOP/LATCH

CPE 200L LABORATORY 3: SEQUENTIAL LOGIC CIRCUITS UNIVERSITY OF NEVADA, LAS VEGAS GOALS: BACKGROUND: SR FLIP-FLOP/LATCH CPE 200L LABORATORY 3: SEUENTIAL LOGIC CIRCUITS DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING UNIVERSITY OF NEVADA, LAS VEGAS GOALS: Learn to use Function Generator and Oscilloscope on the breadboard.

More information

Rensselaer Polytechnic Institute Computer Hardware Design ECSE Report. Lab Three Xilinx Richards Controller and Logic Analyzer Laboratory

Rensselaer Polytechnic Institute Computer Hardware Design ECSE Report. Lab Three Xilinx Richards Controller and Logic Analyzer Laboratory RPI Rensselaer Polytechnic Institute Computer Hardware Design ECSE 4770 Report Lab Three Xilinx Richards Controller and Logic Analyzer Laboratory Name: Walter Dearing Group: Brad Stephenson David Bang

More information

Chapter 3 Unit Combinational

Chapter 3 Unit Combinational EE 200: Digital Logic Circuit Design Dr Radwan E Abdel-Aal, COE Logic and Computer Design Fundamentals Chapter 3 Unit Combinational 5 Registers Logic and Design Counters Part Implementation Technology

More information

Section 6.8 Synthesis of Sequential Logic Page 1 of 8

Section 6.8 Synthesis of Sequential Logic Page 1 of 8 Section 6.8 Synthesis of Sequential Logic Page of 8 6.8 Synthesis of Sequential Logic Steps:. Given a description (usually in words), develop the state diagram. 2. Convert the state diagram to a next-state

More information

Chapter 6. Flip-Flops and Simple Flip-Flop Applications

Chapter 6. Flip-Flops and Simple Flip-Flop Applications Chapter 6 Flip-Flops and Simple Flip-Flop Applications Basic bistable element It is a circuit having two stable conditions (states). It can be used to store binary symbols. J. C. Huang, 2004 Digital Logic

More information

MC9211 Computer Organization

MC9211 Computer Organization MC9211 Computer Organization Unit 2 : Combinational and Sequential Circuits Lesson2 : Sequential Circuits (KSB) (MCA) (2009-12/ODD) (2009-10/1 A&B) Coverage Lesson2 Outlines the formal procedures for the

More information

Contents Circuits... 1

Contents Circuits... 1 Contents Circuits... 1 Categories of Circuits... 1 Description of the operations of circuits... 2 Classification of Combinational Logic... 2 1. Adder... 3 2. Decoder:... 3 Memory Address Decoder... 5 Encoder...

More information

DIGITAL SYSTEM FUNDAMENTALS (ECE421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE422) COUNTERS

DIGITAL SYSTEM FUNDAMENTALS (ECE421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE422) COUNTERS COURSE / CODE DIGITAL SYSTEM FUNDAMENTALS (ECE421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE422) COUNTERS One common requirement in digital circuits is counting, both forward and backward. Digital clocks and

More information

Combinational vs Sequential

Combinational vs Sequential Combinational vs Sequential inputs X Combinational Circuits outputs Z A combinational circuit: At any time, outputs depends only on inputs Changing inputs changes outputs No regard for previous inputs

More information

Vignana Bharathi Institute of Technology UNIT 4 DLD

Vignana Bharathi Institute of Technology UNIT 4 DLD DLD UNIT IV Synchronous Sequential Circuits, Latches, Flip-flops, analysis of clocked sequential circuits, Registers, Shift registers, Ripple counters, Synchronous counters, other counters. Asynchronous

More information

CSE115: Digital Design Lecture 23: Latches & Flip-Flops

CSE115: Digital Design Lecture 23: Latches & Flip-Flops Faculty of Engineering CSE115: Digital Design Lecture 23: Latches & Flip-Flops Sections 7.1-7.2 Suggested Reading A Generic Digital Processor Building Blocks for Digital Architectures INPUT - OUTPUT Interconnect:

More information

Synchronous Sequential Logic

Synchronous Sequential Logic Synchronous Sequential Logic Ranga Rodrigo August 2, 2009 1 Behavioral Modeling Behavioral modeling represents digital circuits at a functional and algorithmic level. It is used mostly to describe sequential

More information

Counter dan Register

Counter dan Register Counter dan Register Introduction Circuits for counting events are frequently used in computers and other digital systems. Since a counter circuit must remember its past states, it has to possess memory.

More information

NH 67, Karur Trichy Highways, Puliyur C.F, Karur District DEPARTMENT OF INFORMATION TECHNOLOGY CS 2202 DIGITAL PRINCIPLES AND SYSTEM DESIGN

NH 67, Karur Trichy Highways, Puliyur C.F, Karur District DEPARTMENT OF INFORMATION TECHNOLOGY CS 2202 DIGITAL PRINCIPLES AND SYSTEM DESIGN NH 67, Karur Trichy Highways, Puliyur C.F, 639 114 Karur District DEPARTMENT OF INFORMATION TECHNOLOGY CS 2202 DIGITAL PRINCIPLES AND SYSTEM DESIGN UNIT 4 SYNCHRONOUS SEQUENTIAL LOGIC Sequential circuits

More information

Unit 11. Latches and Flip-Flops

Unit 11. Latches and Flip-Flops Unit 11 Latches and Flip-Flops 1 Combinational Circuits A combinational circuit consists of logic gates whose outputs, at any time, are determined by combining the values of the inputs. For n input variables,

More information

MODULE 3. Combinational & Sequential logic

MODULE 3. Combinational & Sequential logic MODULE 3 Combinational & Sequential logic Combinational Logic Introduction Logic circuit may be classified into two categories. Combinational logic circuits 2. Sequential logic circuits A combinational

More information

IT T35 Digital system desigm y - ii /s - iii

IT T35 Digital system desigm y - ii /s - iii UNIT - III Sequential Logic I Sequential circuits: latches flip flops analysis of clocked sequential circuits state reduction and assignments Registers and Counters: Registers shift registers ripple counters

More information

Chapter 4. Logic Design

Chapter 4. Logic Design Chapter 4 Logic Design 4.1 Introduction. In previous Chapter we studied gates and combinational circuits, which made by gates (AND, OR, NOT etc.). That can be represented by circuit diagram, truth table

More information

MODEL QUESTIONS WITH ANSWERS THIRD SEMESTER B.TECH DEGREE EXAMINATION DECEMBER CS 203: Switching Theory and Logic Design. Time: 3 Hrs Marks: 100

MODEL QUESTIONS WITH ANSWERS THIRD SEMESTER B.TECH DEGREE EXAMINATION DECEMBER CS 203: Switching Theory and Logic Design. Time: 3 Hrs Marks: 100 MODEL QUESTIONS WITH ANSWERS THIRD SEMESTER B.TECH DEGREE EXAMINATION DECEMBER 2016 CS 203: Switching Theory and Logic Design Time: 3 Hrs Marks: 100 PART A ( Answer All Questions Each carries 3 Marks )

More information

Sequential Logic and Clocked Circuits

Sequential Logic and Clocked Circuits Sequential Logic and Clocked Circuits Clock or Timing Device Input Variables State or Memory Element Combinational Logic Elements From combinational logic, we move on to sequential logic. Sequential logic

More information

Introduction. NAND Gate Latch. Digital Logic Design 1 FLIP-FLOP. Digital Logic Design 1

Introduction. NAND Gate Latch.  Digital Logic Design 1 FLIP-FLOP. Digital Logic Design 1 2007 Introduction BK TP.HCM FLIP-FLOP So far we have seen Combinational Logic The output(s) depends only on the current values of the input variables Here we will look at Sequential Logic circuits The

More information

Chapter 2. Digital Circuits

Chapter 2. Digital Circuits Chapter 2. Digital Circuits Logic gates Flip-flops FF registers IC registers Data bus Encoders/Decoders Multiplexers Troubleshooting digital circuits Most contents of this chapter were covered in 88-217

More information

DALHOUSIE UNIVERSITY Department of Electrical & Computer Engineering Digital Circuits - ECED 220. Experiment 4 - Latches and Flip-Flops

DALHOUSIE UNIVERSITY Department of Electrical & Computer Engineering Digital Circuits - ECED 220. Experiment 4 - Latches and Flip-Flops DLHOUSIE UNIVERSITY Department of Electrical & Computer Engineering Digital Circuits - ECED 0 Experiment - Latches and Flip-Flops Objectives:. To implement an RS latch memory element. To implement a JK

More information

CHAPTER 4: Logic Circuits

CHAPTER 4: Logic Circuits CHAPTER 4: Logic Circuits II. Sequential Circuits Combinational circuits o The outputs depend only on the current input values o It uses only logic gates, decoders, multiplexers, ALUs Sequential circuits

More information

Lecture 8: Sequential Logic

Lecture 8: Sequential Logic Lecture 8: Sequential Logic Last lecture discussed how we can use digital electronics to do combinatorial logic we designed circuits that gave an immediate output when presented with a given set of inputs

More information

EE 209 Lab 7 A Walk-Off

EE 209 Lab 7 A Walk-Off EE 209 Lab 7 A Walk-Off Introduction In this lab you will complete the control unit and datapath for a simple crosswalk controller that was discussed in class. You should work on this lab INDIVIDUALLY!

More information

CSE Latches and Flip-flops Dr. Izadi. NOR gate property: A B Z Cross coupled NOR gates: S M S R Q M

CSE Latches and Flip-flops Dr. Izadi. NOR gate property: A B Z Cross coupled NOR gates: S M S R Q M CSE-4523 Latches and Flip-flops Dr. Izadi NOR gate property: A B Z A B Z Cross coupled NOR gates: S M S R M R S M R S R S R M S S M R R S ' Gate R Gate S R S G R S R (t+) S G R Flip_flops:. S-R flip-flop

More information

CS 151 Final. Instructions: Student ID. (Last Name) (First Name) Signature

CS 151 Final. Instructions: Student ID. (Last Name) (First Name) Signature CS 151 Final Name Student ID Signature :, (Last Name) (First Name) : : Instructions: 1. Please verify that your paper contains 19 pages including this cover. 2. Write down your Student-Id on the top of

More information

Experiment 8 Introduction to Latches and Flip-Flops and registers

Experiment 8 Introduction to Latches and Flip-Flops and registers Experiment 8 Introduction to Latches and Flip-Flops and registers Introduction: The logic circuits that have been used until now were combinational logic circuits since the output of the device depends

More information

Chapter 7 Counters and Registers

Chapter 7 Counters and Registers Chapter 7 Counters and Registers Chapter 7 Objectives Selected areas covered in this chapter: Operation & characteristics of synchronous and asynchronous counters. Analyzing and evaluating various types

More information

The outputs are formed by a combinational logic function of the inputs to the circuit or the values stored in the flip-flops (or both).

The outputs are formed by a combinational logic function of the inputs to the circuit or the values stored in the flip-flops (or both). 1 The outputs are formed by a combinational logic function of the inputs to the circuit or the values stored in the flip-flops (or both). The value that is stored in a flip-flop when the clock pulse occurs

More information

Design of a Binary Number Lock (using schematic entry method) 1. Synopsis: 2. Description of the Circuit:

Design of a Binary Number Lock (using schematic entry method) 1. Synopsis: 2. Description of the Circuit: Design of a Binary Number Lock (using schematic entry method) 1. Synopsis: This lab gives you more exercise in schematic entry, state machine design using the one-hot state method, further understanding

More information

CS8803: Advanced Digital Design for Embedded Hardware

CS8803: Advanced Digital Design for Embedded Hardware CS883: Advanced Digital Design for Embedded Hardware Lecture 4: Latches, Flip-Flops, and Sequential Circuits Instructor: Sung Kyu Lim (limsk@ece.gatech.edu) Website: http://users.ece.gatech.edu/limsk/course/cs883

More information

DIGITAL ELECTRONICS MCQs

DIGITAL ELECTRONICS MCQs DIGITAL ELECTRONICS MCQs 1. A 8-bit serial in / parallel out shift register contains the value 8, clock signal(s) will be required to shift the value completely out of the register. A. 1 B. 2 C. 4 D. 8

More information

0 0/1 0/1 0/1 0/1 0/1 0/1 0/1 0/1 1 1 Stop bits. 11-bit Serial Data format

0 0/1 0/1 0/1 0/1 0/1 0/1 0/1 0/1 1 1 Stop bits. 11-bit Serial Data format Applications of Shift Registers The major application of a shift register is to convert between parallel and serial data. Shift registers are also used as keyboard encoders. The two applications of the

More information

CprE 281: Digital Logic

CprE 281: Digital Logic CprE 28: Digital Logic Instructor: Alexander Stoytchev http://www.ece.iastate.edu/~alexs/classes/ Registers and Counters CprE 28: Digital Logic Iowa State University, Ames, IA Copyright Alexander Stoytchev

More information

Laboratory 1 - Introduction to Digital Electronics and Lab Equipment (Logic Analyzers, Digital Oscilloscope, and FPGA-based Labkit)

Laboratory 1 - Introduction to Digital Electronics and Lab Equipment (Logic Analyzers, Digital Oscilloscope, and FPGA-based Labkit) Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science 6. - Introductory Digital Systems Laboratory (Spring 006) Laboratory - Introduction to Digital Electronics

More information

1. Synopsis: 2. Description of the Circuit:

1. Synopsis: 2. Description of the Circuit: Design of a Binary Number Lock (using schematic entry method) 1. Synopsis: This lab gives you more exercise in schematic entry, state machine design using the one-hot state method, further understanding

More information

HDL & High Level Synthesize (EEET 2035) Laboratory II Sequential Circuits with VHDL: DFF, Counter, TFF and Timer

HDL & High Level Synthesize (EEET 2035) Laboratory II Sequential Circuits with VHDL: DFF, Counter, TFF and Timer 1 P a g e HDL & High Level Synthesize (EEET 2035) Laboratory II Sequential Circuits with VHDL: DFF, Counter, TFF and Timer Objectives: Develop the behavioural style VHDL code for D-Flip Flop using gated,

More information

Lab #5: Design Example: Keypad Scanner and Encoder - Part 1 (120 pts)

Lab #5: Design Example: Keypad Scanner and Encoder - Part 1 (120 pts) Nate Pihlstrom, npihlstr@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 information

Digital Systems Laboratory 3 Counters & Registers Time 4 hours

Digital Systems Laboratory 3 Counters & Registers Time 4 hours Digital Systems Laboratory 3 Counters & Registers Time 4 hours Aim: To investigate the counters and registers constructed from flip-flops. Introduction: In the previous module, you have learnt D, S-R,

More information

You will be first asked to demonstrate regular operation with default values. You will be asked to reprogram your time values and continue operation

You will be first asked to demonstrate regular operation with default values. You will be asked to reprogram your time values and continue operation Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science 6.111 - Introductory Digital Systems Laboratory (Spring 2006) Laboratory 2 (Traffic Light Controller) Check

More information

CS 110 Computer Architecture. Finite State Machines, Functional Units. Instructor: Sören Schwertfeger.

CS 110 Computer Architecture. Finite State Machines, Functional Units. Instructor: Sören Schwertfeger. CS 110 Computer Architecture Finite State Machines, Functional Units Instructor: Sören Schwertfeger http://shtech.org/courses/ca/ School of Information Science and Technology SIST ShanghaiTech University

More information

The basic logic gates are the inverter (or NOT gate), the AND gate, the OR gate and the exclusive-or gate (XOR). If you put an inverter in front of

The basic logic gates are the inverter (or NOT gate), the AND gate, the OR gate and the exclusive-or gate (XOR). If you put an inverter in front of 1 The basic logic gates are the inverter (or NOT gate), the AND gate, the OR gate and the exclusive-or gate (XOR). If you put an inverter in front of the AND gate, you get the NAND gate etc. 2 One of the

More information

IS1500 (not part of IS1200) Logic Design Lab (LD-Lab)

IS1500 (not part of IS1200) Logic Design Lab (LD-Lab) Introduction IS1500 (not part of IS1200) Logic Design Lab (LD-Lab) 2017-10-26 The purpose of this lab is to give a hands-on experience of using gates and digital building blocks. These build blocks are

More information

ECB DIGITAL ELECTRONICS PROJECT BASED LEARNING PROJECT REPORT ON 7 SEGMENT DIGITAL STOP WATCH USING DECODER

ECB DIGITAL ELECTRONICS PROJECT BASED LEARNING PROJECT REPORT ON 7 SEGMENT DIGITAL STOP WATCH USING DECODER ECB2212 - DIGITAL ELECTRONICS PROJECT BASED LEARNING PROJECT REPORT ON 7 SEGMENT DIGITAL STOP WATCH USING DECODER SUBMITTED BY ASHRAF HUSSAIN (160051601105) S SAMIULLAH (160051601059) CONTENTS >AIM >INTRODUCTION

More information

Switching Theory And Logic Design UNIT-IV SEQUENTIAL LOGIC CIRCUITS

Switching Theory And Logic Design UNIT-IV SEQUENTIAL LOGIC CIRCUITS Switching Theory And Logic Design UNIT-IV SEQUENTIAL LOGIC CIRCUITS Sequential circuits Classification of sequential circuits: Sequential circuits may be classified as two types. 1. Synchronous sequential

More information

CPS311 Lecture: Sequential Circuits

CPS311 Lecture: Sequential Circuits CPS311 Lecture: Sequential Circuits Last revised August 4, 2015 Objectives: 1. To introduce asynchronous and synchronous flip-flops (latches and pulsetriggered, plus asynchronous preset/clear) 2. To introduce

More information

COE328 Course Outline. Fall 2007

COE328 Course Outline. Fall 2007 COE28 Course Outline Fall 2007 1 Objectives This course covers the basics of digital logic circuits and design. Through the basic understanding of Boolean algebra and number systems it introduces the student

More information

University of Victoria. Department of Electrical and Computer Engineering. CENG 290 Digital Design I Lab Manual

University of Victoria. Department of Electrical and Computer Engineering. CENG 290 Digital Design I Lab Manual University of Victoria Department of Electrical and Computer Engineering CENG 290 Digital Design I Lab Manual INDEX Introduction to the labs Lab1: Digital Instrumentation Lab2: Basic Digital Components

More information

Experiment # 12. Traffic Light Controller

Experiment # 12. Traffic Light Controller Experiment # 12 Traffic Light Controller Objectives Practice on the design of clocked sequential circuits. Applications of sequential circuits. Overview In this lab you are going to develop a Finite State

More information

Modeling Digital Systems with Verilog

Modeling Digital Systems with Verilog Modeling Digital Systems with Verilog Prof. Chien-Nan Liu TEL: 03-4227151 ext:34534 Email: jimmy@ee.ncu.edu.tw 6-1 Composition of Digital Systems Most digital systems can be partitioned into two types

More information

UNIT III. Combinational Circuit- Block Diagram. Sequential Circuit- Block Diagram

UNIT III. Combinational Circuit- Block Diagram. Sequential Circuit- Block Diagram UNIT III INTRODUCTION In combinational logic circuits, the outputs at any instant of time depend only on the input signals present at that time. For a change in input, the output occurs immediately. Combinational

More information

Quiz #4 Thursday, April 25, 2002, 5:30-6:45 PM

Quiz #4 Thursday, April 25, 2002, 5:30-6:45 PM Last (family) name: First (given) name: Student I.D. #: Circle section: Hu Saluja Department of Electrical and Computer Engineering University of Wisconsin - Madison ECE/CS 352 Digital System Fundamentals

More information

Final Exam review: chapter 4 and 5. Supplement 3 and 4

Final Exam review: chapter 4 and 5. Supplement 3 and 4 Final Exam review: chapter 4 and 5. Supplement 3 and 4 1. A new type of synchronous flip-flop has the following characteristic table. Find the corresponding excitation table with don t cares used as much

More information

EKT 121/4 ELEKTRONIK DIGIT 1

EKT 121/4 ELEKTRONIK DIGIT 1 EKT 2/4 ELEKTRONIK DIGIT Kolej Universiti Kejuruteraan Utara Malaysia Sequential Logic Circuits - COUNTERS - LATCHES (review) S-R R Latch S-R R Latch Active-LOW input INPUTS OUTPUTS S R Q Q COMMENTS Q

More information

RS flip-flop using NOR gate

RS flip-flop using NOR gate RS flip-flop using NOR gate Triggering and triggering methods Triggering : Applying train of pulses, to set or reset the memory cell is known as Triggering. Triggering methods:- There are basically two

More information

Altera s Max+plus II Tutorial

Altera s Max+plus II Tutorial Altera s Max+plus II Tutorial Written by Kris Schindler To accompany Digital Principles and Design (by Donald D. Givone) 8/30/02 1 About Max+plus II Altera s Max+plus II is a powerful simulation package

More information

Sequential Logic. E&CE 223 Digital Circuits and Systems (A. Kennings) Page 1

Sequential Logic. E&CE 223 Digital Circuits and Systems (A. Kennings) Page 1 Sequential Logic E&CE 223 igital Circuits and Systems (A. Kennings) Page 1 Sequential Circuits Have considered only combinational circuits in which circuit outputs are determined entirely by current circuit

More information

Introduction to Microprocessor & Digital Logic

Introduction to Microprocessor & Digital Logic ME262 Introduction to Microprocessor & Digital Logic (Sequential Logic) Summer 2 Sequential Logic Definition The output(s) of a sequential circuit depends d on the current and past states of the inputs,

More information

Name: Date: Suggested Reading Chapter 7, Digital Systems, Principals and Applications; Tocci

Name: Date: Suggested Reading Chapter 7, Digital Systems, Principals and Applications; Tocci Richland College Engineering Technology Rev. 0 B. Donham Rev. 1 (7/2003) J. Horne Rev. 2 (1/2008) J. Bradbury Digital Fundamentals CETT 1425 Lab 7 Asynchronous Ripple Counters Name: Date: Objectives: To

More information

SEQUENTIAL LOGIC. Satish Chandra Assistant Professor Department of Physics P P N College, Kanpur

SEQUENTIAL LOGIC. Satish Chandra Assistant Professor Department of Physics P P N College, Kanpur SEQUENTIAL LOGIC Satish Chandra Assistant Professor Department of Physics P P N College, Kanpur www.satish0402.weebly.com OSCILLATORS Oscillators is an amplifier which derives its input from output. Oscillators

More information

Logic Design Viva Question Bank Compiled By Channveer Patil

Logic Design Viva Question Bank Compiled By Channveer Patil Logic Design Viva Question Bank Compiled By Channveer Patil Title of the Practical: Verify the truth table of logic gates AND, OR, NOT, NAND and NOR gates/ Design Basic Gates Using NAND/NOR gates. Q.1

More information

EECS150 - Digital Design Lecture 19 - Finite State Machines Revisited

EECS150 - Digital Design Lecture 19 - Finite State Machines Revisited EECS150 - Digital Design Lecture 19 - Finite State Machines Revisited April 2, 2013 John Wawrzynek Spring 2013 EECS150 - Lec19-fsm Page 1 Finite State Machines (FSMs) FSM circuits are a type of sequential

More information

RS flip-flop using NOR gate

RS flip-flop using NOR gate RS flip-flop using NOR gate Triggering and triggering methods Triggering : Applying train of pulses, to set or reset the memory cell is known as Triggering. Triggering methods:- There are basically two

More information

EMT 125 Digital Electronic Principles I CHAPTER 6 : FLIP-FLOP

EMT 125 Digital Electronic Principles I CHAPTER 6 : FLIP-FLOP EMT 125 Digital Electronic Principles I CHAPTER 6 : FLIP-FLOP 1 Chapter Overview Latches Gated Latches Edge-triggered flip-flops Master-slave flip-flops Flip-flop operating characteristics Flip-flop applications

More information

ASYNCHRONOUS COUNTER CIRCUITS

ASYNCHRONOUS COUNTER CIRCUITS ASYNCHRONOUS COUNTER CIRCUITS Asynchronous counters do not have a common clock that controls all the Hipflop stages. The control clock is input into the first stage, or the LSB stage of the counter. The

More information

Sequential Digital Design. Laboratory Manual. Experiment #7. Counters

Sequential Digital Design. Laboratory Manual. Experiment #7. Counters The Islamic University of Gaza Engineering Faculty Department of Computer Engineering Spring 2018 ECOM 2022 Khaleel I. Shaheen Sequential Digital Design Laboratory Manual Experiment #7 Counters Objectives

More information

Digital Fundamentals. Lab 5 Latches & Flip-Flops CETT Name: Date:

Digital Fundamentals. Lab 5 Latches & Flip-Flops CETT Name: Date: Richland College School of Engineering & Technology Rev. 0 B. Donham Rev. 1 (7/2003) J. Horne Rev. 2 (1/2008) J. Bradbury Rev. 3 (7/2015) J. Bradbury Digital Fundamentals CETT 1425 Lab 5 Latches & Flip-Flops

More information

Chapter 5 Sequential Circuits

Chapter 5 Sequential Circuits Logic and Computer Design Fundamentals Chapter 5 Sequential Circuits Part 2 Sequential Circuit Design Charles Kime & Thomas Kaminski 28 Pearson Education, Inc. (Hyperlinks are active in View Show mode)

More information

CSCB58 - Lab 4. Prelab /3 Part I (in-lab) /1 Part II (in-lab) /1 Part III (in-lab) /2 TOTAL /8

CSCB58 - Lab 4. Prelab /3 Part I (in-lab) /1 Part II (in-lab) /1 Part III (in-lab) /2 TOTAL /8 CSCB58 - Lab 4 Clocks and Counters Learning Objectives The purpose of this lab is to learn how to create counters and to be able to control when operations occur when the actual clock rate is much faster.

More information

MUHAMMAD NAEEM LATIF MCS 3 RD SEMESTER KHANEWAL

MUHAMMAD NAEEM LATIF MCS 3 RD SEMESTER KHANEWAL 1. A stage in a shift register consists of (a) a latch (b) a flip-flop (c) a byte of storage (d) from bits of storage 2. To serially shift a byte of data into a shift register, there must be (a) one click

More information

Registers and Counters

Registers and Counters Registers and Counters Clocked sequential circuit = F/Fs and combinational gates Register Group of flip-flops (share a common clock and capable of storing one bit of information) Consist of a group of

More information

Scanned by CamScanner

Scanned by CamScanner NAVEEN RAJA VELCHURI DSD & Digital IC Applications Example: 2-bit asynchronous up counter: The 2-bit Asynchronous counter requires two flip-flops. Both flip-flop inputs are connected to logic 1, and initially

More information

ME 515 Mechatronics. Introduction to Digital Electronics

ME 515 Mechatronics. Introduction to Digital Electronics ME 55 Mechatronics /5/26 ME 55 Mechatronics Digital Electronics Asanga Ratnaweera Department of Faculty of Engineering University of Peradeniya Tel: 8239 (3627) Email: asangar@pdn.ac.lk Introduction to

More information

Chapter 3: Sequential Logic Systems

Chapter 3: Sequential Logic Systems Chapter 3: Sequential Logic Systems 1. The S-R Latch Learning Objectives: At the end of this topic you should be able to: design a Set-Reset latch based on NAND gates; complete a sequential truth table

More information

Counters

Counters Counters A counter is the most versatile and useful subsystems in the digital system. A counter driven by a clock can be used to count the number of clock cycles. Since clock pulses occur at known intervals,

More information

CHAPTER 4: Logic Circuits

CHAPTER 4: Logic Circuits CHAPTER 4: Logic Circuits II. Sequential Circuits Combinational circuits o The outputs depend only on the current input values o It uses only logic gates, decoders, multiplexers, ALUs Sequential circuits

More information

Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science Introductory Digital Systems Laboratory

Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science Introductory Digital Systems Laboratory Problem Set Issued: March 3, 2006 Problem Set Due: March 15, 2006 Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science 6.111 Introductory Digital Systems Laboratory

More information

Chapter 5 Synchronous Sequential Logic

Chapter 5 Synchronous Sequential Logic Chapter 5 Synchronous Sequential Logic Chih-Tsun Huang ( 黃稚存 ) http://nthucad.cs.nthu.edu.tw/~cthuang/ Department of Computer Science National Tsing Hua University Outline Introduction Storage Elements:

More information

Electrical and Telecommunications Engineering Technology_TCET3122/TC520. NEW YORK CITY COLLEGE OF TECHNOLOGY The City University of New York

Electrical and Telecommunications Engineering Technology_TCET3122/TC520. NEW YORK CITY COLLEGE OF TECHNOLOGY The City University of New York NEW YORK CITY COLLEGE OF TECHNOLOGY The City University of New York DEPARTMENT: SUBJECT CODE AND TITLE: COURSE DESCRIPTION: REQUIRED: Electrical and Telecommunications Engineering Technology TCET 3122/TC

More information

Experiment # 9. Clock generator circuits & Counters. Digital Design LAB

Experiment # 9. Clock generator circuits & Counters. Digital Design LAB Digital Design LAB Islamic University Gaza Engineering Faculty Department of Computer Engineering Fall 2012 ECOM 2112: Digital Design LAB Eng: Ahmed M. Ayash Experiment # 9 Clock generator circuits & Counters

More information

EXPERIMENT: 1. Graphic Symbol: OR: The output of OR gate is true when one of the inputs A and B or both the inputs are true.

EXPERIMENT: 1. Graphic Symbol: OR: The output of OR gate is true when one of the inputs A and B or both the inputs are true. EXPERIMENT: 1 DATE: VERIFICATION OF BASIC LOGIC GATES AIM: To verify the truth tables of Basic Logic Gates NOT, OR, AND, NAND, NOR, Ex-OR and Ex-NOR. APPARATUS: mention the required IC numbers, Connecting

More information

Spring 2011 Microprocessors B Course Project (30% of your course Grade)

Spring 2011 Microprocessors B Course Project (30% of your course Grade) Course Project guidelines Spring 2011 Microprocessors B 17.384 Course Project (30% of your course Grade) Overall Guidelines Design a fairly complex system that contains at least one microcontroller (the

More information

Flip-Flops and Sequential Circuit Design

Flip-Flops and Sequential Circuit Design Flip-Flops and Sequential Circuit Design ECE 52 Summer 29 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 information

Sequential Circuits: Latches & Flip-Flops

Sequential Circuits: Latches & Flip-Flops Sequential Circuits: Latches & Flip-Flops Overview Storage Elements Latches SR, JK, D, and T Characteristic Tables, Characteristic Equations, Eecution Tables, and State Diagrams Standard Symbols Flip-Flops

More information