homework assignment #1 solutions - www …homework assignment #1 solutions ee 477 spring 2017...

12
Homework Assignment #1 Solutions EE 477 Spring 2017 Professor Parker Note: + implies OR, . implies AND, ~ implies NOT Question 1: a) (4%) Use transmission gates to design a 3-input OR gate Note: There are other solutions as well which use the same number of transistors.

Upload: hoangnhu

Post on 30-Apr-2018

238 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: Homework Assignment #1 Solutions - www …Homework Assignment #1 Solutions EE 477 Spring 2017 Professor Parker Note: + implies OR, . implies AND, ~ implies NOT Question 1: a) (4%)

HomeworkAssignment#1SolutionsEE477Spring2017ProfessorParker

Note:+impliesOR,.impliesAND,~impliesNOT

Question1:

a) (4%)Usetransmissiongatestodesigna3-inputORgate

Note:Thereareothersolutionsaswellwhichusethesamenumberoftransistors.

Page 2: Homework Assignment #1 Solutions - www …Homework Assignment #1 Solutions EE 477 Spring 2017 Professor Parker Note: + implies OR, . implies AND, ~ implies NOT Question 1: a) (4%)

b) (11%)Nowusetransmissiongatestoconstructthefollowingfunction:F=(A+B+C).(D+E)

ThemarooncircleisA+B+C.Thisisfedtothetopun-circledtransmissiongatewithpositivecontrolinput=

D+E(yellowcircle)andnegativecontrolinput=~(D+E)=~D.~E(greencircle).The2un-circledtransmissiongatesforma2-inputANDtorealizeOut=(A+B+C).(D+E)

Page 3: Homework Assignment #1 Solutions - www …Homework Assignment #1 Solutions EE 477 Spring 2017 Professor Parker Note: + implies OR, . implies AND, ~ implies NOT Question 1: a) (4%)

Question2:a) (11%)UsetransmissiongatestodesignamultiplexerwithselectsignalsS0,S1,inputsA,B,C,D,and

outputOut.

Youcanarrangethesignalsinanywayyouwant.Oneimplementationisasfollows:

S1 S0 Out0 0 A

0 1 B

1 0 C

1 1 D

Page 4: Homework Assignment #1 Solutions - www …Homework Assignment #1 Solutions EE 477 Spring 2017 Professor Parker Note: + implies OR, . implies AND, ~ implies NOT Question 1: a) (4%)

b) (4%)NowsupposeinputAisalwayslogic0andBisalwayslogic1.Canyoumakethecircuit

simpler?

OnlyanNMOSisrequiredtotransmita1andonlyaPMOStotransmita0.Sowecaneliminateacouple

oftransistors:

Page 5: Homework Assignment #1 Solutions - www …Homework Assignment #1 Solutions EE 477 Spring 2017 Professor Parker Note: + implies OR, . implies AND, ~ implies NOT Question 1: a) (4%)

Question3:Considerthefunction:X=A.B.C.D+E.F.G.Ha) (4%)Drawitslogicgatediagramusingnegativegatesonly(NAND,NOR,INV)

b) (8%)Drawthestickdiagramofeachuniquegateyouhaveusedabove(i.e.ifyouhaveused2gatesofthesametype,justdrawthestickdiagramonce)

4-inputNAND 2-inputNAND

Page 6: Homework Assignment #1 Solutions - www …Homework Assignment #1 Solutions EE 477 Spring 2017 Professor Parker Note: + implies OR, . implies AND, ~ implies NOT Question 1: a) (4%)

c) (5%)DrawacompoundgatetransistorleveldiagramofX

Page 7: Homework Assignment #1 Solutions - www …Homework Assignment #1 Solutions EE 477 Spring 2017 Professor Parker Note: + implies OR, . implies AND, ~ implies NOT Question 1: a) (4%)

Question4:a) (4%)Supposeyouhaveadesignconstraintthatyourgatescanhaveamaximumof2inputs.Redraw

thelogicgatediagramofXusingnegativegatesonly.

Thisisatrickyproblem.Assumingcomplementsignalslike~Aarenotavailable,thisisthesolution:

Butifcomplementsignalsareavailable,thereisaslightlysimplersolution:

Page 8: Homework Assignment #1 Solutions - www …Homework Assignment #1 Solutions EE 477 Spring 2017 Professor Parker Note: + implies OR, . implies AND, ~ implies NOT Question 1: a) (4%)

