Anda di halaman 1dari 30

ECE261 CMOS VLSI Design Final Project Report

Duke University

Digital Clock
ECE 261 Final Project Report
Fangming Ye Bhawana Singh
December 3, 2009

Copyright reserved

Page 1 of 30

ECE261 CMOS VLSI Design Final Project Report

Table of content
1 Introduction ................................................................................................................................... 4 1.1 1.2 1.3 2 2.1 2.2 2.3 2.4 2.5 2.6 2.7 3 3.1 3.2 3.3 4 Project Function .................................................................................................................... 4 Performance Estimation ....................................................................................................... 6 System Power Consumption ................................................................................................ 7 D-flipflop ................................................................................................................................ 7 JK-flipflop .............................................................................................................................. 9 JK-flipflop with reset function .............................................................................................. 11 0-5 counter .......................................................................................................................... 13 0-9 counter .......................................................................................................................... 15 0-9 counter with reset function ........................................................................................... 18 4-7 segment decoder .......................................................................................................... 20 Logic implementation .......................................................................................................... 23 Layout ................................................................................................................................. 26 Simulation ........................................................................................................................... 27

Sub- circuit Design........................................................................................................................ 7

Full system design ...................................................................................................................... 23

References ............................................................................................................................. 3030

Page 2 of 30

ECE261 CMOS VLSI Design Final Project Report

List of Figures
Figure 1-1 system block diagram ......................................................................................................... 5 Figure 1-2 System Layout Floor Plan ................................................................................................... 6 Figure 2-1 schematic of D-flipflop ......................................................................................................... 8 Figure 2-2 layout of D-flipflop ............................................................................................................... 8 Figure 2-3 ELDO simulation of D-flipflop .............................................................................................. 9 Figure 2-4 schematic of JK-flipflop ..................................................................................................... 10 Figure 2-5 layout of JK-flipflop ............................................................................................................ 10 Figure 2-6 ELDO simulation of JK-flipflop .......................................................................................... 11 Figure 2-7 schematic of JK-flipflop with reset function ....................................................................... 12 Figure 2-8 layout of JK-flipflop with reset function.............................................................................. 12 Figure 2-9 ELDO simulation of JK-flipflop with reset function ............................................................ 13 Figure 2-10 schematic of 0-5 counter ................................................................................................. 14 Figure 2-11 layout of 0-5 counter ....................................................................................................... 14 Figure 2-12 ELDO simulation of 0-5 counter ...................................................................................... 15 Figure 2-13 schematic of 0-9 counter ................................................................................................. 16 Figure 2-14 layout of 0-9 counter ....................................................................................................... 17 Figure 2-15 ELDO simulation of 0-9 counter ...................................................................................... 18 Figure 2-16 schematic of 0-9 counter with reset function................................................................... 19 Figure 2-17 layout of 0-9 counter with reset function ......................................................................... 19 Figure 2-18 ELDO simulation of 0-9 counter with reset function ........................................................ 20 Figure 2-19numerical designation and display ................................................................................... 20 Figure 2-20 7 segment identification .................................................................................................. 20 Figure 2-21 schematic of 4-7 segment decoder ................................................................................. 22 Figure 2-22 layout of 4-7 segment decoder ....................................................................................... 22 Figure 2-23 ModelSIM simulation of 4-7 segment decoder ............................................................... 23 Figure 3-1 flow chart of full system ..................................................................................................... 24 Figure 3-2 top view schematic ............................................................................................................ 25 Figure 3-3 top view layout .................................................................................................................. 26 Figure 3-4 topview layout DRC clean ................................................................................................. 27 Figure 3-5 topview layout LVS clean .................................................................................................. 27 Figure 3-6 top view simulation (part I) ................................................................................................ 28 Figure 3-7 top view simulation (part II) ............................................................................................... 29 Figure 3-8 top view simulation (part III) .............................................................................................. 30

Page 3 of 30

ECE261 CMOS VLSI Design Final Project Report

Introduction

1.1 Project Function


