NOT COPY DO NOT COPY DO NOT COPY DO NOT COPY DO NOT COPY DO NOT COPY

Size: px
Start display at page:

Download "NOT COPY DO NOT COPY DO NOT COPY DO NOT COPY DO NOT COPY DO NOT COPY"

Transcription

1 Section 8. Counters HOW MUCH Once you understand the capabilities of different Ps, you might ask, Why not ES I COS? just always use the most capable P available? For example, even if a circuit fits in a 0-pin V8, why not specify the slightly larger, -pin 0V8 so that spare inputs are available in case of trouble? And, once you ve specified a 0V8, why not use the somewhat more capable V0 which comes in the same -pin package? In the real world of product design and engineering, the constraint is cost. Otherwise, the argument of the previous paragraph could be extended ad nauseum, using CPs and FPGAs with even more capability (see \chapref{cpsfpgas). Like automobiles and fine wines, digital devices such as Ps, CPs, and FPGAs are not always priced proportionally to their capabilities and benefits. In particular, the closer a device s capability is to the bleeding edge, the higher the premium you can expect to pay. hus, when selecting a devices to realize a design, you must evaluate many trade-offs. For example, a high-density, high-cost CP or FPGA may allow a design to be realized in a single device whose internal functions are easily changed if need be. On the other hand, using two or more lower density Ps, CPs, or FPGAs may save component cost but increase board area and power consumption, while making it harder to change the design later (since the device interconnections must be fixed when the board is fabricated). What this goes to show is that overall cost must always be considered along with design elegance and convenience to create a successful (i.e., profitable) product. And minimizing the cost of a product usually involves a plethora of common-sense economic and engineering considerations that are far removed from the turn-the-crank, algorithmic gate minimization methods of Chapter. 8. Counters he name counter is generally used for any clocked sequential circuit whose counter state diagram contains a single cycle, as in Figure 8-. he modulus of a modulus counter is the number of states in the cycle. A counter with m states is called a modulo-m counter or, sometimes, a divide-by-m counter. A counter with a nonpower-of- modulus has extra states that are not used in normal operation. divide-by-m counter modulo-m counter Figure 8- S S General structure S of a counter s state diagram a single cycle. Sm S S

2 Chapter 8 Sequential Logic Design Practices Q Q0 Q Q Q Q Q Q Q Figure 8- A -bit binary Q Q ripple counter. Q n-bit binary counter Probably the most commonly used counter type is an n-bit binary counter. Such a counter has n flip-flops and has n states, which are visited in the sequence 0,,,, n, 0,,. Each of these states is encoded as the corresponding n-bit binary integer. 8.. Ripple Counters An n-bit binary counter can be constructed with just n flip-flops and no other components, for any value of n. Figure 8- shows such a counter for n =. Recall that a flip-flop changes state (toggles) on every rising edge of its clock input. hus, each bit of the counter toggles if and only if the immediately preceding bit changes from to 0. his corresponds to a normal binary counting sequence when a particular bit changes from to 0, it generates a carry to the ripple counter next most significant bit. he counter is called a ripple counter because the carry information ripples from the less significant bits to the more significant bits, one bit at a time. 8.. Synchronous Counters Although a ripple counter requires fewer components than any other type of binary counter, it does so at a price it is slower than any other type of binary counter. In the worst case, when the most significant bit must change, the output is not valid until time n t pq after the rising edge of, where t pq is the propagation delay from input to output of a flip-flop. synchronous counter A synchronous counter connects all of its flip-flop clock inputs to the same common signal, so that all of the flip-flop outputs change at the same time, after only t pq ns of delay. As shown in Figure 8-8, this requires the use of flip-flops with enable inputs; the output toggles on the rising edge of if and only if EN is asserted. Combinational logic on the EN inputs determines which, if any, flip-flops toggle on each rising edge of.

3 Section 8. Counters CNEN EN Q Q0 EN Q Q EN Q Q Figure 8-8 EN Q Q A synchronous -bit binary counter with serial enable logic. As shown in Figure 8-8, it is also possible to provide a master countenable signal CNEN. Each flip-flop toggles if and only if CNEN is asserted and all of the lower-order counter bits are. Like the binary ripple counter, a synchronous n-bit binary counter can be built with a fixed amount of logic per bit in this case, a flip-flop with enable and a -input AND gate. he counter structure in Figure 8-8 is sometimes called a synchronous synchronous serial serial counter because the combinational enable signals propagate serially from counter the least significant to the most significant bits. If the clock period is too short, there may not be enough time for a change in the counter s LSB to propagate to the MSB. his problem is eliminated in Figure 8- by driving each EN input with a dedicated AND gate, just a single level of logic. Called a synchronous synchronous parallel parallel counter, this is the fastest binary counter structure. counter CNEN EN Q Q0 Figure 8- A synchronous -bit binary counter with parallel enable logic EN Q Q EN Q Q EN Q Q

4 Chapter 8 Sequential Logic Design Practices 8.. MSI Counters and Applications x he most popular MSI counter is the x, a synchronous -bit binary counter with active-low load and clear inputs, with the traditional logic symbol shown in Figure 8-0. Its function is summarized by the state table in able 8-, and its internal logic diagram is shown in Figure 8-. x he uses D flip-flops rather than flip-flops internally to facilitate the load and clear functions. Each D input is driven by a -input multiplexer consisting of an OR gate and two AND gates. he multiplexer output is 0 if the _L input is asserted. Otherwise, the top AND gate passes the data input (A, B, C, or D) to the output if _L is asserted. If neither _L nor _L is asserted, the 0 bottom AND gate passes the output of an XNOR gate to the multiplexer output. able 8- State table for a x -bit binary counter. D QD Inputs Current State Next State _L _L QD QC QB QA QD QC QB QA Figure 8-0 raditional logic 0 x x x x x x x symbol for 0 x x x x x x D C B A the x. 0 x x x x x QD QC QB QA x 0 x x x x QD QC QB QA

5 Section 8. Counters () () _L () _L () A () D Q QA CK Q () B () D Q QB CK Q () C () D Q QC CK Q () D () D Q QD CK Q () () (0) Figure 8- Logic diagram for the x synchronous -bit binary counter, including pin numbers for a standard -pin dual in-line package.

6 8 Chapter 8 Sequential Logic Design Practices x + V R RPU 0 QA QB QC Figure 8- D QD QD Connections for the x to operate in a free-running mode. U he XNOR gates perform the counting function in the. One input of each XNOR is the corresponding count bit (QA, QB, QC, or QD); the other input is, which complements the count bit, if and only if both enables and are asserted and all of the lower-order count bits are. he ( ripple carry out ) signal indicates a carry from the most significant bit position, and is when all of the count bits are and is asserted. Even though most MSI counters have enable inputs, they are often used in free-running counter a free-running mode in which they are enabled continuously. Figure 8- shows the connections to make a operate in this way, and Figure 8- shows the resulting output waveforms. Notice that starting with QA, each signal has half the frequency of the preceding one. hus, a free-running can be used as a divide-by-, -, -8, or - counter, by ignoring any unnecessary high-order output bits. Note that the is fully synchronous; that is, its outputs change only on the rising edge of. Some applications need an asynchronous clear function, Figure 8- Clock and output waveforms for a free-running divide-by- counter. QA QB QC QD COUN

7 Section 8. Counters QA QB QC QD COUN Figure 8- Clock and output waveforms for a free-running divide-by-0 counter. as provided by the x. he has the same pinout as the, but its x _L input is connected to the asynchronous clear inputs of its flip-flops. he x0 and x are more variations with the same pinouts and x0 general functions as the and, except that the counting sequence is x modified to go to state 0 after state. In other words, these are modulo-0 counters, sometimes called decade counters. Figure 8- shows the output decade counter waveforms for a free-running 0 or. Notice that although the QD and QC outputs have one-tenth of the frequency, they do not have a 0% duty cycle, and the QC output, with one-fifth of the input frequency, does not have a constant duty cycle. We ll show the design of a divide-by-0 counter with a 0% duty-cycle output later in this subsection. Although the is a modulo- counter, it can be made to count in a modulus less than by using the _L or _L input to shorten the normal counting sequence. For example, Figure 8- shows one way of using the as a modulo- counter. he output, which detects state, is used to force x Figure 8- Using the x as RPU a modulo- counter with the counting sequence,,,, 0,,. + V Q0 Q Q R D QD Q x0 CN U CN_L U

8 00 Chapter 8 Sequential Logic Design Practices x RPU + V R 0 Q0 Q Figure 8- Q Using the x as D QD Q a modulo- counter x00 with the counting sequence 0,,, U, 0, 0,,. CN0_L U the next state to, so that the circuit will count from to and then start at again, for a total of states per counting cycle. A different approach for modulo- counting with the is shown in Figure 8-. his circuit uses a NAND gate to detect state 0 and force the next state to 0. Notice that only a -input gate is used to detect state 0 (binary 00). Although a -input gate would normally be used to detect the condition CN0 = Q Q Q Q0, the -input gate takes advantage of the fact that no other state in the normal counting sequence of 0 0 has Q = and Q =. In general, to detect state N in a binary counter that counts from 0 to N, we need to AND only the state bits that are in the binary encoding of N. here are many other ways to make a modulo- counter using a. he choice of approach one of the preceding or a combination of them (as in Exercise 8.) depends on the application. As another example, in Section.0 we promised to show you how to build a circuit that counts in the x Figure 8- A x used as an excess- decimal counter. 0 + V R Q0 RPU Q Q D QD Q x00 U U SXX_L

9 Section 8. Counters 0 Q0 Q Q Q COUN 8 0 Figure 8-8 iming waveforms for the used as an excess- decimal counter. excess- decimal code, shown in able - on page. Figure 8- shows the connections for a to count in the excess- sequence. A NAND gate detects state 00 and forces 00 to be loaded as the next state. Figure 8-8 shows the resulting timing waveforms. Notice that the Q output has a 0% duty cycle, which may be desirable for some applications. A binary counter with a modulus greater than can be built by cascading xs. Figure 8- shows the general connections for such a counter. he, _L, and _L inputs of all the s are connected in parallel, so that all of them count or are cleared or loaded at the same time. A master countenable (CNEN) signal is connected to the low-order. he output is asserted if and only if the low-order is in state and CNEN is asserted; is connected to the enable inputs of the high-order. hus, both the carry information and the master count-enable ripple from the output of one Figure 8- General cascading connections for x-based counters. x x RESE_L LOAD_L CNEN 0 0 D0 Q0 D Q D Q D Q D Q D Q D D QD Q D D QD Q 8 U U

10 0 Chapter 8 Sequential Logic Design Practices -bit counter stage to the next. Like the synchronous serial counter of Figure 8-8, this scheme can be extended to build a counter with any desired number of bits; the maximum counting speed is limited by the propagation delay of the ripple carry signal through all of the stages (but see Exercise 8.). Even experienced digital designers are sometimes confused about the difference between the and enable inputs of the and similar counters, since both must be asserted for the counter to count. However, a glance at the s internal logic diagram, Figure 8- on page, shows the difference quite clearly goes to the ripple carry output as well. In many applications, this distinction is important. For example, Figure 8-0 shows an application that uses two s as a modulo- counter that counts from to. he MAXCN output detects state and stops the counter until GO_L is asserted. When GO_L is asserted, the counter is reloaded with and counts up to again. (Note that the value of GO_L is relevant only when the counter is in state.) o keep the counter x Figure V Using xs as a modulo- counter R with the counting sequence,,, 0,,,. RPU Q0 Q Q D QD Q U RESE_L x00 GO_L CNEN x U x00 RELOAD_L U 0 Q Q Q D QD Q MAXCN U

11 Section 8. Counters 0 stopped, MAXCN must be asserted in state even while the counter is stopped. herefore, the low-order counter s input is always asserted, its output is connected to the high-order input, and MAXCN detects state even if CNEN is not asserted (compare with the behavior of 8 in Figure 8-). o enable counting, CNEN is connected to the inputs in parallel. A NAND gate asserts RELOAD_L to go back to state only if GO_L is asserted and the counter is in state. Another counter with functions similar to x s is the x, whose x logic symbol is shown in Figure 8-. One difference in the is that its carry output and enable inputs are active low. More importantly, the is an up/ up/down counter down counter; it counts in ascending or descending binary order depending on the value of an input signal, UP/DN. he counts up when UP/DN is and x down when UP/DN is 0. UP/DN 8.. Decoding Binary-Counter States A binary counter may be combined with a decoder to obtain a set of -out-of-mcoded signals, where one signal is asserted in each counter state. his is useful 0 when counters are used to control a set of devices where a different device is enabled in each counter state. In this approach, each output of the decoder enables a different device. D QD Figure 8- shows how a x wired as a modulo-8 counter can be combined with a x8 -to-8 decoder to provide eight signals, each one representing a counter state. Figure 8- shows typical timing for this circuit. Figure 8- Each decoder output is asserted during a corresponding clock period. Logic symbol for the x up/down Notice that the decoder outputs may contain glitches on state transitions counter. where two or more counter bits change, even though the outputs are glitch free and the 8 does not have any static hazards. In a synchronous counter like the, the outputs don t change at exactly the same time. More important, decoding glitches + V RPU Figure 8- x R x8 A modulo-8 binary counter and decoder. Y0 S0_L G Y S_L GA Y S_L GB 0 Y S_L Q Y S_L A 0 Q Y S_L B Q Y S_L C Y S_L D QD U U

12 0 Chapter 8 Sequential Logic Design Practices _L S0_L S_L S_L S_L S_L S_L S_L S_L COUN 0 0 Figure 8- iming diagram for a modulo-8 binary counter and decoder, showing decoding glitches. multiple signal paths in a decoder like the 8 have different delays; for example, the path from B to Y_L is faster than the path from A to Y_L. hus, even if the input changes simultaneously from 0 to 00, the decoder may behave as if the input were temporarily 00, and the Y_L output may have a glitch. In the present example, it can be shown that the glitches can occur in any realization of function hazard the binary decoder function; this problem is called a function hazard. In most applications, the decoder output signals portrayed in Figure 8- would be used as control inputs to registers, counters, and other edge-triggered devices (e.g., EN_L in a x, _L in a x, or _L in a x). In such a case, the decoding glitches in the figure are not a problem, since they occur after the clock tick. hey are long gone before the next tick comes along, when the decoder outputs are sampled by other edge-triggered devices. However, the glitches would be a problem if they were applied to something like the S_L or R_L inputs of an S-R latch. Likewise, using such potentially glitchy signals as clocks for edge-triggered devices is a definite no-no. If necessary, one way to clean up the glitches in Figure 8- is to connect the 8 outputs to another register that samples the stable decoded outputs on the next clock tick, as shown in Figure 8-. Notice that the decoded outputs have been renamed to account for the -tick delay through the register. However, once you decide to pay for an 8-bit register, a less costly solution is to use an 8-bit ring counter, which provides glitch-free decoded outputs directly, as we ll show in Section 8...

13 Section 8. Counters 0 RPU + V x x R x8 OE S0_L Y0 D Q RS_L G S_L Y D Q RS_L GA S_L Y D Q RS_L GB S_L 8 0 Y D Q RS_L S_L Q Y D Q RS_L A 0 S_L Q Y D Q RS_L B S_L Q Y D Q RS_L C S_L 8 Y 8D 8Q RS0_L D QD U U U Figure 8- A modulo-8 binary counter and decoder with glitch-free outputs. 8.. Counters in ABEL and Ps Binary counters are good candidates for ABEL- and P-based design, for several reasons: A large state machine can often be decomposed into two or more smaller state machines where one of the smaller machines is a binary counter that keeps track of how long the other machine should stay in a particular state. his may simplify both the conceptual design and the circuit design of the machine. Many applications require almost-binary-modulus counters with special requirements for initialization, state detection, or state skipping. For example, a counter in an elevator controller may skip state. Instead of using an off-the-shelf binary counter and extra logic for the special requirements, a designer can specify exactly the required functions in an ABEL program. Most standard MSI counters have only bits, while a single -pin P can be used to create a binary counter with up to 0 bits. he most popular MSI counter is the x -bit binary counter, shown in Figure 8- on page. A glance at this figure shows that the excitation logic for this counter isn t exactly simple, especially considering its use of XNOR gates. Nevertheless, ABEL provides a very simple way of defining counter behavior, which we describe next. Recall that ABEL uses the + symbol to specify integer addition. When two sets are added with this operator, each is interpreted as a binary number; the rightmost set element corresponds to the least significant bit of the number. hus, the function of a x can be specified by the ABEL program in able 8-. When the counter is enabled, is added to the current state.

14 0 Chapter 8 Sequential Logic Design Practices able 8- ABEL program for a x-like -bit binary counter. module ZX title '-bit Binary Counter' " Input pins,!,!,, pin; A, B, C, D pin; " Output pins QA, QB, QC, QD pin istype 'reg'; pin istype 'com'; " Set definitions INPU = [D, C, B, A]; COUN = [QD, QC, QB, QA]; equations COUN. = ; COUN :=! & ( & INPU #! & ( & ) & (COUN + ) #! &!( & ) & COUN); = (COUN == [,,,]) & ; end ZX able 8- MInimized equations for the -bit binary counter in page 0. QA := ( & & & &!QA QD := ( & & & &!QD & QC & QB & QA # & &! & QA # &! & D # & &! & QA # & & QD &!QB # &! & A); # & & QD &!QC # & &! & QD QB := ( & & & &!QB & QA # & &! & QD # & & QB &!QA # & & QD &!QA); # & &! & QB # & &! & QB = ( & QD & QC & QB & QA); # &! & B); QC := ( & & & &!QC & QB & QA # & & QC &!QA # & & QC &!QB # & &! & QC # & &! & QC # &! & C);

15 Section 8. Counters 0 able 8- shows the minimized logic equations that ABEL generates for the -bit counter. Notice that each more significant output bit requires one more product term. As a result, the size of counters that can be realized in a V8 or even a 0V8 is generally limited to five or six bits. Other devices, including the X-series Ps and some CPs, contain an XOR structure that can realize larger counters without increasing product-term requirements. Designing a specialized counting sequence in ABEL is much simpler than adapting a standard binary counter. For example, the ABEL program in able 8- can be adapted to count in excess- sequence (Figure 8-8 on page 0) by changing the equations as follows: COUN :=! & ( & INPU #! & ( & ) & ((COUN==) & ) # ((COUN!=) & (COUN + )) #! &!( & ) & COUN); = (COUN == ) & ; Ps can be cascaded to obtain wider counters, by providing each counter stage with a carry output that indicates when it is about to roll over. here are two basic approaches to generating the carry output: Combinational. he carry equation indicates that the counter is enabled combinational carry and is currently in its last state before rollover. For a -bit binary up output counter, we have COU = CNEN & Q & Q & Q & Q & Q0; Since CNEN is included, this approach allows carries to be rippled through cascaded counters by connecting each COU to the next CNEN. Registered. he carry equation indicates that the counter is about to enter registered carry output its last state before rollover. hus, at the next clock tick, the counter enters this last state and the carry output is asserted. For a -bit binary up counter with load and clear inputs, we have COU :=! &! & CNEN & Q & Q & Q & Q &!Q0 #! *! *!CNEN & Q & Q & Q & Q & Q0 #! & & D & D & D & D & D0; he second approach has the advantage of producing COU with less delay than the combinational approach. However, external gates are now required between stages, since the CNEN signal for each stage should be the logical AND of the master count-enable signal and the COU outputs of all lower-order counters. hese external gates can be avoided if the higher-order counters have multiple enable inputs.

16 08 Chapter 8 Sequential Logic Design Practices 8.. Counters in VHDL Like ABEL, VHDL allows counters to be specified fairly easily. he biggest challenge in VHDL, with its strong type checking, is to get all of the signal types defined correctly and consistently. able 8- is a VHDL program for a x-like binary counter. Notice that the program uses the IEEE.std_logic_arith.all library, which includes the UNSIGNED type, as we described in Section.. on page 8. his library includes definitions of + and - operators that perform unsigned addition and subtraction on UNSIGNED operands. he counter program declares the counter input and output as UNSIGNED vactors and uses + to increment the counter value as required. In the program, we defined an internal signal IQ to hold the counter value. We could have used Q directly, but then we d have to declare its port type as buffer rather than out. Also, we could have defined the type of ports D and Q to be SD_LOGIC_VECOR, but then we would have to perform type conversions inside the body of the process (see Exercise 8.). able 8- VHDL program for a x-like -bit binary counter. library IEEE; use IEEE.std_logic_.all; use IEEE.std_logic_arith.all; entity Vx is port (, _L, _L,, : in SD_LOGIC; D: in UNSIGNED ( downto 0); Q: out UNSIGNED ( downto 0); : out SD_LOGIC ); end Vx; architecture Vx_arch of Vx is signal IQ: UNSIGNED ( downto 0); begin process (,, IQ) begin if ('event and ='') then if _L='0' then IQ <= (others => '0'); elsif _L='0' then IQ <= D; elsif ( and )='' then IQ <= IQ + ; end if; end if; if (IQ=) and (='') then <= ''; else <= '0'; end if; Q <= IQ; end process; end Vx_arch;

17 Section 8. Counters 0 able 8- VHDL architecture for counting in excess- order. architecture Vxs_arch of Vx is signal IQ: UNSIGNED ( downto 0); begin process (,, IQ) begin if 'event and ='' then if _L='0' then IQ <= (others => '0'); elsif _L='0' then IQ <= D; elsif ( and )='' and (IQ=) then IQ <= ('0','0','',''); elsif ( and )='' then IQ <= IQ + ; end if; end if; if (IQ=) and (='') then <= ''; else <= '0'; end if; Q <= IQ; end process; end Vxs_arch; As in ABEL, specialized counting sequences can be specified very easily using behavioral VHDL code. For example, able 8- modifies the x- like counter to count in excess- sequence (,,,, ). Unfortunately, some VHDL synthesis engines do not synthesize counters particularly well. In particular, they tend to synthesize the counting step using a binary adder with the counter value and a constant as operands. his approach requires much more combinational logic than what we ve shown for discrete counters, and is particularly wasteful in CPs and FPGAs containing flipflops, XOR gates, or other structures optimized for counters. In this case, a useful alternative is to write structural VHDL that is targeted to the cells available in a particular CP, FPGA, or ASIC technology. For example, we can construct one bit-cell for a x-like counter using the circuit in Figure 8-. his circuit is designed to use serial propagation for the carry bits, so the same circuit can be used at any stage of an arbitrarily large counter, subject to fanout constraints on the common signals that drive all of the stages. he signals in the bit-cell have the following definitions: (common) he clock input for all stages. NO (common) Asserted if the counter s input is asserted and is negated. NOOR (common) Asserted if the counter s and inputs are both negated. CN (common) Asserted if the counter s input is asserted. Di (per cell) Load data input for cell i.

18 0 Chapter 8 Sequential Logic Design Practices NO Ai Di DINi NOOR D Q Qi CN CEi CDAi CDi CK Q CNENi Q_Li CNEN_Li CNENi+ Figure 8- One bit-cell of a synchronous serial, x-like counter. CNENi (per cell) Serial count enable input for cell i. CNENi+ (per cell) Serial count enable output for cell i. Qi (per cell) Counter output for cell i. able 8- is a VHDL program corresponding to the bit-cell in the figure. In the program, the D flip-flop component Vdffqqn is assumed to be already defined; it is similar to the D flip-flop in able 8- with the addition of a QN (complemented) output. In an FPGA or ASIC design, a flip-flop component type would be chosen from the manufacturer s standard cell library. able 8- VHDL program for counter cell of Figure 8-. library IEEE; use IEEE.std_logic_.all; entity syncsercell is port(, NO, NOOR, CN, D, CNEN: in SD_LOGIC; CNENO, Q: out SD_LOGIC ); end syncsercell; architecture syncsercell_arch of syncsercell is component Vdffqqn port(, D: in SD_LOGIC; Q, QN: out SD_LOGIC ); end component; signal A, CDA, DIN, Q_L: SD_LOGIC; begin A <= NO and D; CDA <= NOOR and ((CN and CNEN) xor not Q_L); DIN <= A or CDA; CNENO <= (not Q_L) and CNEN; U: Vdffqqn port map (, DIN, Q, Q_L); end syncsercell_arch;

19 Section 8. Counters A MAER Note that able 8- uses a combination of dataflow and structural VHDL styles. It OF SYLE could have been written completely structurally, for example using an ASIC manufacturer s gate component definitions, to guarantee that the synthesized circuit conforms exactly to Figure 8-. However, most synthesis engines can do a good job of picking the best gate realization for the simple signal assignments used here. able 8- shows how to create an 8-bit synchronous serial counter using the cell defined previously. he first two assignments in the architecture body synthesize the common NO and and NOOR signals. he next two statements handle boundary condition for the serial count-enable chain. Finally, the generate statement (introduced on page ) instantiates eight -bit counter cells and hooks up the count-enable chain as required. It should be clear that a larger or smaller counter can be created simply by changing a few definitions in the program. You can put VHDL s generic statement to good use here to allow you to change the counter s size with a one-line change (see Exercise 8.). able 8- VHDL program for an 8-bit x-like synchronous serial counter. library IEEE; use IEEE.std_logic_.all; entity Vxs is port(, _L, _L,, : in SD_LOGIC; D: in SD_LOGIC_VECOR ( downto 0); Q: out SD_LOGIC_VECOR ( downto 0); : out SD_LOGIC ); end Vxs; architecture Vxs_arch of Vxs is component syncsercell port(, NO, NOOR, CN, D, CNEN: in SD_LOGIC; CNENO, Q: out SD_LOGIC ); end component; signal NO, NOOR: SD_LOGIC; -- common signals signal SCNEN: SD_LOGIC_VECOR (8 downto 0); -- serial count-enable inputs begin NO <= (not _L) and _L; -- create common load and clear controls NOOR <= _L and _L; SCNEN(0) <= ; -- serial count-enable into the first stage <= SCNEN(8); -- is equivalent to final count-enable output g: for i in 0 to generate -- generate the eight syncsercell stages U: syncsercell port map (, NO, NOOR,, D(i), SCNEN(i), SCNEN(i+), Q(i)); end generate; end Vxs_arch;

Module 3: Floyd, Digital Fundamental

Module 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 information

ETEC 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 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 information

Counters & Shift Registers Chapter 8 of R.P Jain

Counters & 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 information

Modeling 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. 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 information

DIGITAL ELECTRONICS. Counters. By: Electrical Engineering Department

DIGITAL 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 information

WEEK 8.1 Registers and Counters. ECE124 Digital Circuits and Systems Page 1

WEEK 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 information

Contents COUNTER. Unit III- Counters

Contents 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 information

Asynchronous counters, except for the first block, work independently from a system clock.

Asynchronous 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 information

Experiment # 9. Clock generator circuits & Counters. Eng. Waleed Y. Mousa

Experiment # 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 information

DIGITAL 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. 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 information

Registers & Counters

Registers & 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 information

Counters are sequential circuits which "count" through a specific state sequence.

Counters are sequential circuits which count through a specific state sequence. Counters Counters are sequential circuits which "count" through a specific state sequence. They can count up, count down, or count through other fixed sequences. Two distinct types are in common usage:

More information

Digital Logic Design. Basics Combinational Circuits Sequential Circuits. Pu-Jen Cheng

Digital 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 information

Digital Logic Design Sequential circuits

Digital 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 information

Counters and Decoders

Counters 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 information

Flip-Flops, Registers, Counters, and a Simple Processor

Flip-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 information

Modeling Latches and Flip-flops

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 information

Sistemas Digitais I LESI - 2º ano

Sistemas Digitais I LESI - 2º ano Sistemas Digitais I LESI - 2º ano Lesson 6 - Combinational Design Practices Prof. João Miguel Fernandes (miguel@di.uminho.pt) Dept. Informática UNIVERSIDADE DO MINHO ESCOLA DE ENGENHARIA - PLDs (1) - The

More information

State Machines in VHDL

State 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 information

Sequential Logic Design Principles.Latches and Flip-Flops

Sequential 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 information

Counters. Present State Next State A B A B 0 0 0 1 0 1 1 0 1 0 1 1 1 1 0 0

Counters. 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 information

Latches, the D Flip-Flop & Counter Design. ECE 152A Winter 2012

Latches, 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 information

Digital Electronics Detailed Outline

Digital 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 information

A New Paradigm for Synchronous State Machine Design in Verilog

A 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 information

Asynchronous Counters. Asynchronous Counters

Asynchronous 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 information

Chapter 7. Registers & Register Transfers. J.J. Shann. J. J. Shann

Chapter 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 information

BINARY CODED DECIMAL: B.C.D.

BINARY 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 information

Memory Elements. Combinational logic cannot remember

Memory 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 information

CHAPTER IX REGISTER BLOCKS COUNTERS, SHIFT, AND ROTATE REGISTERS

CHAPTER 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 information

Design Example: Counters. Design Example: Counters. 3-Bit Binary Counter. 3-Bit Binary Counter. Other useful counters:

Design 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 information

Flip-Flops and Sequential Circuit Design. ECE 152A Winter 2012

Flip-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 information

Flip-Flops and Sequential Circuit Design

Flip-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 information

Take-Home Exercise. z y x. Erik Jonsson School of Engineering and Computer Science. The University of Texas at Dallas

Take-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 information

CHAPTER 3 Boolean Algebra and Digital Logic

CHAPTER 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 information

DEPARTMENT OF INFORMATION TECHNLOGY

DEPARTMENT OF INFORMATION TECHNLOGY DRONACHARYA GROUP OF INSTITUTIONS, GREATER NOIDA Affiliated to Mahamaya Technical University, Noida Approved by AICTE DEPARTMENT OF INFORMATION TECHNLOGY Lab Manual for Computer Organization Lab ECS-453

More information

ECE 3401 Lecture 7. Concurrent Statements & Sequential Statements (Process)

ECE 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 information

DIGITAL COUNTERS. Q B Q A = 00 initially. Q B Q A = 01 after the first clock pulse.

DIGITAL 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 information

Chapter 9 Latches, Flip-Flops, and Timers

Chapter 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 information

Upon completion of unit 1.1, students will be able to

Upon 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 information

CDA 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 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 information

Design: a mod-8 Counter

Design: a mod-8 Counter Design: a mod-8 Counter A mod-8 counter stores a integer value, and increments that value (say) on each clock tick, and wraps around to 0 if the previous stored value was 7. So, the stored value follows

More information

Chapter 4 Register Transfer and Microoperations. Section 4.1 Register Transfer Language

Chapter 4 Register Transfer and Microoperations. Section 4.1 Register Transfer Language Chapter 4 Register Transfer and Microoperations Section 4.1 Register Transfer Language Digital systems are composed of modules that are constructed from digital components, such as registers, decoders,

More information

6-BIT UNIVERSAL UP/DOWN COUNTER

6-BIT UNIVERSAL UP/DOWN COUNTER 6-BIT UNIVERSAL UP/DOWN COUNTER FEATURES DESCRIPTION 550MHz count frequency Extended 100E VEE range of 4.2V to 5.5V Look-ahead-carry input and output Fully synchronous up and down counting Asynchronous

More information

Lecture 8: Synchronous Digital Systems

Lecture 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 information

Lesson 12 Sequential Circuits: Flip-Flops

Lesson 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 information

Having read this workbook you should be able to: recognise the arrangement of NAND gates used to form an S-R flip-flop.

Having 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 information

PROGETTO DI SISTEMI ELETTRONICI DIGITALI. Digital Systems Design. Digital Circuits Advanced Topics

PROGETTO DI SISTEMI ELETTRONICI DIGITALI. Digital Systems Design. Digital Circuits Advanced Topics PROGETTO DI SISTEMI ELETTRONICI DIGITALI Digital Systems Design Digital Circuits Advanced Topics 1 Sequential circuit and metastability 2 Sequential circuit - FSM A Sequential circuit contains: Storage

More information

Digital Fundamentals. Lab 8 Asynchronous Counter Applications

Digital 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 information

3.Basic Gate Combinations

3.Basic Gate Combinations 3.Basic Gate Combinations 3.1 TTL NAND Gate In logic circuits transistors play the role of switches. For those in the TTL gate the conducting state (on) occurs when the baseemmiter signal is high, and

More information

DATA SHEET. HEF40193B MSI 4-bit up/down binary counter. For a complete data sheet, please also download: INTEGRATED CIRCUITS

DATA SHEET. HEF40193B MSI 4-bit up/down binary counter. For a complete data sheet, please also download: INTEGRATED CIRCUITS INTEGRATED CIRCUITS DATA SHEET For a complete data sheet, please also download: The IC04 LOCMOS HE4000B Logic Family Specifications HEF, HEC The IC04 LOCMOS HE4000B Logic Package Outlines/Information HEF,

More information

To design digital counter circuits using JK-Flip-Flop. To implement counter using 74LS193 IC.

To 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 information

NOTE: The Flatpak version has the same pinouts (Connection Diagram) as the Dual In-Line Package.

NOTE: The Flatpak version has the same pinouts (Connection Diagram) as the Dual In-Line Package. PRESETTABLE BCD/DECADE UP/DOWN COUNTERS PRESETTABLE 4-BIT BINARY UP/DOWN COUNTERS The SN54/74LS90 is a synchronous UP/DOWN BCD Decade (842) Counter and the SN54/74LS9 is a synchronous UP/DOWN Modulo-6

More information

CSE140 Homework #7 - Solution

CSE140 Homework #7 - Solution CSE140 Spring2013 CSE140 Homework #7 - Solution You must SHOW ALL STEPS for obtaining the solution. Reporting the correct answer, without showing the work performed at each step will result in getting

More information

7. Latches and Flip-Flops

7. 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 information

Chapter 8. Sequential Circuits for Registers and Counters

Chapter 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 information

LAB #4 Sequential Logic, Latches, Flip-Flops, Shift Registers, and Counters

LAB #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 information

Digital Design with VHDL

Digital 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 information

Finite State Machine Design and VHDL Coding Techniques

Finite 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 information

ECE232: Hardware Organization and Design. Part 3: Verilog Tutorial. http://www.ecs.umass.edu/ece/ece232/ Basic Verilog

ECE232: Hardware Organization and Design. Part 3: Verilog Tutorial. http://www.ecs.umass.edu/ece/ece232/ Basic Verilog ECE232: Hardware Organization and Design Part 3: Verilog Tutorial http://www.ecs.umass.edu/ece/ece232/ Basic Verilog module ();

More information

Digital 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 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 information

Modeling Registers and Counters

Modeling 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 information

Operating Manual Ver.1.1

Operating Manual Ver.1.1 4 Bit Binary Ripple Counter (Up-Down Counter) Operating Manual Ver.1.1 An ISO 9001 : 2000 company 94-101, Electronic Complex Pardesipura, Indore- 452010, India Tel : 91-731- 2570301/02, 4211100 Fax: 91-731-

More information

The components. E3: Digital electronics. Goals:

The 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 information

(Refer Slide Time: 00:01:16 min)

(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 information

VHDL GUIDELINES FOR SYNTHESIS

VHDL GUIDELINES FOR SYNTHESIS VHDL GUIDELINES FOR SYNTHESIS Claudio Talarico For internal use only 1/19 BASICS VHDL VHDL (Very high speed integrated circuit Hardware Description Language) is a hardware description language that allows

More information

Introduction to CMOS VLSI Design (E158) Lecture 8: Clocking of VLSI Systems

Introduction to CMOS VLSI Design (E158) Lecture 8: Clocking of VLSI Systems Harris Introduction to CMOS VLSI Design (E158) Lecture 8: Clocking of VLSI Systems David Harris Harvey Mudd College David_Harris@hmc.edu Based on EE271 developed by Mark Horowitz, Stanford University MAH

More information

150127-Microprocessor & Assembly Language

150127-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 information

Lecture 7: Clocking of VLSI Systems

Lecture 7: Clocking of VLSI Systems Lecture 7: Clocking of VLSI Systems MAH, AEN EE271 Lecture 7 1 Overview Reading Wolf 5.3 Two-Phase Clocking (good description) W&E 5.5.1, 5.5.2, 5.5.3, 5.5.4, 5.5.9, 5.5.10 - Clocking Note: The analysis

More information

VHDL Test Bench Tutorial

VHDL Test Bench Tutorial University of Pennsylvania Department of Electrical and Systems Engineering ESE171 - Digital Design Laboratory VHDL Test Bench Tutorial Purpose The goal of this tutorial is to demonstrate how to automate

More information

Theory of Logic Circuits. Laboratory manual. Exercise 3

Theory 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 information

COMBINATIONAL and SEQUENTIAL LOGIC CIRCUITS Hardware implementation and software design

COMBINATIONAL 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 information

Digital Electronics Part I Combinational and Sequential Logic. Dr. I. J. Wassell

Digital Electronics Part I Combinational and Sequential Logic. Dr. I. J. Wassell Digital Electronics Part I Combinational and Sequential Logic Dr. I. J. Wassell Introduction Aims To familiarise students with Combinational logic circuits Sequential logic circuits How digital logic gates

More information

INTEGRATED CIRCUITS. For a complete data sheet, please also download:

INTEGRATED CIRCUITS. For a complete data sheet, please also download: INTEGRATED CIRCUITS DATA SEET For a complete data sheet, please also download: The IC6 74C/CT/CU/CMOS ogic Family Specifications The IC6 74C/CT/CU/CMOS ogic Package Information The IC6 74C/CT/CU/CMOS ogic

More information

CHAPTER 11 LATCHES AND FLIP-FLOPS

CHAPTER 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 information

APPLICATION NOTE. Efficient Shift Registers, LFSR Counters, and Long Pseudo- Random Sequence Generators. Introduction.

APPLICATION NOTE. Efficient Shift Registers, LFSR Counters, and Long Pseudo- Random Sequence Generators. Introduction. PPLICTION NOTE Efficient Shift Registers, LFSR Counters, and Long Pseudo- Random Sequence Generators XPP 052 July 7,1996 (Version 1.1) pplication Note by Peter lfke Summary Shift registers longer than

More information

Lecture-3 MEMORY: Development of Memory:

Lecture-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 information

LAB #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 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 information

Systems I: Computer Organization and Architecture

Systems I: Computer Organization and Architecture Systems I: omputer Organization and Architecture Lecture 8: Registers and ounters Registers A register is a group of flip-flops. Each flip-flop stores one bit of data; n flip-flops are required to store

More information

Decimal Number (base 10) Binary Number (base 2)

Decimal 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 information

Sequential Logic. (Materials taken from: Principles of Computer Hardware by Alan Clements )

Sequential 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 information

Fig1-1 2-bit asynchronous counter

Fig1-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 information

74F168*, 74F169 4-bit up/down binary synchronous counter

74F168*, 74F169 4-bit up/down binary synchronous counter INTEGRATED CIRCUITS 74F168*, * Discontinued part. Please see the Discontinued Product List in Section 1, page 21. 1996 Jan 5 IC15 Data Handbook FEATURES Synchronous counting and loading Up/Down counting

More information

CONTENTS PREFACE 1 INTRODUCTION 1 2 NUMBER SYSTEMS AND CODES 25. vii

CONTENTS PREFACE 1 INTRODUCTION 1 2 NUMBER SYSTEMS AND CODES 25. vii 2006 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is CONTENTS PREFACE xv 1 INTRODUCTION 1 1.1 About Digital Design 1 1.2 Analog versus Digital 3 1.3 Digital Devices

More information

A Verilog HDL Test Bench Primer Application Note

A 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 information

Figure 8-1 Four Possible Results of Adding Two Bits

Figure 8-1 Four Possible Results of Adding Two Bits CHPTER EIGHT Combinational Logic pplications Thus far, our discussion has focused on the theoretical design issues of computer systems. We have not yet addressed any of the actual hardware you might find

More information

Binary Adders: Half Adders and Full Adders

Binary Adders: Half Adders and Full Adders Binary Adders: Half Adders and Full Adders In this set of slides, we present the two basic types of adders: 1. Half adders, and 2. Full adders. Each type of adder functions to add two binary bits. In order

More information

PROGETTO DI SISTEMI ELETTRONICI DIGITALI. Digital Systems Design. Digital Circuits Advanced Topics

PROGETTO DI SISTEMI ELETTRONICI DIGITALI. Digital Systems Design. Digital Circuits Advanced Topics PROGETTO DI SISTEMI ELETTRONICI DIGITALI Digital Systems Design Digital Circuits Advanced Topics 1 Sequential circuit and metastability 2 Sequential circuit A Sequential circuit contains: Storage elements:

More information

Step : Create Dependency Graph for Data Path Step b: 8-way Addition? So, the data operations are: 8 multiplications one 8-way addition Balanced binary

Step : Create Dependency Graph for Data Path Step b: 8-way Addition? So, the data operations are: 8 multiplications one 8-way addition Balanced binary RTL Design RTL Overview Gate-level design is now rare! design automation is necessary to manage the complexity of modern circuits only library designers use gates automated RTL synthesis is now almost

More information

Timing Methodologies (cont d) Registers. Typical timing specifications. Synchronous System Model. Short Paths. System Clock Frequency

Timing Methodologies (cont d) Registers. Typical timing specifications. Synchronous System Model. Short Paths. System Clock Frequency Registers Timing Methodologies (cont d) Sample data using clock Hold data between clock cycles Computation (and delay) occurs between registers efinition of terms setup time: minimum time before the clocking

More information

1.1 The 7493 consists of 4 flip-flops with J-K inputs unconnected. In a TTL chip, unconnected inputs

1.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 information

Systems I: Computer Organization and Architecture

Systems I: Computer Organization and Architecture Systems I: Computer Organization and Architecture Lecture 9 - Register Transfer and Microoperations Microoperations Digital systems are modular in nature, with modules containing registers, decoders, arithmetic

More information

List of Experiment. 8. To study and verify the BCD to Seven Segments DECODER.(IC-7447).

List of Experiment. 8. To study and verify the BCD to Seven Segments DECODER.(IC-7447). G. H. RAISONI COLLEGE OF ENGINEERING, NAGPUR Department of Electronics & Communication Engineering Branch:-4 th Semester[Electronics] Subject: - Digital Circuits List of Experiment Sr. Name Of Experiment

More information

Lab 1: Study of Gates & Flip-flops

Lab 1: Study of Gates & Flip-flops 1.1 Aim Lab 1: Study of Gates & Flip-flops To familiarize with circuit implementations using ICs and test the behavior of different logic gates and Flip-flops. 1.2 Hardware Requirement a. Equipments -

More information

Chapter 5. Sequential Logic

Chapter 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 information

CS311 Lecture: Sequential Circuits

CS311 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 information

SN54/74LS192 SN54/74LS193

SN54/74LS192 SN54/74LS193 PRESEABLE BCD/DECADE UP/DOWN COUNER PRESEABLE 4-BI BINARY UP/DOWN COUNER he SN4/74LS2 is an UP/DOWN BCD Decade (842) Counter and the SN4/74LS3 is an UP/DOWN MODULO-6 Binary Counter. Separate Count Up and

More information

Designing Digital Circuits a modern approach. Jonathan Turner

Designing 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 information

Multipliers. Introduction

Multipliers. Introduction Multipliers Introduction Multipliers play an important role in today s digital signal processing and various other applications. With advances in technology, many researchers have tried and are trying

More information

ASYNCHRONOUS COUNTERS

ASYNCHRONOUS 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 information