b) (6%)RedrawthelogicgatediagramofXusingpositivegatesonly(AND,OR)andthesameconstraint

-gatescanhaveamaximumof2inputs.

Noticethata4-inputANDgatecanbedirectlydecomposedintoacascadeoftwo2-inputANDgates

followedbyanotherANDgate.That’sbecause it’sapositivegate.Thesamecannotbedonewithnegativegates.

Page 9: Homework Assignment #1 Solutions - www …Homework Assignment #1 Solutions EE 477 Spring 2017 Professor Parker Note: + implies OR, . implies AND, ~ implies NOT Question 1: a) (4%)

Question5:a) (3%)Showthetruthtablefora2-inputXORgateandgiveitslogicequation:AXORB=?

AXORB=A.~B+~A.B

b) (10%)A3-bitparitycheckercountsthenumberof1’sinasequenceof3bitsandoutputs1ifodd,0

ifeven.(Example:Iftheinputis101,outputis0,butiftheinputis001,outputis1).Designthiscircuit

usingnegativegatesonlyanddrawthetransistorleveldiagram.Youcanassumethatnegativeinputs

like~Aareavailable.

Thetruthtableoutputslogic1in4cases.Combiningtheseterms,wecanwrite:

Out=~A.~B.C+~A.B.~C+A.~B.~C+A.B.C

Ingeneral,anyXORgateoutputslogic1ifthetotalnumberofinput1’sareodd,otherwiseitoutputs

logic0.Soa3-bitparitycheckerissimplya3-inputXORgate:

(AXORB)XORC=(A.~B+~A.B).~C+~(A.~B+~A.B).C

ThiseventuallysimplifiestotheaboveexpressionforOut.

A B AXORB0 0 0

0 1 1

1 0 1

1 1 0

A B C Out0 0 0 0

0 0 1 1

0 1 0 1

0 1 1 0

1 0 0 1

1 0 1 0

1 1 0 0

1 1 1 1

Page 10: Homework Assignment #1 Solutions - www …Homework Assignment #1 Solutions EE 477 Spring 2017 Professor Parker Note: + implies OR, . implies AND, ~ implies NOT Question 1: a) (4%)

~

Page 11: Homework Assignment #1 Solutions - www …Homework Assignment #1 Solutions EE 477 Spring 2017 Professor Parker Note: + implies OR, . implies AND, ~ implies NOT Question 1: a) (4%)

Question 6: (10%) Consider the following 2-to-1MUX built using transmission

gatesasshowninclass.The~pickXsignalisgeneratedfromaninverterwhichhas

adelayof2timeunits.Lookatthegiventimingdiagramanddrawthewaveform

forOut frombeginning toend. Is thereanyperiodof timewhenOut isn’twelldefined?

Duetothe2unitinverterdelay,boththetransmissiongatesareONduringthese

timeperiods:10-12,20-22,30-32.Forthefirst2cases,bothinputsarethesame

andthereisnoconflict.For30-32,bothpickXand~pickXarelogic0,sobothPMOS

areconductingandthereisaconflictbetweenXandY.

YoumightexpectXtowintheconflictbecausePMOScanpassstrong1’sandweak0’s.Actuallywedon’tknowwhathappens.SincetheOutsignalmightbedrivingotherpartsofthecircuit,weshouldneverallowsuchaglitchorundefinedstatetooccur.

Page 12: Homework Assignment #1 Solutions - www …Homework Assignment #1 Solutions EE 477 Spring 2017 Professor Parker Note: + implies OR, . implies AND, ~ implies NOT Question 1: a) (4%)

Question7:(20%)Designalatchwith:

• Inputs=D,Clock,Set,Reset

• Output=~Q

• Active-highasynchronousReset• Active-highsynchronousSet

Thismeansthat:

Reset Clock Set ~Q1 Don’tcare Don’tcare 1

0 1 1 0

0 1 0 Loadnew~D

0 0 Don’tcare Retainprevious~Q

Noticethebasicstructureofthelatch–transmissiongatefollowedbyaloopconsistingof2negativegates

andatransmissiongate.TheNANDisadded insidethe loop toensureAsynchronousReset,whiletheORoutsidetheloopimplementsSynchronousSet.

Note:SetsetsoutputQto1,that’swhy~Qis0.SimilarlyResetshouldmakeQ=0,so~Q=1.

Note:GenerallypositivegateslikeORaren’trecommended.It’sbettertoreplacethemwithnegativelogic

dependingonthetechnology/circuitsused.