In this project, we have built a digital clock with 12 hour count time. The clock runs from 00:00 to 11:59 and then back to 00:00. Our display has four digits, two digits for minutes and two for hour. The specialty of this clock is that it has very low power consumption and condensed layout. We have used a simple 0-9 counter for the units digit of minutes display and a 0-5 counter for the tens digit of minute. For the units digit of hour, a resettable 0-9 counter has been used, and for the tens digit of hour a resettable JK-flipflop has been used. Other than this, a few NAND gates and D-flipflops have been used to ensure proper functioning of the clock. There is only one input for the entire system: the clock input into the 0-9 counter used for the units digit of minute. The clock inputs for the other blocks are derived from the output of the previous blocks as shown in the block diagram for the system. We have a total of 12 outputs: 4 outputs for units digit of minute, 3 outputs for tens digit of minute, 4 outputs for units digit of hour and 1 output for the tens digit of hour. Besides, we have also designed a 4-7 segment decoder which can be used for the actual display of digits as we see on a real digital clock. We have kept the decoder separate from the top view of the schematic because it makes it difficult to view the output in binary form using the 4-7 segment display. However, if we do the actual hardware implementation, then we can use 4 such decoders, and connect the outputs of each of the four blocks (0-9 counter, 0-5 counter, resettable 0-9 counter and resettable JK-flipflop) to the inputs of the respective decoder and display time. The outputs of the decoders would be connected to LEDs and would make the LED glow for a high output and vice-versa for a low output. Every 10 minutes, we add one on the tens digit of minute. After every 6 such cycles, we add one on the units digit of hour, and every 10 hours, we add one on tens digit of hour. As soon as it reaches 1 on the tens digit of hour and 2 on units digit of hour, both the tens and the units digit of hour are reset to 0. So, in practice, we do not see 12:00 displayed. We rather see a transition from 11:59 to 00:00. The block diagram of the system is shown in Figure 1-1 and the layout floor plan has been shown in Figure 1-2.

Page 4 of 30

ECE261 CMOS VLSI Design Final Project Report

Figure 1-1 system block diagram

Page 5 of 30

ECE261 CMOS VLSI Design Final Project Report

Figure 1-2 System Layout Floor Plan

1.2 Performance Estimation


An estimate of the total number of transistors used in our sub-blocks and the whole system is shown in Table 1.

Blocks in Top view Inverter NAND2 D flipflop Resettable JK flipflop 0-5 Counter 0-9 Counter Resettable 0-9 Counter 4-7 Decoder

No. of transistors in sub-block 2 4 18 42 132 178 188 160

No. of sub-block needed in top-view 3 4 2 1 1 1 1 4

Area of sub-block (m2) 262.5 350 2450 6750 14700 19240 44000 15600

Table 1: Summary of transistor number and area

Page 6 of 30

ECE261 CMOS VLSI Design Final Project Report From this, we have calculated the total number of transistors and total area asTotal number of transistors: 1238 Total area: 195650 m2

1.3 System Power Consumption


Dynamic power consumption Frequency used for simulation: 1Hz Power consumption at 1Hz frequency: 11.3764 nW Actual clock frequency required: 1/60 Hz Scaled Power Consumption at 1/60 Hz: 0.1896 nW Static power consumption Usually static power consumption is one tenth of dynamic power consumption, Thus, Static power consumption: 0.02nW

Sub- circuit Design

2.1 D-flipflop
We use D-flipflops in the main digital block connection, in order to create a delay to match the time flow. While D-flipflop is a common block in design, we briefly introduce the function of D-flipflop. The Q output always takes on the state of the D input at the moment of a rising clock edge (or falling edge if the clock input is active low). It is called the D flip-flop for this reason, since the output takes the value of the D input or Data input, and Delays it by one clock count. The D flip-flop can be interpreted as a primitive memory cell, zero-order hold, or delay line. Whenever the clock pulses, the value of Qnext is D and Qprev otherwise.
Clock Rising edge Rising edge Non-Rising D 0 1 X Q 0 1 Qprev Qprev X X

Table 2 D-flipflop truth table

The schematic and layout of D-flipflop are shown in Figure 2-1 schematic of D-flipflop and Figure 2-2, in this design, we used 5 inverters and 4 transmission gates. The ELDO analog simulation result can be seen in Figure 2-3.

Page 7 of 30

ECE261 CMOS VLSI Design Final Project Report

Figure 2-1 schematic of D-flipflop[1]

Figure 2-2 layout of D-flipflop

Page 8 of 30

ECE261 CMOS V VLSI Design Final Proj n ject Report

Figure 2-3 ELDO simul 3 lation of D-flipflop

2.2 JK-flipf flop


