ebook img

Introduction to Logic Circuits & Logic Design with VHDL PDF

503 Pages·2019·40.989 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Introduction to Logic Circuits & Logic Design with VHDL

Brock J. LaMeres Introduction to Logic Circuits & Logic Design with VHDL Second Edition I L C NTRODUCTION TO OGIC IRCUITS & L D VHDL OGIC ESIGN WITH I L C NTRODUCTION TO OGIC IRCUITS & L D VHDL OGIC ESIGN WITH 2ND EDITION Brock J. LaMeres BrockJ.LaMeres DepartmentofElectrical&ComputerEngineering MontanaStateUniversity Bozeman,MT,USA ISBN978-3-030-12488-5 ISBN978-3-030-12489-2(eBook) https://doi.org/10.1007/978-3-030-12489-2 LibraryofCongressControlNumber:2019932161 #SpringerNatureSwitzerlandAG2017,2019 Thisworkissubjecttocopyright.AllrightsarereservedbythePublisher,whetherthewholeorpartofthematerialis concerned,specificallytherightsoftranslation,reprinting,reuseofillustrations,recitation,broadcasting,reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation,computersoftware,orbysimilarordissimilarmethodologynowknownorhereafterdeveloped. Theuseofgeneraldescriptivenames,registerednames,trademarks,servicemarks,etc.inthispublicationdoesnot imply,evenintheabsenceofaspecificstatement,thatsuchnamesareexemptfromtherelevantprotectivelawsand regulationsandthereforefreeforgeneraluse. Thepublisher,theauthors,andtheeditorsaresafetoassumethattheadviceandinformationinthisbookarebelieved tobetrueandaccurateatthedateofpublication.Neitherthepublishernortheauthorsortheeditorsgiveawarranty, expressorimplied,withrespecttothematerialcontainedhereinorforanyerrorsoromissionsthatmayhavebeen made.Thepublisherremainsneutralwithregardtojurisdictionalclaimsinpublishedmapsandinstitutionalaffiliations. Covercredit:ID98722794#VladimirTimofeevjDreamstime.com ThisSpringerimprintispublishedbytheregisteredcompanySpringerNatureSwitzerlandAG Theregisteredcompanyaddressis:Gewerbestrasse11,6330Cham,Switzerland Preface Theoverallgoalofthisbookistofillavoidthathasappearedintheinstructionofdigitalcircuitsover thepastdecadedueto therapidabstractionof systemdesign. Upuntilthemid-1980s,digital circuits were designed using classical techniques. Classical techniques relied heavily on manual design practicesforthesynthesis,minimization,andinterfacingofdigitalsystems.Correspondingtothisdesign style,academictextbooksweredevelopedthattaughtclassicaldigitaldesigntechniques.Around1990, large-scale digital systems began being designed using hardware description languages (HDL) and automatedsynthesistools.Broad-scaleadoptionofthismoderndesign approachspreadthroughthe industry during this decade. Around 2000, hardware description languages and the modern digital design approach began to be taught in universities, mainly at the senior and graduate level. There wereavarietyofreasonsthatthemoderndigitaldesignapproachdidnotpenetratethelowerlevelsof academiaduringthistime.First,thedesignandsimulationtoolsweredifficulttouseandoverwhelmed freshmanandsophomorestudents.Second,theabilitytoimplementthedesignsinalaboratorysetting wasinfeasible.Themoderndesigntoolsatthetimeweretargetedatcustomintegratedcircuits,which are cost- and time-prohibitive to implement in a university setting. Between 2000 and 2005, rapid advances in programmable logic and design tools allowed the modern digital design approach to be implemented in a university setting, even in lower-level courses. This allowed students to learn the modern design approach based on HDLs and prototype their designs in real hardware, mainly field programmablegatearrays(FPGAs).Thisspurredanabundanceoftextbookstobeauthoredteaching hardwaredescriptionlanguagesandhigherlevelsofdesignabstraction.Thistrendhascontinueduntil today.Whileabstractionisacriticaltoolforengineeringdesign,therapidmovementtowardteachingonly themoderndigitaldesigntechniqueshasleftavoidforfreshman-andsophomore-levelcoursesindigital circuitry. Legacy textbooks that teach the classical design approach are outdated and do not contain sufficientcoverageofHDLstopreparethestudentsforfollow-onclasses.Newertextbooksthatteach themoderndigitaldesignapproachmoveimmediatelyintohigh-levelbehavioralmodelingwithminimal ornocoverageoftheunderlyinghardwareusedtoimplementthesystems.Asaresult,studentsarenot being provided the resources to understand the fundamental hardware theory that lies beneath the modern abstraction such as interfacing, gate-level implementation, and technology optimization. Students moving too rapidly into high levels of abstraction have little understanding of what is going onwhentheyclickthe“compileandsynthesize”buttonoftheirdesigntool.Thisleadstograduateswho can model a breadth of different systems in an HDL but have no depth into how the system is implementedinhardware.Thisbecomesproblematicwhenanissuearisesinarealdesignandthere isnofoundationalknowledgeforthestudentstofallbackoninordertodebugtheproblem. Thisbookaddressesthelower-levelfoundationalvoidbyprovidingacomprehensive,bottoms-up coverageofdigitalsystems.Thebookbeginswithadescriptionoflower-levelhardwareincludingbinary representations, gate-level implementation, interfacing, and simple combinational logic design. Only afterafoundationhasbeenlaidintheunderlyinghardwaretheoryistheVHDLlanguageintroduced.The VHDL introduction gives only the basic concepts of the language in order to model, simulate, and synthesize combinational logic. This allows the students to gain familiarity with the language and the moderndesignapproachwithoutgettingoverwhelmedbythefullcapabilityofthelanguage.Thebook then covers sequential logic and finite-state machines at the component level. Once this secondary foundation has been laid, the remaining capabilities of VHDL are presented that allow sophisticated, synchronous systems to be modeled. An entire chapter is then dedicated to examples of sequential system modeling, which allows the students to learn by example. The second part of the textbook introducesthedetailsofprogrammablelogic,semiconductormemory,andarithmeticcircuits.Thebook v vi (cid:129) Preface culminateswithadiscussionofcomputersystemdesign,whichincorporatesalloftheknowledgegained in the previous chapters. Each component of a computer system is described with an accompanying VHDL implementation, all while continually reinforcing the underlying hardware beneath the HDL abstraction. Written the Way It Is Taught Theorganizationofthisbookisdesignedtofollowthewayinwhichthematerialisactuallylearned. Topics are presented only once sufficient background has been provided by earlier chapters to fully understandthematerial.Anexampleofthislearning-orientedorganizationishowtheVHDLlanguageis brokenintotwochapters.Chapter5presentsanintroductiontoVHDLandthebasicconstructstomodel combinational logic. This is an ideal location to introduce the language because the reader has just learnedaboutcombinationallogictheoryinChap.4.Thisallowsthestudenttobegingainingexperience usingtheVHDLsimulationtoolsonbasiccombinationallogiccircuits.Themoreadvancedconstructsof VHDL such as sequential modeling and test benches are presented in Chap. 8 only after a thorough background in sequential logic is presented in Chap. 7. Another example of this learning-oriented approach is how arithmetic circuits are not introduced until Chap. 12. While technically the arithmetic circuitsinChap.12arecombinationallogiccircuitsandcouldbepresentedinChap.4,thestudentdoes not have the necessary background in Chap. 4 to fully understand the operation of the arithmetic circuitry,soitsintroductionispostponed. Thisincremental,just-in-timepresentationofmaterialallowsthebooktofollowthewaythematerial isactuallytaughtintheclassroom.Thisdesignalsoavoidstheneedfortheinstructortoassignsections thatmovebackandforththroughthetext.Thisnotonlyreducescoursedesigneffortfortheinstructorbut allowsthestudenttoknowwheretheyareinthesequenceoflearning.Atanypoint,thestudentshould know the material in prior chapters and be moving toward understanding the material in subsequentones. Anadditionaladvantageofthisbook’sorganizationisthatitsupportsgivingthestudenthands-on experience with digital circuitry for courses with an accompanying laboratory component. The flow is designedtosupportlabexercisesthatbeginusingdiscretelogicgatesonabreadboardandthenmove intoHDL-baseddesignsimplementedonoff-the-shelfFPGAboards.Usingthisapproachtoalaboratory experiencegivesthestudentexperiencewiththebasicelectricaloperationofdigitalcircuits,interfacing, andHDL-baseddesigns. Learning Outcomes Eachchapterbeginswithanexplanationofitslearningobjectivefollowedbyabriefpreviewofthe chaptertopics.Thespecificlearningoutcomesarethenpresentedforthechapterintheformofconcise statementsaboutthemeasurableknowledgeand/orskillsthestudentwillbeabletodemonstratebythe endofthechapter.Eachsectionaddressesasingle,specificlearningoutcome.Thiseasestheprocess ofassessmentandgivesspecificdetailsonstudentperformance.Thereareover1000assessmenttools intheformofexerciseproblemsandconceptcheckquestionsthataretieddirectlytospecificlearning outcomesforbothformativeandsummativeassessment. Teaching by Example Withnearly250workedexamples,conceptchecksforeachsection,200+supportingfigures,and 1000+assessmentproblems,studentsareprovidedwithmultiplewaystolearn.Eachtopicisdescribed in a clear, concise written form with accompanying figures as necessary. This is then followed by Preface (cid:129) vii annotatedworkedexamplesthatmatchtheformoftheexerciseproblemsattheendofeachchapter. Additionally,conceptcheckquestionsareplacedattheendofeachsectioninthebooktomeasurethe student’s general understanding of the material using a concept inventory assessment style. These features provide the student multiple ways to learn the material and build an understanding of digital circuitry. Course Design Thebookcanbeusedinmultipleways.Thefirstistousethebooktocovertwo,semester-based collegecoursesindigitallogic.Thefirstcourseinthissequenceisanintroductiontologiccircuitsand covers Chaps.1, 2, 3, 4, 5, 6, and7.This introductory course,which isfound in nearlyall accredited electricalandcomputerengineeringprograms,givesstudentsabasicfoundationindigitalhardwareand interfacing.Chapters1,2,3,4,5,6,and7onlycoverrelevanttopicsindigitalcircuitstomakeroomfora thorough introduction to VHDL. At the end of this course, students have a solid foundation in digital circuitsandareabletodesignandsimulateVHDLmodelsofconcurrentandhierarchicalsystems.The secondcourseinthissequencecoverslogicdesignusingChaps.8,9,10,11,12,and13.Inthissecond course, students learn the advanced features of VHDL such as packages, sequential behavioral modeling,andtestbenches.Thisprovidesthebasisforbuildinglargerdigitalsystemssuchasregisters, finite-statemachines,andarithmeticcircuits.Chapter13bringsalloftheconceptstogetherthroughthe designofasimple8-bitcomputersystemthatcanbesimulatedandimplementedusingmanyoff-the- shelfFPGAboards. Thisbookcanalsobeusedinamoreaccelerateddigitallogiccoursethatreachesahigherlevelof abstractioninasinglesemester.Thisisaccomplishedbyskippingsomechaptersandmovingquickly through others. In this use model, it is likely that Chap. 2 on number systems and Chap. 3 on digital circuitswouldbequicklyreferencedbutnotcoveredindetail.Chapters4and7couldalsobecovered quickly in order to move rapidly into VHDL modeling without spending significant time looking at the underlyinghardwareimplementation.Thisapproachallowsahigherlevelofabstractiontobetaughtbut provides the student with the reference material so that they can delve in the details of the hardware implementationifinterested. AllexerciseandconceptproblemsthatdonotinvolveaVHDLmodelaredesignedsothattheycan be implemented as a multiple-choice or numeric entry question in a standard course management system. This allows the questions to be automatically graded. For the VHDL design questions, it is expected that the students will upload their VHDL source files and screenshots of their simulation waveformstothecoursemanagementsystemformanualgradingbytheinstructororteachingassistant. Instructor Resources Instructorsadoptingthisbookcanaccessagrowingcollectionofsupplementarylearningresources includingYouTubevideoscreatedbytheauthor,asolutionsmanual,alaboratorymanual,andVHDLtest benches for all problems. Additional resources are made available as demand grows. The YouTube videoscovereverysectioninthebookandcanprovidesupplementarylearningmaterialsforstudentsor facilitatefullyonlineorflippeddeliveryofthismaterial.Thevideosarefoundathttps://www.youtube.com/ c/DigitalLogicProgramming_LaMeres.Thesolutionsmanualcontainsagraphic-richdescriptionofselect exerciseproblems.Acomplementarylabmanualhasalsobeendevelopedtoprovideadditionallearning activitiesbasedonboththe74HCdiscretelogicfamilyandanoff-the-shelfFPGAboard.Thismanualis providedseparatelyfromthebookinordertosupporttheever-changingtechnologyoptionsavailablefor laboratoryexercises. viii (cid:129) Preface What’s New in the Second Edition The most common request from adopters of the first edition of this book was more assessment problemsand accompanyingvideos.Asaresult,thesecondeditionnowcontainsover1000assess- mentquestions,andYouTubevideoshavebeencreatedforeverysectionofthebook.Additionally,more workedexampleshavebeenaddedsothateverysectionhasabundantexamplesofhowtoapplythe contenttodesigningandanalyzingdigitalcircuits. Bozeman,MT,USA BrockJ.LaMeres Acknowledgments Endlessthanksaregiventomybeautifulwifeandsoulmate,JoAnn.Everydayisagiftwithyou bymyside. ix Contents 1:INTRODUCTION:ANALOGVS.DIGITAL.............................................................. 1 1.1 DIFFERENCESBETWEENANALOGANDDIGITALSYSTEMS................................................ 1 1.2 ADVANTAGESOFDIGITALSYSTEMSOVERANALOGSYSTEMS........................................... 3 2:NUMBERSYSTEMS............................................................................................... 7 2.1 POSITIONALNUMBERSYSTEMS................................................................................... 7 2.1.1 GenericStructure........................................................................................... 8 2.1.2 DecimalNumberSystem(Base10).............................................................. 9 2.1.3 BinaryNumberSystem(Base2)................................................................... 9 2.1.4 OctalNumberSystem(Base8)..................................................................... 10 2.1.5 HexadecimalNumberSystem(Base16)...................................................... 10 2.2 BASECONVERSION.................................................................................................... 11 2.2.1 ConvertingtoDecimal.................................................................................... 11 2.2.2 ConvertingfromDecimal............................................................................... 14 2.2.3 ConvertingBetween2nBases....................................................................... 18 2.3 BINARYARITHMETIC................................................................................................... 22 2.3.1 Addition(Carries)........................................................................................... 22 2.3.2 Subtraction(Borrows).................................................................................... 23 2.4 UNSIGNEDANDSIGNEDNUMBERS............................................................................... 24 2.4.1 UnsignedNumbers........................................................................................ 25 2.4.2 SignedNumbers............................................................................................ 26 3:DIGITALCIRCUITRYANDINTERFACING............................................................. 43 3.1 BASICGATES............................................................................................................ 43 3.1.1 DescribingtheOperationofaLogicCircuit................................................... 43 3.1.2 TheBuffer....................................................................................................... 45 3.1.3 TheInverter.................................................................................................... 46 3.1.4 TheANDGate................................................................................................ 46 3.1.5 TheNANDGate............................................................................................. 47 3.1.6 TheORGate.................................................................................................. 47 3.1.7 TheNORGate............................................................................................... 47 3.1.8 TheXORGate............................................................................................... 48 3.1.9 TheXNORGate............................................................................................. 49 3.2 DIGITALCIRCUITOPERATION....................................................................................... 50 3.2.1 LogicLevels................................................................................................... 50 3.2.2 OutputDCSpecifications............................................................................... 51 3.2.3 InputDCSpecifications.................................................................................. 52 3.2.4 NoiseMargins................................................................................................ 53 3.2.5 PowerSupplies.............................................................................................. 54 3.2.6 SwitchingCharacteristics............................................................................... 56 3.2.7 DataSheets.................................................................................................... 57 xi

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.