Dica 3

You might also like

Download as pdf
Download as pdf
You are on page 1of 23
ENTIA units! Roa D-AipFlop: (ith) 7 f ] yen | Tp DataFlow: Entity pri is Povec D,clK: to bits ©, O@bas: Inout bit); End FIs Anchitectude DF2 of DF is beqin @2=0; End ofa Stouctovar moder: Entity ofl is POE ¢ D, cK: in bits 8, Abas: Not Hit); End pF; ABchitectUdse Component Poot ¢ Aiin bit} Birovr bit End NOT; DF of DEI 1S Non is Component NANDI POdEC ~YLIN bits Z:Out bit); End NANDI; L CIRCO roth) at 1 IONE D en\ 3 | Bae 0,0.) aS [ os 1 se roe (gy \ ' 5 [on m} Bebaviov®. Lentity OFT 15 post ¢ p,cik : in ies | @,Q bas: Inout bit ); | End DPFIs Aschitectuse pF2 Of OFI is begin poocess (0, C\K) begin fe Ccik="') theo QL= D3 else QZ =NOT D3 Ena if; End process; End prs Siqnar Nt,No,N3 2 bik) beqid NGI! NOT Post map (p,NI} NANDANANDI poot rimplO, {KM NAND3: NANI post recipe clk tii NANDH: Na ntp) Pot rap (ny, 9 si NAND5: NAND? Post map (3 Qbav, 01} EN pre; 4 srouctueal Mader: entity JKFI post ¢ iS SK, IKE IN bits Q, Abad: Mout bit); end aKrl; Aochitectude Poot ¢ OKF2 coroponent ANDI is % A,B,C: I biky D:0uUE bit); End ANDI} component RYN bits bits Zi Out End NOR; Signal Ny Nat bits ut begin AND2: AND] AND3: ANDI NORD: nog NOR3 ; MORI End akF9; OF OKFI id NOR\ iS Post port marl k, clk, Q, NI)3 rap Cd, CIK, @bav, N29; Poot MAP (NI, &, Ob0S); pot “map (1N2'/@," Aba); 1. FP HOP: [ | l Sragetumar nggde Entity Fr is Povt¢ TCI. WM std-loqic § &, Bhar, Inout std-logic)s Eno Tey Avchitectuve 1F2 ot TRI iS component anni is Post ¢ AB,C! in Std-loqic ; D: Ot std-loqic); Edd ans; component NOR is Poste KYL IN std -1oqics %H 1 Ot Std ~104iC Ds End oR; signal Ny ND! Oi 5 beqin ANDI: ANDI pot MapCr, cK, @, 05 AND3 : ANDI Powe mp CT, cIk, Abag, N24} NORD: NORI Post Mmeap (Ni, &, Abav); NORA NOR pose MAP CNS, @, Qbas); End Tro; — i t shift REQIStCos} ‘ peng i) TneVE AOC U types Of shift REgiSICdS- | "SEI I seviar out shift Registeo | 2 AV 19, pacanet oot sh Regt 2 POTN Any seviat OUt ehitt Regi St He POPAUEL ivy) Dawanel Oot shit Register \ 1 BIA IM SeBIAT gt Shitt Reg iste: (Behavioga mode) | ThE AMA Can send in seriot aNd the date can Beceived in gesial. then the type oF shift eeGit IS canted sevial in serial, out Shitl ReTEtCs- in — —fo a of Oa aa] fo “ara cis_| re felts de [lies | Entity SRI is i poott Db: in std -10qic; Clks in std ~10qic; Sout: Out std-1oqicds End set; Aochitectude spo ot SRI tS ; Beg arr 8} Std-loqic -vectosco to 335 PEOCESS CD, cite) Begin WCciK'event and c=) then 800); = 195 5 Qi to 3)t = A(6 to 5); ' Sout 4 = ac3)} A else Gout Z = '0°; End if; End proce ss; End spo; RegiSted Mina # > Sepial in pavayic! ob Shite ; eno) Entity srt is Pate BD: in std-logic; chkt in Std-togic; ; Qs inout Ssect-rogie - vectov(o to 3) ); End sri; Architectude sg. of SRI is begin Poocess(D, ciK) begin if Couctevent and clk =") then QW) eet); / hea Bel moAx 4 Wb tory am ze 800); : 809 2 = cn; : iy 803) ¢ 00); ee ee 8<=ato to 3; : else 8Z="0000"; ae tee End ie; End pooccss , End p90; Pacatte in Sevial Out shite Regi sted: , PAR Fatah entity PS 1S post ( pi in Std-lagic-vectoo Co to 3); eK: 10 std -10qic; Door? OVE Std-logic 3; end psi} Anchittctese ps2 of pst 15 begin process p, clk) i cod beqin PAUGOS CIR ES we if CCiktevent and cik =") then Dout 2 = 003); else Dos 4 ='0'5 Encl it; End povoctss; End ps2; % pazate in pawatiel out shift RegiShcs: ee Des)? \. | Ls mt — 510) ony 00) Counkds ove the Sequenciar escvit cahich COONTS A Nalue ana it is inesermented BY ON« Toe. EVE clock purse. Ohi Reqistes Countess: Thede ave two types of shite Registed Counter te Ring COUNTED 2 Johnson coontes. RiINg counts: role. 1 ing coontes cinco t easel the 1s also Sequencial girl AMA prom one quotlop to anoths riipflOP ehh tg Wy te fom of sing Stauctowe| CHOW, AN the FUPROPS. 18 in the claw mode. qouth Table: | —! t= LK | 80 © 83 110 0, © ee % | Oto 8 i 3 0 -o- t 0 uW ; 6 fOr Oo (1 entity, - RCi Ts poat ¢ rPOF bys hs tod | Di CIK, ReseLY I Std logics GLOOL stdeloqic-veetoo (a docan 10 0793 1 End RCN; nochitectum, Ren of bel is wasiable x: std -toqic-Vedtov (3 down to Oi, ® 1 "0000; i beqin PROCES (D, CK, Reset) . beqin «lh CUE if -WeSll =AN" aber +) X=" 1000" ; iF Cctktevent ‘cind © ake) then Be ELS : i ‘ 5 4 ; | ' Kay 22x00) | OO) 2 = KC) : fe! 36a | xC3) LF 709), : a 1X00) Loe CB ve End ify 9 3 j . ce aeexy Oo 9 : ae End if; p | End process; End RCH; : | | | | | Tobnson counted: Entity yer is Post ¢ / D, CIK, Reset? in gtd-loqics 1 is ®, 5 rout std-lodic Nectos (3,40 0,0) }j End yes . i Avchitectove you Of TI 1s variable Xt Std logic ~ Yectod ¢3 down, +0 os !="9900"5 begin’ PoACESS (D, CIK, Reset) ee : aul Tooth Table: i Reset = then i tices 1 1/990) O oO if CaK'event and elk e"")then : gee xa 2 = xK1005 tes Sc x2) 2 = KOS a HIKET s A Aye x03) 2 = KO); 6 te 4) G } RO) Z = NOE *03)} E oa End its 4 = Sow, aa 8 | 0 0:.0:0 Encl iP End poaccss; Enol sc Hs F age COLO CAD) Using or Pps IOP eairatton tabie ot Bry |. OLLe 0, ri x x aK tr: 1 the Nia o-x lx yeoth TOPIC 40% Decaded counter: HEN State ‘ a5 P _|_Nent state Flipetop_fops!s SA41 BB Best Spy 3H Ka_%6 Ke Me KE 30 KO ®o ao} 0 Qk Oa% fot © Or aofo ¥lox | x ik OO" o xjox|x |i x © 1 o ofox|r*e]xi{xt Oa a9 hie] cock |x O]ioxcis x Ot ot spl oe) x of KX ONE TA Box] xO] Olt x \ ooo PEs] eu seh Kl 1 4j0 10 sat | sx ‘o| of x] ox) tx ©6000! xilox onl xy ae 201 4408, 9,10, u1, 12,18), 15) Kas Sat A (0,1,9,3,0,56" OF 9 80 pb) Biogen 0¢Op Sete snot ae - co Ol wo e809, b BO B09 sie or oot G05 0 | 89% co tagg 1 Saag oy QB 10 Bagect) 4 MOB 19 TA = OB OCOD kA = &p Ter 3(37 +4 1H,5,6,%,10,11,12,13, 1,15) kB zs C4d(0,1,2,3,5.9, ao ye ¥® TON 19,13, 44,15) \ ooo 2 60)(o\F OF | x] x uh [x2] 2719 Jp GeO (0,1, 4, = 64,19, 19,13, tu,15). Ke =3 (3,444 9 Tees CHV 062,370,714, 99,13, to, 10 1,413, M5) Eg 60 xe af \ Co of it 10 oO Ol WN, 10 oo [Ir fey? 00 felix" : CT ae o} xe ¢ Note wa * By &SINg VDL PLOMaM in coontess the cognt Value INCBEMENLEd - 17 and counted and itis inenermented by any clock pulse by one. © In this ‘an Behaviours «ype ol! countess, the Hi! Olp counter Must be inteomedicate olp coemteas. Behavio, 7 ORS made: Entity per en Poot( . a a C)K,. eset: in std loge ; f a: out Std-loqic -vectow C3 down to 0).)5 End pens, set Dest . . : Avchitectuve- nea pel 1s Det ea VAIALIE COUN, StA-logic-vectoxlS down to 0); F yeti pHoeeS9 Cele, meget) ai it COM COOL and ayy. "9 then it (9CECE=O'Y ther J COUN C= B09" else if CCOUNL Ze 101") then cOUM 4 = count yt; ' ewe count 4 > "9000"; end (P aultiais x wake end i; i 1 O74 = count; ci eloe j ie a% ="0000"; pad te; Encl Process; f 7 EN! P0255 ra é ; ye - BIE BINADY countes: Entity Bel is posel ian cK, eset IN Std- logic; ; i OB: out std-1oqic-vectow (3 down tO 0))5 End BCI; ‘ AochikectUve BC2 of ect is YOVIADIE cOUNE ! StA~ logic -vecto6 (3 down to 03% = beqin : "0000" Powess (ctx, veset) bectin WP CciKtevent and ewe ='11) then i C-eset = 0") then count 4 = "o000 "; else : ew COUN = Count 415 erse " count 4 = ee: End ifs End ie @ 2 = count; else @z ="0000"; end End poocess; End 8023 Mop-5 Counter} 7 AA thon, 5 5 Contes : i wns sarehonees Caen) Ntity maci is Povte CiK, Beset: in Std-1oqic; @. Out Std togic-vectox(2 down 10 o)d5 E0d Maer; Avchitectube Mhc2 OF MACI 15 Variable count! std- 10g jc ~vectos (2 Bown *° ee beqin Sree Pal Poocess CCIk, teset) , beqin Pe Comtevent and cye=t) then 18 ¢ eset = to") then coont 2 = “ooo"; else i Ceoont 2 = "100") then count Z= count +s; ese End MACs COM 4 =" QQ0"; . End ie; End ie; Oz = COUN 5 ese © e="000"; End ie; End Process; “ooog! ee t ie Fn avis ot Mod 55.44 MchtoneN5 cooper: poesenl State Next state | rliptop anpors oa 8 %e | = 74 + - San py Se | A 8 £ ‘ 0 oO oO \ 0 ol oo oO 0 1 oO Lote o ': 0 ( ) Gg \ 1 Gg £0 } Te (Oro Wa 01 1) 0 jet i | OE 0 ato i O40 Saya BBW A ACH 1) W= 501,394 dt 5,08) ae ae = Anak Gone Cave. Op, We @ OC. ee am \.e. Ot 16 yvel “see inte Hoe 8" 89,9¢ on 00.01 o 7 ii Pe) Vex FCO,1,9, 394d 05,6,71) at on &o A! 109 rE IREORe r jtceD US! B-bit AsyNchdonovs ‘OP COYNE? CCrn oS vw . “vw AMM | | I TT ob { -.—— — a, a a | J tag pl | “Ya. Entity Asy is Poot TCiKi in otd-loqics | f Br inoue side toqic -vectowco to 2) End Asai) Atchitectose Asy> of Asy! 1S component TFFL is Port ¢ N, Clk in Sta-tegic; YiOok Std-toqiays 9° i End component; (Stqoiar wigy, Biya) begin i TL 1 TFFL Post map (4, ci, @COT); > TZU TEFL post map (Atay, 117, ACIDS TH. TEFL pont MAP CRE), En, aw) P End Asy2; 3- bit Asynchvonas daon counters: ns UnAA Wn UA WA 0 i —— | —s a [ ce ioe cK 80 & &) }— Entty Agr is pool 1 ciki in Sta tages MOKA! InOVe staeINate-vectod (o to 2775 fered) Ash} Avehitectore Asys of ASYT YS component TREI id port ( Vs, che: w Sea OQIE Nr aut Sta- logic ds ENc components Catqont Nov xo}, not’ at _D begin TOL TRFD podt map C1, CIR, NOt @CO) JF TZ ATEFL podt Map CNot Ato), 4, NUE BCH); TUL TFFL podt mapCNot @ ON, 4), NOE QI} End Asyas 3-Bit Y wins MIME eeyconon coupes: My , —Po— wae" Entity ASU, is Post ¢ TK In Std-1oqic AVEMOK KGAd/2 ; ™,CcIK! in std ~lagqics - : inove Std logic Nectos (0 to 29); End asyiy Aschitectuve asy ot component Non is Poot¢ XIN bits Asyl ts Nioutr bit )5 End component: Component ANDI 13 Poot ¢ ALB: in bit; Cf Out bit) Erd component} Component ORI is Poot ¢ Uv in bits Ws Out bit) End component; COMponent. TKI is Post C Ti Kisin. bit} CtK: in. bit; Swe pit); End component; Ssiqnal begin NOT2< NOTI povt Map Cm, Noe M); AND2: ANDI poot MAP (M, O0), X60); AND3 ANDI post map(NotM, Not Ot; XC); OR2 : OR\ poot map CKO), RU, WO) 75 ANDY: ANDI poot map Cm, &(9,x(3))5 AND5 ; ANDI podt map( Not N, Not QO); *U5 RZ: ORI post MAP CK(3), KUN, RBI) 5 % 1 Pabiesvectow torte 6), 0 SRIF TK) owe MAP Cr, 47 Cres OCOD) NOt M0995 e322 IKI post map co, 4, xed, acy, not OC); TRH OKI pook MAP CH Ur, Koay Glan, NOE OI); End Asy25 > B-bit gynchvon0vs YP} docon counted: WA AWM yn AMM lig PTS ty Je Og i ; hy a aK ‘ ate | ; Entity sci is a Postel a BK In std-laqics 1 fA Miciktin std -loqic; rinogt std-logic -Veckod Co to 2995 EO 8CVj. ocugshape: lid AI } ‘ aochitectove sca of scl 1S 1 component wot 16 poor C : xiin bits ia yr out bit) End component; (60° 9) component ANDI is poot¢ dle 198 AB? in bie; or oO yeotaoy c: out bit)j End components component oR\ is post C Ovi in bits wW:ove bit)s 1! s End Component; component skt 16 Poot C J, Kt Fin bits Clk + Qp bit; A:@vt biti: ENd cornponcnts signar x: bit - vectos (0 f0 "i beqio ; : Nota: Not! povt rwapeM, Not Ray AND2: ANDI pose MAPCM, BLO), «C005 ; AND3 ANDI pot MmaApENoe M, Not tor, X09 ORD: ORI POSE MAPCXcoy, KCN, K(DIIS ANDUY ANDI PODE map CM, O01, x 63795 ANDSIANDI POBE MAP CHE M, Not ACD, x CUT); ORS: ORY post MAP C139, XCY) 5x57); OK: TK) post MmAPC’, , crK, OC), Not A(0175 TkK3.TKI pow’ MOPCXEVCK, OC, NOE'QUI)S DkUs TKI POD’ HEAP C X65), ara, NOE. O29, die) 5 Erd $095 Behavious moder Cy bit sundhgenous commen) : Entity sci is PODEC aK: in bits cly, clk: in bits 8: out bit-vectos (0 to 39); End sci5 Architectoxe sc2 of Sel oe nae iS Count: bit ~vectos¢o 40 3); i Poocess C9 K, eter, ci) acing, begin : iP CCIB=N) ther Count 4="0000"; eNStE CeiKrevent and cig =") then HOM =) then count Z = count-+! ; : End psocess; ee End sc25 Count £2 count ~1; end ifs end ie; QO2-CaMt r ae . FHaxards : pve the unwanted distosbarce esansition is carted oF the the occoss at the! tine oF Hamacds Mainty oceoss Hecaose poopaqation delay: poopaqation aelad 'S time diftepence petcween inputs anc ovtpols Poopagation detay and Hazavds ace mainty occose lecaue & the gates used in the civcults: these ave 3 types of hazands: t Static Hazavd 2+ DyNamic Hazavd 3-EssenHar Hazaed. ) Static 5 Ox 1S Seat ees ave also» classitied Toto 2 EYPCS. Stake Oo Wazavd oN | 2. static | tazo~d the unexpected ovtput is zevd bot pecaus ‘of |. Poopagation delay sucldenty changes to 1 then the eype ‘pr Hazasd iS called “static to,’ Hazdee i aww “A the oncxpected potput 151 pelt. because of Propagatton delay changes too then the type’ hozasd 15 camed “stage hava’ ®. cilern “CS Qike ad Pynamnic Hazawd : AMAA Dynamic Hazavd 13 the odbot Changes 400m © 101 (0d) 1 t0.0 bot because of propagation delay, it, occu two. 0 more twansitions. TE is caned pynamre Hazavds: - * State and dynamic fazawds can be eliminate by adding gates In) the cidevit- ‘* A We 3 fosentiat Hazards: TAA Oe Acne! 19 2 40 Lesenains Marans, change of state 15 ding '4, fo BNothes Slate Hythe state rotate then iappen non one change, ef state Ig eodesined SSOMAL Werzargds 90CtS rim (o00y* 29) a) Eliroination static | Hara: In Static baron the expreted output tS 1 it's rrornentosy changes to 0 then the type ‘OF nara iS called static! hazard and ik can be eliminated by extoa gates added to thr atpoulk ‘the 0PogatlOn deletes time delay) COS fon evens ANSI? RY Inpal to the gutpots spe bet ©5 consid: | ee tom state | snc tf Sides, che cincvit diagsim 106 NaAzO-%d « BPS r Lee 68 consid the gutpul ex Oboe logic Alogwarn, elimination ot StaHe | Hoes bt adding extoa gate res . OPPIY trnens: we fe the cthuite a MOPAR a ME LV Ly t Xo 43 TH AIK K AR) HOLY K AR) Ye Xy%o % Nahe 4 you) eoD. ; VOB EM RDS AK KD X94 Fy Ry XG T2204,6,5,4) ry "OKo6d Foee Kemap +> DNAS Foce cincuit = foo the Diven fone ‘wepacsent the hazard soee clocu vsind MMP Fe 504,3,6,4,13,19) ol 0 ted cD “ p® \ 00 ott 10 Ais 0° ; AB Ot AB ABO F =ABD+ ABc+ABb Hazovd Foee K-map: _ aS cB tp Cd cb 00 ON 19 noe F=AB DLA Be+apD4 (D440 f= 2 (1,3,5,4, 8,4, 1, 15) | Enimina te the Static epee Sol: O_- ~ = eNO 25 ED cD co oo Ol tl 10

You might also like