In our design, J o JK-flipflop a JK-flipflop with rese function a the mos important basic and et are st t bloc used to create counters. We b cks briefly introd duce the imp plementatio of JK-flipflop, and on JK-f flipflop with reset funct tion in the next section. The JK flip-flop augments the behavior of the SR flip-flop (J e p R J=Set, K=Re eset) by inte erpreting the S = R = 1 c condition as a "flip" or t s toggle comm mand. Spec cifically, the combinatio J = 1, K on = 0 is a comma to set th flip-flop; the combin and he nation J = 0, K = 1 is a command t reset , to the flip-flop; an the comb nd bination J = K = 1 is a c command to toggle the flip-flop, i.e change o e e., its o output to the logical com e mplement o its current value. The flip-flop is negative-e of e edge trigg gered (fallin clock pulse) as seen in the timin diagram. The expre ng n ng ession of JK K-flipflop is shown below,

The schematic and layout of JK-flipflo are show in Figure 2-4 and Fi e c t op wn e igure 2-5, , in this design, we use 1 inverter, 6 NAND2 gates and 2NAND3 g ed 2 gates. The E ELDO analo og simulation resu can be se in Figure 2-6. <Re ult een eference use for schematic was ed http://www.play-hookey.com/ /digital/jk_na and_flip-flop.html>

Page 9 of 30

ECE261 CMOS VLSI Design Final Project Report

Figure 2-4 schematic of JK-flipflop

Figure 2-5 layout of JK-flipflop

Page 10 of 30

ECE261 CMOS VLSI Design Final Project Report

Figure 2-6 ELDO simulation of JK-flipflop

2.3 JK-flipflop with reset function


In the design of HOUR part of our digital clock, we use JK-flipflop with reset function, to reset the output to 0 when the time reaches 12, while we just use JK-flipflop without reset function in MINUTE part. The basic function of JK-flipflop with reset function is the same as JK-flipflop, except we add the clear function. But in order to implement this function, we designed another schematic. Reset input is independent from J and K and clock, so this is an asynchronous reset JK-flipflop. This JK-flipflop is substantially based on a D-flipflop, and in the input stage, we change the input for reset function. The schematic and layout of JK-flipflop with reset function are shown in Figure 2-4 and Figure 2-5, in this design, we used 7 inverter, 5 NAND2 gates and 4 transmission gates. After all, the ELDO analog simulation result can be seen in Figure 2-6.

Page 11 of 30

ECE261 CMOS VLSI Design Final Project Report

Figure 2-7 schematic of JK-flipflop with reset function

Figure 2-8 layout of JK-flipflop with reset function

Page 12 of 30

ECE261 CMOS VLSI Design Final Project Report

Figure 2-9 ELDO simulation of JK-flipflop with reset function

2.4 0-5 counter


Here, a 0-5 counter acts as a digital output for tens digit of minute. The basic idea of implementation of 0-5 counter is based on JK-flipflop to ripple the digits. Digits start from 000, when they reach 101(5 in decimal) and then return to 000. The truth table of 0-5 counter is shown below
OUTPUT C 0 0 0 0 1 1 B 0 0 1 1 0 0 A 0 1 0 1 0 1 0 1 2 3 4 5 COUNT

The schematic and layout of 0-5 counter are shown in Figure 2-10and Figure 2-11, in this design, we used 3 JK flipflops, 3 inverters, and 3 NAND2 gates. In layout, in order to fit the floor plan, we designed it not in a rectangular shape.

Page 13 of 30

ECE261 CMOS VLSI Design Final Project Report

Figure 2-10 schematic of 0-5 counter

Figure 2-11 layout of 0-5 counter

The ELDO analog simulation result can be seen in Figure 2-12. We can see that the counter starts from 000 to 101 and returns to 000.

Page 14 of 30

ECE261 CMOS VLSI Design Final Project Report

Figure 2-12 ELDO simulation of 0-5 counter

2.5 0-9 counter


0-9 counter is a larger version of 0-5 counter. Here, 0-9 counter acts as a digital output for units of minute. The basic idea of implementation of 0-9 counter is also based on JKflipflop to ripple the digits. Digits start from 0000, when they reach 1001(9 in decimal) and then return to 0000. The truth table of 0-9 counter is shown below < Reference used for schematic was http://www.play-hookey.com/digital/decimal_counter.html>
OUTPUT D 0 0 0 0 0 0 0 0 1 1 C 0 0 0 0 1 1 1 1 0 0 B 0 0 1 1 0 0 1 1 0 0 A 0 1 0 1 0 1 0 1 0 1 0 1 2 3 4 5 6 7 8 9 COUNT

