(eBook PDF) Advanced Digital Design with the Verilog HDL 2nd Edition instant download
(eBook PDF) Advanced Digital Design with the Verilog HDL 2nd Edition instant download
https://ebooksecure.com/product/ebook-pdf-advanced-digital-
design-with-the-verilog-hdl-2nd-edition/
http://ebooksecure.com/product/ebook-pdf-digital-design-with-an-
introduction-to-the-verilog-hdl-vhdl-and-systemverilog-6th-
edition/
http://ebooksecure.com/product/ebook-pdf-digital-design-with-rtl-
design-vhdl-and-verilog-2nd/
https://ebooksecure.com/download/digital-system-design-with-fpga-
implementation-using-verilog-and-vhdl-ebook-pdf/
https://ebooksecure.com/download/digital-logic-microprocessor-
design-with-interfacing-2nd-edition-ebook-pdf/
Design Recipes for FPGAs using Verilog and VHDL [2nd
ed.] Peter Wilson - eBook PDF
https://ebooksecure.com/download/design-recipes-for-fpgas-using-
verilog-and-vhdl-2nd-ed-ebook-pdf/
http://ebooksecure.com/product/ebook-pdf-digital-logic-circuit-
analysis-and-design-2nd-edition/
http://ebooksecure.com/product/ebook-pdf-digital-design-
principles-and-practices-4th/
http://ebooksecure.com/product/ebook-pdf-digital-control-system-
analysis-design-4th-edition/
https://ebooksecure.com/download/digital-design-principles-and-
practices-ebook-pdf/
Contents
·t7 ·
2.2 Theorems for Boolean Algebraic Minimization 18
2.3 Representation of Combinational Logic 21
2.3.1 Sum-of-Producl.'> Representation 23
2.3.2 Product-of-Sums Representation 26
2.4 Simplification of Boolean Expressions 27
2.4.1 Simplification with Exclusive-Or 36
2.4.2 Ka rnaugh Ma ps (SOP Form) 36
2.4.3 Karnaugh Maps (POS Form ) 39
2.4.4 Karnaugh Maps and Don·t-Cares 40
2.4.5 Exte nded Kamaugh Maps 41
2.5 Glitches and H azards 42
2.5.1 Elimination of Static Hazards (SOP Form ) 45
2.5.2 Summary: Elimination of Static Hazards in 1\vo-Level Circuits 48
2.5.3 Static Hazards in Multilevel Circuits 49
2.5.4 Summary: Elimination of Static Hazards in Multilevel Circuits 52
2.5.5 D ynamic Haza rds 52
2.6 Building Blocks for Logic Design 55
2.6.1 NAND- NOR Structures 55
2.6.2 Multiplexers 60
2.6.3 Dcmultiple xt:rs 61
2.6.4 Encoders 62
2.6.5 Priority Encoder 63
2.6.6 Decoder 64
2.6.7 Priority Decoder 66
References 67
Problems 67
- 18'
3.8 State Red uction and Equivalent States 95
References 99
Problems 100
4 Introduction to Logic Design with Verilog 103
4.1 Structural Models of Combinational Logic 104
4.1.1 Verilog Primitives and Design Encapsulation 104
4.1.2 VerilogStructuralModels 107
4.1.3 Module Ports 108
4.1.4 Some Language Rules 108
4.1.5 Top-Down Design and Nested Modules 109
4.1.6 Design Hierarchy and Source-Code Organization 111
4.1.7 Vectors in Verilog 11 3
4.1.8 Structural Connectivity 114
4.2 Logic System, Design Verification, and Test Methodology 118
4.2.1 Four-Value Logic and Signal Resolution in Verilog 11 9
4.2.2 Test Methodology 120
4.2.3 Signal Generators for Testbenches 123
4.2.4 Event-Driven Simulation 125
4.2.5 Testbench Template 125
4.2.6 Sized Numbers 126
4.3 Propagation Delay 126
4.3.\ Inertial Delay 129
4.3.2 Transport Delay 131
4.4 Truth Table Models of Combinational and Sequen tial Logic with Verilog 131
References 138
Problems 138
5 Logic Design with Behavioral Models of Combinational
and Sequential Logic 141
5.1 Behavioral Modeling 141
5.2 A Brief Look at Data Types for Behavioral Modeling 143
5.3 Boolean Equation-Based Behavioral Models of Combinational Logic 143
5.4 Propagation Delay and Continuous Assignments 146
5.5 Latches and Level-Sensitive Circuits in Verilog 148
5.6 Cyclic Behavioral Models of F lip-Flops and Latches 150
5.7 Cyclic Behavior and Edge Detection 152
5.8 A Comparison of Styles for Behavioral Modeling 154
5.8 .1 Continuous Assignment Models 154
5.8.2 DataflowlRTL Models 156
5.8.3 Algorithm-Based Models 160
5.8.4 Naming Conventions: A Matter of Style 161
5.8.5 Simulation with Behavioral Models 162
5.9 Behavioral Models of Multiplexers, Encoders, and Decoders 162
-19-
5.10 Dataflow Models of a Linear-Feedback Shift Register 171
5.1 1 Modeling Digital Machines with Repetitive Algorithms 173
5.1 1.1 Intellectual Property Re use and Parameterized Models 178
5.1 1.2 Clock Generators ISO
5.12 Machines with Multicycle Operations 182
5. 13 Design D ocumentation with Functions and Tasks: Legacy or Lunacy? 183
5.13.1 Tasks 184
5.13.2 Functions 185
5.14 Algorithmic State Machine Charts (or Be h.avioral Modeling 187
5.15 ASMD Charts 191
5. 16 Behavioral Models of Counters, Shift Registers, and Register Files 195
5.1 6. 1 Counters 195
5.16.2 Shift Registen 202
5.16.3 Register Files and Arrays of Registers (Memories) 206
5.17 Switch Debounce, Metastability, and Synchronizers for Asynchronous Signals 208
5.1 8 Design Example: Keypad Scanner and E ncoder 21 4
Refe rences 223
Proble ms 223
- 21 .
8.2.3 Erasable RO Ms 42 1
8.2.4 ROM-Based Implementation of Co mbinatio nal Logic 423
8.2.5 Verilog System Tasks for RO Ms 423
8.2.6 Comparison of ROMs 426
8.2.7 ROM -Based State Machines 426
8.2.8 Hash Me mory 430
8.2.9 Static Random Access Memory (SRAM) 430
8.2.10Ferr oelectric Nonvola tile Memory 452
8.3 Programmable Logic Array (PLA) 454
8.3.1 PLA Minimization 457
8.3.2 PLA Modeling 459
8.4 Programmable A rray Logic (PAL) 463
8.5 Programmability of PLDs 464
8.6 Complex PLDs (CPLDs) 465
8.7 Field-Programmable Ga le A rrays 466
8.7. 1 The Rol e of FPG As in the ASIC Marke t 467
8.7.2 FPGA "Technologies 469
8.7.3 XILI NX Vinel( FPG As 470
8.8 Embeddable and Progra mmable IP Cores for a System-on-a-Chip (SoC) 470
8.9 Verilog-Based Design Flows for FPGAs 472
8.10 Synthesis with FPGAs 473
References 476
Related Web Sites 476
Problems and FPG A- Based Design Exercises 476
' 23·
10.6 Functional Units for Division 715
10.6.1 Division of Unsigned Binary Numbers 716
10.6.2 Efficieot Divisioo of Unsigned Binary Numbers 724
10.6.3 Redu ced-Register Sequential Divider 734
10.6.4 Division of Signed (Zs Complement) Binary Numbers 739
10.6.5 Signed Arithmetic 739
References 742
Problems 742
·24·
11.8.3 JTAG Registers 798
11.8.4 JTAG Instructions 800
11 .8.5 TAP Architecture 801
11 .8.6 TAP ControllerStateMachine 803
11.8.7 Design Example:Testing with JTAG 807
11.8.8 Design Example: Built-In Self-Test 830
References 845
Problems 845
.".
F Verilog Language Formal Syntax 887
F.1 Source text 887
F.2 Declarations 890
F.3 Primitive instances 89'
F.' Module and generated instantiatio n 895
F.5 UDP declaration and instantiation 8%
F.6 Behaviora l statements 897
F.7 Specify section 901
F.8 Expressions 905
F.9 General 909
. 26·
CHAPTER 1 Introduction to Digital
Design Methodology
Classical design methods relied on schematics and manual methods to design a circuit,
but today computer-based languages are widely used to design circuits of enormous
size and complexity. There are several reasons for this shift in practice. No team of en-
gineers can correctly design and manage, by manual methods, the details of state-of-
the-art integrated circuits (ICs) containing several million gates, but using hardware
description languages (HDLs) designers easily manage the compleltity of large designs.
Even small designs rely on language-based descriptions, because designe rs have to
quickly produce correct designs targeted for an ever-shrinking window of opportunity
in the marketplace.
Language-based designs are portable and independent of technology, allowing
design teams to modify and re-use designs to keep pace with improvements in technology.
As physical dimensions of devices shrink, denser circuits with better perfonnance can be
synthesized from an original HD£...based model.
HDLs are a convenient medium for integrating intellectual property (IP) from a
variety of sources with a proprietary design. By relying on a common design language,
models can be integrated for testing and synthesized separately or together, with a net
reduction in time for the design cycle. Some simulators a\so support mued descriptions
based on multiple languages.
The most significant gain that results from the use of an HDL is that a working
circuit can be synthesized automatically from a language-based description, bypassing
the laborious steps that characterize manual design methods (e.g., logic minimization
with Karnaugh maps).
HD£...based synthesis is now the dominant design paradigm used by industry.
Today, designers build a software prototype/model of the design. verify its functionality.
and then use a synthesis tool to automatically optimize the circuit and create a netlist in
a physical technology.
Advuttd DigitaJ D esign with the Verilog HDL
HDLs and synlhesis lools focus an engineer's allention on fun ctionality rather
than on individual transistors o r gates; they synthesize a circuit that will realize the de-
sired functionality, and satisfy a rea andlor performance constraints. Moreove r, alterna-
tive architectures can be gene rated fro m a single HDL model and evaluated quickly to
perform design tradeoffs. Functional models are also referred to as behavioral models.
HDLs serve as a platform for several tools: design e ntry, design verification. test
gene ration, fault analysis and simulation, timing analysis and/or verificatio n, synthesis,
and automatic generatio n of schematics. This breadth of use improves the efficiency of
the design now by e liminating translations of design descriptions as the design moves
through the tool chain.
Two languages enjoy widespread industry support: Ve rilogU I (lJ and VHDL [2J.
Both languages are IEEE (Institute of E lectrical and Electronics Engincers) stan-
dards; both are supported by synthesis tools for ASICs (application-specific integrated
circuits) and FPGAs (field-programmable gale arrays). Languages for analog ci rcuit
dcsign, such as Spice (3). play an important role in verifying critical timing paths of a
circuit, but these languages impose a prohibitive computationa l burden on large de-
signs, cannot support abstract styles of design, and become impractical whe n used o n a
large scalc. Hybrid languages (e.g.. Ve rilog-A) (4) are used in designing mixed-signal
circuits, which have both digital and a na log circuitry. System-level design languages,
such as SystemC [5J and SuperlogTM 16], are now emerging to support a highe r level of
design abstraction than can be supporte d by Ve rilog or VHDL.
Production-ready
masks
input data. Test plans for sequential machines must be more elaborate to ensure a high
level of confidence in the design, because they may have a large number of states. A
test plan identifies the stimulus generators, response monitors, and the gold standard
response against which the model will be tested.
Ll.4.2 Testbendl Development The lestbench is a Verilog module in which the unit
under test (UUT) has been instantiated, together with pattern generators that are to be
applied to the inputs of the model during simulation. Graphical displays andlor
response monitors arc part of the testbench. The testbench is documented to identify
the goals and sequential activity that will be observed during simulation (e.g., ''Testing the
opcodes··). If a design is formed as an architecture of multiple modules, each must be
verified separately, beginning with the lowest level of the design hie rarchy, then the in-
tegrated design must be tested to verify that the modules interact correctly. In this case,
the test plan must describe the functiona l features of each module and the process by
which they will be tested, but the plan must also specify how the aggregate is to be tested.
1.1.4.3 Test Execution and Model Veri8cation The testbench is exercised according
to the test plan and the response is verified against the original speci fication fo r the
design, e.g. does the response match that of the prescribed ALU? This step is intended
to reveal errors in the design,confinn the syntax of the description , verify style conven-
tions. and eliminate barriers to synthesis. Verification of a model requires a systematic,
thorough demonstration of its behavior. There is nQ point in proceeding further imo the
design flow Ilntil the model has been verified.
and satisfy performance (speed) specifications. This step produces a netlist of standard
cells or a database that will configure a targe t FPGA.
lPoslsynlhesis validal;nn in an AS IC design fio'" is followed by a step for postiayoul timing verification.
Advan~ Digital Dnip with tbe Verilog HDL
1Scan patbs are fonned by replacing ordinary Oip-flops with specially designedOip-fi ops thatcanbceonnected
together in test mode to fonn a shlft register. Test pallems can be scanned into tbe design, and applied to the
internalcireuitry.The responseofthecireuitcanbeeapturedintbescancbainandsbiftedout for analysis.
Another Random Scribd Document
with Unrelated Content
Különben a konyha mindig üresen állt; a szoba becsukva, semmi
vizes nyom az esős időben, itt nem kotonászott senki, nyugtatám
magamat, az ifjú úr maga feledé zártalan lakatját. Öt-hat nappal reá
én lejöttem Pestről az uram dolgában, lent is maradtam, hogy itt ért
a debreczeni vásár. A mint Löbl dögbőreit hordatom össze
fiókhajhászoktól, egyszer levelet ir, most szerdán egy hete, hogy a
Gyapjasy pusztáján 1500 bőr van. Nyúl Iczik fizesse ki nyolcz bankó
garasával, s a többivel együtt vigyük Debreczenbe…
– Ki az a Nyúl Iczik?
– Csaplár és orgazda a hangyási csárdán. Gyöngyösön laktában
nyúlbőrbe huztak egy macskát a legyes diáksüldők, s kertjébe
ereszték. Míg kergette, leányát elszökteték. Azóta Nyúl Icziknek
hijják. Ahun látják kendtek a vermek irányában, lovát abrakolja, nem
hiszem, hogy az is igaz kézen került hozzá.
– Be sunda egy zsidó, szeplős mint a pulykatojás, s szeme öklel,
mint a vasvilla.
– Nos, nos…, hát a tiszttartó?
– Panaszkodott a hallatlan dögről. Igaz, a környékben nagyon
veszett ez a birkaféle, de máskor, mondá, használt a pesti por. Talán
az a hibám, hogy keveset hoztam, mert míg tartott benne, a só közé
hintettem, állítá a juhász, olyan vidám volt minden fia, mint az új
menyecske; de hogy a por elfogyott, neki szomorodtak, egyik esett a
másik után, s a mi a legcsodásabb, a gyengéje utoljára maradt,
pedig egy sem döglött vértályogba… Itt a Márk látatlan keze
dolgozott, gondolám, de mondani nem mertem, mert tanu nincs,
sem nem láttam tisztán, hogy ráesküdhetném. Löbl azt mondaná,
hogy adósságomtól akarok megszökni ily rút rágalommal, s hogy
lenne hitelem, mikor mindig mondja: zsebemben van az igazság és
törvény. Pedig fejemet teszem, hogy a hozzá vitt pakéta két
meghamisított patikás csupor volt, melyekkel Márk doktor reggel hat
órakor kicserélte az igaziakat.
– Ily bünt Zöld Marczi nem teve, mondá egyik paraszt. Becsületes
embert húszezerig rontani, hogy magának ezerháromszáz hasznot
csináljon.
– S a jámbor marha tilokus hirét becsületét csúfságra kitegye,
jegyzé meg a másik.
– Szerencsétlenségbe döntse, tömlöczbe keverje, vagy épen
varjak torára juttassa! egészíté ki a harmadik.
– De hát általában nem volt módja másképen fizetni.
– Dehogy nem, van annak, de pénz az istene. A mit egyszer
bezár, szem hozzá sohasem fér, úgy ül rajta mint az elátkozott
sárkány.
– Csak nem fér fejembe, töprönködék a füredi ködmönös, hogy
küldhet Lajos úrfi egy oly sátányremondának sámsonyi dinnyét és jó
bogáti dohányt!
– S az a juhgyilkos czimbora, hogy kivánja a bőrt nyolcz bankó
garasért, mikor egy forinton, huszonkét garason egyre-másra veszik?
– Gyapjasy úr Pesten megszorult tavaly. Egy idegen ifjú adósságit
akarta fizetni, kit a Dunából fogtak ki, miután beugrott. Löbltől vett
föl pénzt három vagy négy hétre s akkor köté Simon a contrectust,
miszerint Gyapjasytól hevesi jószágán tiz évig minden dögbőrt
harmadrész áron kap.
– Féreg egye meg elevenen a vörös koppasztóját! mondá teljes
szivből egy fuvaros.
– Hallgassa meg isten a kend igazságos átkát, folytatá a másik.
– Hallgassa meg!!! kivánák mindnyájan kalapemelintve a
gondviselés iránti megnyugtató hittel.
És itt ünnepélyes csend lőn a jobbágyok között, kik öt-
hatodíziglen öröklék az árvaságot s nyomort, kik szenvedő apáktól
vették át a türelem vérező országát, s kiknek átok vagy megnyugvás
jutott hitvány ellensúlyúl a hatalmas bűnök ellenében. Mint minden
ily esetnél, megrendűltek a mesterséges vétken, mely közöttök nem
létez, melynek szövényes hálóit kivetni nem értik, s melyhez szivök
nincs elfajulva, mert elég neveletlenek ugyan rosszra hajlani, de nem
elég neveltek, hogy a bűnben művészek legyenek. Jól tapasztalják
ők, miként a csavargó törvény gyakran kikerüli a nagy vétkezőt, s
azért kit a vallás mutat, egy biztosb fenségtől kérnek büntetést. Ki
tudja, ha természet útján nem érik-e borzasztón-valóvá az együgyü
népies átok?
A füredi ködmönös szétnézett szekerén, minő pusztulást tőn a
fellegszakadás. Harmincz nyerget hozott vásárra, mikről
mezővároskájok országos hírben áll. Egyszerű kápás nyereg, tört
szíjjal átfűzve még az ó lőcsei formára, de hajlása igen tökéletes,
egészen termethez van vágva, s ha jól használtatik, a lovat nem
rontja. Most elővett abrakos zsákjából egy karcsú piros-szattyán
nyerget, mely gondosan hurkákra volt varrva, mint a miskolczi
paplanok. Szattyán szélén csákány és vadászeb, s tulról a füredi
torony kiverve gombostűnyi réz szegből, de ezekre magyarázat kell,
hogy az ember rájok ismerjen. Kápája kisded és kaczkiás, azaz tele
metszve csillagokkal, a nyeregfőn pedig ötágu korona, nagy
névbetűivel a tulajdonosnak. A mű csinos, könnyű s erős
egyszersmind; valóban dísze mesterének, de nem volt még
iparkiállítás, hogy bemutathatná a hideg nemzetnek. Ezt huzá ki
mondom az abrakos zsákból s örvendve, hogy zápor martaléka nem
lett, hetykén mondá a furmányosakhoz:
– Már ez aztán kitesz magáért. Egy hibás öltés sincs piros
szattyánjában. A király ráülhet koronázásában. De Lajos urfit meg is
illeti ám.
– Ki a kend úrfia, hogy csak azzal áll elő?
– Ej ha ebugattát, hát nem ismerik kendtek Lajos úrfit?
– Hiszen, ha azt nézzük, annyi Lajost lát kend, mint a nádi veréb.
– De ezt, épen ezt, és nem mást értek én.
– No hát azt, épen azt, kiről kend cseterál,18) nem tudjuk, ki fia.
– Hisz azt én sem tudom, de magát…
– Mondjuk: nem ismerjük.
– No bizony salavári ficzkók. Kérdjék meg csak bent a nemzetes
uramat,19) bezzeg tudja ám ő, hogy dobaz pugyillárist hordoz Lajos
úrfi. Minap is egy szálig kifizette, mit a kócsi indzsellérek
harmadnapig szekerestől lovastól ettek ittak, mulattak és törtek.
Mikor ide kint van, okos bolond neki megy a bornak, mint a
csordakút, mindig ő a gazda. Egyszer, ezt nem láttam, szóbeszédből
tudom, maga alól odaadta paripáját egy szállító embernek, kitől
Kadarcson két lovát ellopták. Máskor meg egy koldus állott az útfélen
jankli nélkül zivargó időben, s köpenyegét veté neki a kocsiból.
Mondja is gyakorta, ha úgy szóra hozzák, hogy a népet igen szereti,
hogy annak állapotja sanyarú, annak változni kell s ő hazájának él.
Szentgyörgyszabadságkor20) a nyergem el nem kelt s biz ő kifizette
igaz árán mind két forintjával, mert a házam eldobolták volna. Aztán
meg kiosztá a talyigások közt, azért ajándékba viszem ezt a nyerget,
tudom, kedves leszen, mert mit a környékben nevezetest kapni,
mindenből szeret. Taval…
– Mégis, ki hát az a Lajos úrfi?
– Nem tudom én atyafi, felele a ködmönös, Debreczenben lakik a
táblás uraknál,21) vagy ha nem lakik is, kardosan jár mint ők, s az
utczán is köztök sertepertél.
– Tán lelte azt a sok ezer forintárú pénzt, hogy úgy szanaszét
hányja mint a Csáky szalmáját?
– Van annak mindig, erősíté a nyeregcsináló. De nem is kiméli
kivált vászon cselédeknél, mert azt nem tagadom, hogy hamis kurafi.
– Szeret járni az asszonyfélék után?
– Mindenütt kergeti. Neki mindegy, alacsony, magas, szőke,
barna, köpczös vagy nyurga, csak takaros legyen.
– Fikkom a lelke, bizony jó posztóból szabták a nadrágját.
– A látóképi leányasszonyt is mindig hajhászta, a kit Szoboszlóra
vittek németszóra.22)
– Dejsz ott nem is esnék porba pecsenyéje.
– A rossz nyelvek aztán sok mindent beszélnek, folytatá a
nyerges fejét megcsóválva, de én nem hiszem.
– Példának okáért?
– Emberszólás nem igaz mondás, jobb hallgatni vele.
– No csak mégis. Hiszen kend nem félhet tőle, mint Tógyer gazda
a vörös kopasztótól.
– De a magyar szópéldában mondja: jótett helyébe jót várj. Lajos
úrfi nekem jóltevőm, az isten áldja meg, s rossz kutya volnék, ha
megugatnám.
– Igaza van földi, mondák a többiek. Simon zsidó, óh az egészen
más. Ki másokat szeret, s a szegényen segít, ha hibázik is, nem lehet
rossz szivű.
A nap az alatt hanyatlott, s messze nyujtá az épületek árnyát a
sík pusztán.
Egy hosszú ernyős szekér jött ki az állásból, mely alá egyenkint
szöktek a fent megijedt komik, hogy kefélt fogukat ott ne kelljen
hagyni, az embernyuzó betyár szivességéből. A puncsos morph
tulipiros képe szépen kivirított az ernyő tunneljéből, mint egy
kettémetszett veresbélü dinnye. A szekér elindult, a műkedvelő
Pierrot pedig hátul kivágta a gyékényt, s a nyilásán kidugá ijedt
képét mint egy rosszúl festett mumia, hogy jókor megláthassa, ha a
betyár utánok rugtatna.
V.
(Kátay, Kopogó, Nyúl Iczik, Pisze
Pista, Harangi talyigás.)
Az alatt több teherszállítók kezdtek kászolódni, kik az éj folytában
még Debreczenbe törekedének.
Alább a válúnál néhány csámpás lovat itattak; a híd túlsó farkán
pedig negyven szilaj marhát hajtott be két gulyás, melyek öklelő
szarvakkal, farokat felhányva szöktek odább-odább a hajigált bot
előtt.
Vastag széles,
Kurta mérges;
Somfanyél csóválja;
Bolond a gazdája.