Design and implementatio implementation n of Digital Code Lock using VHDL VHDL INTRODUCTION
The circuit described here is of an electronic combination lock for daily use. It responds only to the right sequences of four digits that are keyed in remotely. If a wrong key is touched, it resets the lock. The lock code can be set by connecting the line wires to the input bits. For example, if the code is 1756, connect line 1 to 1 st bit, line 7 to 2nd bit, line 5 to 3rd bit, line 6 to 4 th bit and rest of the lines—0,2, 3, 4, 8, and 9—to the next 6 bits, making 10 input lines to the lock, where authorized user only knows that pin is just 4 bits.
The circuit is built around four d flip-flop’s. The clock pins of the four flip-flops are connected to the 4bits which is the password or key of the lock. The correct code sequence for energisation of D Flipflops is realised by clocking points of 4bits of password in that order. The six remaining inputs are connected to reset circuit which resets all the flip-flops. Touching the key pad switches correctly (i.e..the correct password) briefly pulls the clock input pin high and the state of flip-flop is altered. Thus, if correct clocking sequence is followed then high output occurs which unlocks the system.
APPLICATIONS
This circuit can be usefully employed in cars so that the car can start only when the correct code sequence is keyed in via the key pad. The circuit can also be used in various other applications.
BLOCK DIAGRAM OF THE PROJECT
WORKING
In the block diagram we can see that, the bits of the password or connected to the flip flops. When the bits are pressed it sends an active high signal to the respective flip flop. With the rising clock edge the output of the flip flop is equal to the input, hence output of all the flip flops flops is high and they are ANDED so as as to give a high signal.
The flip flops are set so that the output initially is zero (q=0), and hence the output of negation is one (~q=1).
Consider that the password of the circuit is 1234. These particular switches are are connected as the inputs of the D flip flops respectively. On pressing the above switches in sequence will lead to a high output, else the output is low.
Let as assume that a person who is trying to break the lock presses 4321. In this case the output of the fourth flip flop is high since fourth switch is connected to the corresponding fourth flip flop. The output of this D flip flop is ANDED with negated output of third flip flop which is high due to default settings. Hence the output of AND gate is high which leads to a high output at the OR gate and this signal is given as feed back which resets all the flip flops.
Hence the above above circuit works works only for one password. password.
One major advantage of the above circuit is that it provides high security by misguiding a person who is trying to hack the lock by the number of input bits to be entered. Here a person who knows the password will only enter the code, that is he will press only four bits of code and will have access. But a person who is
trying to break the lock will never know that the numbers of bits in the password are 4, because the numbers of inputs to be entered are 10.
The circuit will only work when 4 bits of the password are pressed, but when more than 4 bits are pressed, it will cause the output of the OR gate to be high and this high signal is given to the flip flops in the feed back and will reset them.
So there is high probability that the hacker will always enter more than 4 bits (since he doesn’t know that there are 4 flip flops corresponding to 4 bits of code) and every time the circuit is reset.
The password of the circuit can be changed by connecting the required switches of the new password to the respective flip flops as desired. Apart from numbers, letter and alphanumeric characters can also be used to set the password.
TRUTH TABLE
Pin 5
Pin 6
Pin 7
Pin 8
Pin 9
Pin 0
OUT_O6
1
X
X
X
X
X
1
X
1
X
X
X
X
1
X
X
1
X
X
X
1
X
X
X
1
X
X
1
X
X
X
X
1
X
1
X
X
X
X
X
1
1
0
0
0
0
0
0
0 REQUIRED
We have set the Password as “1234” to our circuit and realized the circuit with the respective Truth tables as follows.
Table for OR6
Table for FILP-FLOPS
D1
D2
D3
D4
Q1
QBAR1
Q2
QBAR 2
Q3
QBA R3
Q4
Q B A R 4
1
2
3
4
1
0
1
0
1
0
1
0
1
2
X
X
1
0
1
0
0
1
0
1
1
X
X
X
1
0
0
1
0
1
0
1
2
X
X
X
0
1
1
0
0
1
0
1
3
X
X
X
0
1
0
1
1
0
0
1
4
X
X
X
0
1
0
1
0
1
1
0
Table For AND4
D_Q1
D_Q2
D_Q3
D_Q4
OUT_A4
1
1
1
1
1
1
1
X
X
1N RESET FF
1
X
X
X
1N RESET FF
Table For AND1
Table For AND2
D_Q2
D_QBAR1
A1
D_Q3
D_QBAR2
A2
0
0
0
0
0
0
0
0
0 1
1
0 1
0
1
0
0 1
1
1
0 1
1
1
Table For AND3
D_Q4
D_QBAR3
A3
0
0
0
0
0 1
1
0 0
1
1
1
Table for main output
A1
A2
A3
O3=A1+A2+ A3
O6
O8= 03+0 6
OUT OF 08
1
X
X
1
X
1
RESET ALL FF
X
1
X
1
X
1
RESET ALL FF
X
X
1
1
X
1
RESET ALL FF
CHAPTER 3 INTRODUCTION OF VLSI
Very Very-l -larg argee-sc scal ale e inte integr grat atio ion n (VLS (VLSI) I) is the the proc proces ess s of crea creati ting ng inte integr grat ated ed circ circui uits ts by comb combin inin ing g thou thousa sand nds s of transistor-based circuits into a single chip. VLSI began in the 1970s 1970s when when comple complex x semico semiconduc nductor tor and commun communica icatio tion n technologies were being developed. The microprocessor is a VLSI device. The term is no longer as common as it once was, as, as chips have incre ncrea ased in complexity into nto the hundreds of millions of transistors. Overview
The first semiconductor chips held one transistor each. Subse Subsequ quen entt advan advance ces s adde added d more more and and more more trans transis isto tors rs,, and, as a consequence, more individual functions or systems were integrated over time. The first integrated circuits held onl only a few devices, perhap haps as many any as ten diodes, transistors, resistors and capacitors, making it possible to fabricate one or more logic gates on a single device. Now
known known retros retrospe pect ctiv ivel ely y as "sma "small ll-sc -scale ale inte integr grat atio ion" n" (SSI (SSI), ), improvements in technique led to devices with hundreds of logi logic c gate gates, s, know known n as larg largee-sc scal ale e inte integr grat atio ion n (LSI (LSI), ), i.e. i.e. syst syste ems with ith at leas leastt a thous housa and logi logic c gates ates.. Curr Curre ent tech techno nolo logy gy has has move oved far far past ast this his mar ark k and and today oday's 's microprocessors have many millions of gates and hundreds of millions of individual transistors. At one one time time,, ther there e was was an effo effort rt to name name and and calibrate various levels of large-scale integration above VLSI. Terms like Ultra-large-scale Integration (ULSI) were used. But the the huge huge numb number er of gate gates s and and tran transi sist stor ors s avai availa labl ble e on common devices has rendered such fine distinctions moot. Terms suggesting greater than VLSI levels of integration are no longer longer in widesp widespread read use. Even VLSI VLSI is now somewhat somewhat quaint,
given
the
common
assumption
that
all
microprocessors are VLSI or better. As of early 2008, billion-transistor processors are comm commer erci cial ally ly avai availa labl ble, e, an exam exampl ple e of whic which h is Inte Intel' l's s Montecito Itanium chip. This is expected to become more commonplace as semiconductor fabrication moves from the current generation of 65 nm processes to the next 45 nm gene generat ratio ions ns (whi (while le expe experi rien enci cing ng new new chal challe leng nges es such such as increased variation across process corners). Another notable example is NVIDIA’s 280 series GPU. This microprocessor is unique in the fact that its 1.4 Billion trans ansistor count unt, capable of a terafl aflop of
performance, is almost entirely dedicated to logic (Itanium's tra transis nsisto torr coun countt is larg large ely due due to the 24MB 24MB L3 cach cache) e).. Curre Current nt desi design gns, s, as oppo oppose sed d to the the ea earl rlie iest st devi device ces, s, use use extensive extensive design design automation automation and automated automated logic synthesis synthesis to
lay
out the tra rans nsiistors, rs,
enab nabling
hig higher her
levels
of
complexity in the resulting logic functionality. Certain highperformance logic blocks like the SRAM cell, however, are stil stilll desi design gned ed by hand hand to ensu ensure re the the high highes estt effi effici cien ency cy (sometimes by bending or breaking established design rules to obtain the last bit of performance by trading stability). What is VLSI? VLSI stands for "Very Large Scale Integration". This is the field which
involves packing more and more logic devices into
smaller and smaller areas. VLSI Simply we say Integrated circuit is many transistors on one chip. Design/manufacturing of extremely small, complex circuitry using modified semiconductor material Integrated circuit (IC) may contain millions of transistors, each a few mm in size Applications wide ranging: most electronic logic devices History of Scale Integration
late 40s Transistor invented at Bell Labs
late 50s First IC (JK-FF by Jack Kilby at TI)
early 60s Small Scale Integration (SSI)
10s of transistors on a chip late 60s Medium Scale Integration (MSI)
100s of transistors on a chip early 70s Large Scale Integration (LSI)
1000s of transistor on a chip early 80s VLSI 10,000s of transistors on a
chip (later 100,000s & now 1,000,000s) Ultra LSI is sometimes used for 1,000,000s
SSI - Small-Scale Integration (0-102)
MSI - Medium-Scale Integration (102103)
LSI - Large-Scale Integration (103105)
VLSI - Very Large-Scale Integration (105-107)
ULSI - Ultra Large-Scale Integration (>=107)
Advantages of ICs over discrete components
Whi While we will conc oncentr entra ate on inte integ gra rate ted d circuits , the properties of integrated circuits-what we can and cannot cannot effici efficient ently ly put in an integr integrate ated d circui circuit-l t-large argely ly determine the architecture of the entire system. Integrated circuit circuits s improv improve e system system charact characteri eristi stics cs in several several critic critical al ways. ICs have three key advantages over digital circuits built from discrete components:
Size. Integr Integrate ated d circui circuits ts are much much smalle smaller-b r-both oth trans transis isto tors rs and wire wires s are shrun shrunk k to micr microm omet eter er sizes, sizes, compare compared d to the millim millimete eterr or centim centimete eterr scales of discrete components. Small size leads to adva advant ntag ages es in spee speed d and and powe powerr cons consum umpt ptio ion, n, since smaller components have smaller parasitic resistances, capacitances, and inductances.
Speed. Signals can be switched between logic 0 and logic 1 much quicker within a chip than they can between chips. Communication within a chip can
occur
hundreds
of
times
faster
than
communication between chips on a printed circuit board. The high speed of circuits on-chip is due to thei theirr smal smalll size size-sm -smal alle lerr comp compone onent nts s and wire wires s have smaller parasitic capacitances to slow down the signal.
Power consumption. Logic operations within a chip also also take take much much less less powe power. r. Once Once agai again, n, lowe lowerr power consumption is largely due to the small size of
circuits
on
the
chip-smaller
parasitic
capacitances and resistances require less power to drive them. VLSI and systems
T The hese se adva advant ntag ages es of inte integr grat ated ed circ circui uits ts tran transl slat ate e into into advantages at the system level:
Smal Smalle lerr phys physic ical al size size.. Small Smallne ness ss is ofte often n an advantage in itself-consider portable televisions or handheld cellular telephones.
Lower power consumption. Replacing a handful of stan standa dard rd part parts s with with a sing single le chip chip re redu duce ces s total otal
powe ower
cons consum umpt ptiion. on.
Redu Re duci cing ng
powe ower
consumption has a ripple effect on the rest of the system system:: a smalle smaller, r, cheape cheaperr power power supply supply can can be used used;; sinc since e less less powe powerr cons consum umpt ptio ion n means less heat, a fan may no longer be necessary; a simpler cabinet with less shielding for electromagnetic shielding may be feasible, too.
Reduced
cost.
Reducing
the
number
of
compone components nts,, the power power supply supply requir requireme ements nts,, cabinet costs, and so on, will inevitably reduce system cost. The ripple effect of integration is such that the cost of a system built from custom ICs can be less, even though the individual ICs cost more than the standard parts they replace. Understanding why integrated circuit technology has such profound influence influence on the design of digital digital systems requires requires understanding both the technology of IC manufacturing and the economics of ICs and digital systems. Applications
Electronic system in cars.
Digital electronics control VCRs
Transaction processing system, ATM
Personal computers and Workstations
Medical electronic systems.
Etc….
Applications of VLSI
Electronic systems now perform a wide variety of tasks in daily life. Electronic systems in some cases have replaced
mechanisms
that
operated
mechanically,
hydrau hydrauli lica call lly, y, or by othe otherr means means;; elec electr troni onics cs ar are e usual usually ly smaller, more flexible, and easier to service. In other cases electr electroni onic c system systems s have create created d totall totally y new applic applicati ations ons.. Electronic systems perform a variety of tasks, some of them visible, some more hidden:
Person rsonal al
enterta rtainme nment
systems
such
as
portable MP3 players and DVD players perform sophistica sophisticated ted algorithms algorithms with remarkably remarkably little little energy.
Elec Electr tron oniic
syste ystem ms
in
cars cars
opera perate te ste stere reo o
syst system ems s and disp displa lays ys;; they they also also cont control rol fuel fuel injection systems, adjust suspensions to varying ter erra raiin, and and
perf perfor orm m
the cont ontro roll
func functtions ions
required for anti-lock braking (ABS) ( ABS) systems.
Digita Digitall electr electronic onics s compre compress ss and decomp decompres ress s video, even at high-definition data rates, on-thefly in consumer electronics.
Low-c ow-cos ostt
ter erm minal inals s
for for
Web We b
bro row wsing sing
stil stilll
require require sophisticat sophisticated ed electronic electronics, s, despite despite their their dedicated function.
Person Personal al comput computers ers and workst workstati ations ons provid provide e word-processing, financial analysis, and games. Computers include both central processing units (CPUs) (CPUs) and specia special-p l-purp urpose ose hardware hardware for disk disk etc.
access, faster screen display,
Medi Me dica call
elec electr tron onic ic syst system ems s
func functi tion ons s
and and
perf perfor orm m
meas measur ure e
comp comple lex x
bodi bodily ly
proc proces essi sing ng
algorit algorithms hms to warn warn about about unusual unusual condit conditions ions.. The availability of these complex systems, far from from over overwhe whelm lmin ing g consu consume mers rs,, only only crea create tes s demand for even more complex systems. The growing sophistication of applications continually pushes the desi design gn and manuf manufac actu turi ring ng of integ integrat rated ed circ circui uits ts and and electronic systems to new levels of complexity. And perhaps the most amazing characteristic of this collection of systems is its variety-as systems become more complex, we build not a few general-purpose computers but an ever wider range of special-purpose systems. Our ability to do so is a testament to
our
growing
mastery
of
both
integrated
circuit
manufacturing and design, but the increasing demands of cust ustomers cont ontinue to test the limits of design and and manufacturing