Page 15 of 30

ECE261 CMOS VLSI Design Final Project Report


Table 3 0-9 counter truth table

The schematic and layout of 0-9counter are shown in Figure 2-13and Figure 2-14, in this design, we used 4 JK flipflops, 1 inverter, 3 NAND2 gates and 1 NAN3 gate.

Figure 2-13 schematic of 0-9 counter

Page 16 of 30

ECE261 CMOS VLSI Design Final Project Report

Figure 2-14 layout of 0-9 counter

ELDO analog simulation result can be seen in Figure 2-15. We can see that the counter starts from 0000 to 1001 and returns to 0000.

Page 17 of 30

ECE261 CMOS VLSI Design Final Project Report

Figure 2-15 ELDO simulation of 0-9 counter

2.6 0-9 counter with reset function


Implementation of 0-9 counter is also based on JK-flipflop with reset function to ripple the digits. Digits start from 0000, when they reach 1001(9 in decimal) and then return to 0000 normal. But it will be reset when input a reset signal, which is usually in the second round of counting and reset at 0010. The truth table of 0-9 counter with reset function is the same as the truth table of 0-9 counter. Here is a concern that the reset function is asynchrony, so we design the reset signal at the edge of 11-12, thus there is a transient spike during the process. But the delay time of this spike is in the order of nanosecond level, and this signal is trigger in HOUR level. So we can neglect this spike in the operation of our project. The schematic and layout of 0-9counter with reset function are shown in Figure 2-16Error!
Reference source not found.Figure 2-4 and Figure 2-17. In this design, we used 4 JK-

flipflops with reset function, 1 inverter, 3 NAND2 gates and 1 NAN3 gate.

Page 18 of 30

ECE261 CMOS VLSI Design Final Project Report

Figure 2-16 schematic of 0-9 counter with reset function

Figure 2-17 layout of 0-9 counter with reset function

ELDO analog simulation result can be seen in Figure 2-18. We can see that the counter starts from 0000 to 1001 and returns to 0000. We gave a reset signal during the operation, all digits are set to 0 immediately.

Page 19 of 30

ECE261 CMOS VLSI Design Final Project Report

Figure 2-18 ELDO simulation of 0-9 counter with reset function

2.7 4-7 segment decoder


Here, a 4-7 segment decoder is used for output binary digits of MUNITEs and HOURs in LEDs display. Normally, LEDs display has the function as follows, and we usually use the previous 10 output from 0 to 9.

Figure 2-19numerical designation and display

Figure 2-20 7 segment identification

To implement this function, we generate the truth table for a 4-7 segment decoder as below and get its corresponding 7 segment output and annotate them in decimal.

Page 20 of 30

ECE261 CMOS VLSI Design Final Project Report

DECIMAL OR FUNCTION 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 BI

INPUTS D L L L L L L L L H H H H H H H H X C L L L L H H H H L L L L H H H H X B L L H H L L H H L L H H L L H H X A L H L H L H L H L H L H L H L H X ~BI H H H H H H H H H H H H H H H H L 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 X a H L H H L H L H H H L L L H L L L b H H H H H L L H H H L L H L L L L c H H L H H H H H H H L H L L L L L

OUTPUTS d H L H H L L H L H L H H L H H L L e H L H L L H H L H L H L L L H L L f H L H L H H H L H H L L H H H L L g L L H H H H H L H H H H H H H L L 63 6 91 79 102 109 124 7 127 103 88 76 98 105 120 0 0

Table 4 4-7 segment decoder truth table

The schematic and layout of a 4-7 segment decoder are shown in Figure 2-20Error! Reference source not found.Figure 2-4 and Figure 2-22. In this design, we used 12 inverters, 14 NAND2 gates, 13 NAN3 gates and 1 NAND4 gate.

Page 21 of 30

ECE261 CMOS VLSI Design Final Project Report

Figure 2-21 schematic of 4-7 segment decoder

Figure 2-22 layout of 4-7 segment decoder

ModelSIM digital simulation result can be seen in Figure 2-23. We can see that the different input from 0000 to 1111 correspond to different output according to the truth table in Table 1, thus verifying our design.

Page 22 of 30

ECE261 CMOS VLSI Design Final Project Report

Figure 2-23 ModelSIM simulation of 4-7 segment decoder

Full system design

3.1 Logic implementation


The input to the system is the clock input into the 0-9 counter used for the units digit of minute. Every 10 minutes, one is added to the tens digit of minute. After every 6 such cycles, i.e. every 60 minutes, one is added to the units digit of hour, and every 10 hours, one is added to the tens digit of hour. As soon as it reaches 1 on the tens digit of hour and 2 on units digit of hour, both the tens and the units digit of hour are reset to 0. The flowchart for this is shown below.

Page 23 of 30

ECE261 CMOS VLSI Design Final Project Report

Figure 3-1 flow chart of full system

We implemented the function shown in Figure 3-1, and include all the sub-blocks we set up before, draw the top view schematic as below, and then top view layout Figure 3-3.

Page 24 of 30

ECE261 CMOS VLSI Design Final Project Report

Figure 3-2 top view schematic

Page 25 of 30

ECE261 CMOS VLSI Design Final Project Report

3.2 Layout

Figure 3-3 top view layout

Here is our DRC and LVS check result

Page 26 of 30

ECE261 CMOS VLSI Design Final Project Report

Figure 3-4 topview layout DRC clean

Figure 3-5 topview layout LVS clean

3.3 Simulation
In the top view simulation, we can simultaneously look at all the 12 outputs. These have been shown in the three following figures. In the first figure, we can see all the four bits of

Page 27 of 30

ECE261 CMOS VLSI Design Final Project Report the unit digit of minute, and two of the three bits of tens digit of minute. If we look at MU1, MU2, MU3 and MU4, counting starts from 0, goes up till 9, and then again goes back to 0 and so on. At every transition from 9 to 0, a clock pulse is sent to the tens digit of minute, i.e., to the 0-5 counter. So, as soon as MU4 transitions from high to low, we can see a transition in MT1 as well. MT1, MT2 and MT3 form the three bits of the tens digit of minute. These start counting from 0, go up till 5, and then again go back to zero. This counting from o to 5 and back to zero can be clearly seen in the second figure.

Figure 3-6 top view simulation (part I)

In this figure, we can clearly see the tens digit of minute and the transition on the unit digit of hour after sixty minutes elapse. As long as both MT3 and MT1 are high, the time that is displayed on the minute part of the clock varies from 50 to 59. After this, all the bits in the minute display become zero, and a clock pulse is sent to the 0-9 counter which is used for the unit digit of hour. So, every time MT3 transitions from high to low, there is a transition in HU1.

Page 28 of 30

ECE261 CMOS VLSI Design Final Project Report

Figure 3-7 top view simulation (part II)

In this figure, we can see the both the unit and the tens digit of hour. HU1, HU2, HU3 and HU4 together make up the unit digit of hour, and HT1 is for the tens digit. HU1, HU2, HU3 and HU4 count from 0 to 9 and then go back to 0 again. As soon as the transition from 9 to 0 takes place, a clock pulse is sent to the resettable JK-flipflop used for the tens digit display of hour. This stays high for one complete clock period on HU1, and then all the bits in HOUR display become zero (except for a spike in HU2 which is too short to be noticed in practice). A high pulse on HT1 and a simultaneous low and then high on HU1, while HU2 and HU3 stay low, implies display 10 and 11 on the hour digits. After 11, the hour display shows 00 since all of the bits, HU1, HU2, HU3 and HU4 become 0. For as long as there is a zero on HU1 or a 1 on HU1, the minutes digit would count from 00 to 59. Thus, overall the clock would display from00:00 to 11:59 and back to 00:00.

Page 29 of 30

ECE261 CMOS VLSI Design Final Project Report

Figure 3-8 top view simulation (part III)

4
[1] [2] [3]

References
N. H. E. Weste and D. Harris, CMOS VLSI design : a circuits and systems perspective: Boston : Pearson/Addison-Wesley, c2005. TI, system on chip: sn74ls47, BCD-TO-SEVEN-SEGMENT DECODERS/DRIVERS,1998 ST, system on chip: M74HC107, DUAL J-K FLIP FLOP WITH CLEAR,2000

Page 30 of 30

Anda mungkin juga menyukai