


版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、可編程實(shí)驗(yàn)報(bào)告實(shí)驗(yàn)報(bào)告要求:1、任務(wù)的簡(jiǎn)單描述2、畫出電路圖3、寫出源代碼4、仿真結(jié)果5、分析和討論1、3-8譯碼器源代碼:LIBRARY ieee;USE ieee.std_logic_1164.all;USE ieee.std_logic_arith.all;USE ieee.std_logic_sig ned.all;ENTITY dc38 ISP0RT(sel :in stdogic_vector(2 downto 0);y :out stdogic_vector(7 downto 0);END dc38;ARCHITECTURE behavior OF dc38 ISBEGINy &
2、lt;= "11111110" WHEN sel = "000" else "11111101" WHEN sel = "001" else "11111011" WHEN sel = "010" else "11110111" WHEN sel = "011" else "11101111" WHEN sel = "100" else "11011111" WHEN sel
3、= "101" else "10111111" WHEN sel = "110" else "01111111" WHEN sel = "111" else "ZZZZZZZZ"«««««««« JEND behavior;仿真結(jié)果:一位全加器比 MA-rplu-G 'll 刊* E<Sr V*w Synh>!巳趴辛* l>ifleii Woof Whdew 怖蟲n曲百看
4、 曇 蚪缶蛹竊©總也藥E蛋耳衛(wèi)4吒蠱迫簽勺耳三±>瓦11: I* Tiaw 何晁49D 加&I» ri世I可債i一_ rilMMMi; d d|_托 母 BBB幷n MAK»*Lii I 曲丄Kmudd ftJ諾,史I igqrfk l勒*d口U% ll 刊中 Edr View Had中斗料審 Lnh-rt 葉。皿 W-da-比切nqs嚴(yán)橋心囲用目總占險(xiǎn)國(guó)菟ed6吧港雯澧朋四級(jí)流水加法器立第(位 全 加 l=LH、一位全加器第鎖存library ieee;use ieee.stdo gic_1164.all;use ieee.std_log
5、ic_ un sig ned.all;use ieee.std_logic_arith.all;en tity adder isport(clk,rst : in std_logic;a,b : in std_logic_vector(3 dow nto 0); sum : out std_logic_vector(3 dow nto 0); c : out std_logic);end en tity adder;architecture depict of adder issignal reg1: std_logic_vector(7 dow nto 0); signal reg2: st
6、d_logic_vector(6 dow nto 0); signal reg3: std_logic_vector(5 dow nto 0); beginbitO:process(clk,rst)beginif(rst='1') the n reg1<="00000000"elsif(ris in g_edge(clk) the n reg1(0)<= a(0) xor b(0);reg1(1)<= a(0) and b(0);reg1(2)<= a(1);reg1(3)<= b(1);reg1(4)<= a(2);re
7、g1(5)<= b(2);reg1(6)<= a(3);reg1(7)<= b(3);end if;end process bit0;bit1:process(clk,rst)beginif(rst='1') the nreg2<="0000000"elsif(ris in g_edge(clk) the nreg2(0)<= reg1(0);reg2(1)<= reg1(1) xor reg1(2) xor reg1(3);reg2(2)<=(reg1(1)andreg1(3)or(reg1(2)a nd reg1
8、(3);reg2(6 dow nto 3)<=reg1(7 dow nto 4);end if;end process bit1;bit2:process(clk,rst)beginif(rst='1') the nreg3<="000000"elsif(ris in g_edge(clk) the nreg3(1 dow nto 0)<=reg2(1 dow nto 0); reg3(2)<=reg2(2)xor reg2(3)xor reg2(4);reg3(3)<=(reg2(2)a ndreg2 (3) )or(reg2
9、(2)a ndreg2(4);reg3(5 dow nto 4)<=reg2( 6 dow nto 5);end if;end process bit2;bit3:process(clk,rst)beginif(rst='1') the nsum<="0000"c<='0'elsif(ris in g_edge(clk) the nsum(2 dow nto 0)<=reg3(2 dow nto 0);sum(3) <=reg3(3)xor reg3(4)xor reg3(5);c<=(reg3 (3) a
10、 ndreg3(4)or(reg3(3)a ndreg1(2)or(reg1(1)a ndreg2 (4) )or(reg2(3)a ndreg3(5)or(reg3(4)a ndreg3(5);end if;end process bit3;end depict;二 Tamo 陽(yáng)nggytsn: MAXI 譏*id彈比F ,adiih<M 鼻砂a mw4 fngnu4Jnn*H»i ,7gi.呂呼M4J 9Wmt1dta1i r ii i i i i1 rf 1 f£«LD7-nrXV AF;?。籅 IDT、r12" 1K j« K L
11、1 J(_j JL1 J. J Jt(3 訓(xùn)D T'K 2K¥rx t* T w乍-X飛 1 U J « :詁丫I1】右】.苯;qD-00I *Xi1尬一:t ;a MAM-rphri II 貝tr Edr 5e Nodt-Q¥4on« HMow Hr|pn啟肴雖魄鎖園出皿匪匹鬲序也甘覺蠱怕澄冊(cè)ci ,s 3 ? *(. 匚 rm 昨 1library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_ un sig ned.all;use ieee.std_logic_arith.all;e
12、n tity n oadd isport(clk,rst : in std_logic;a,b : in std_logic_vector(3 dow nto 0); sum : out std_logic_vector(3 dow nto 0); c : out std_logic);end en tity no add;architecture depict of no add issig nal reg : std_logic_vector(4 dow nto 0);sig nal rega: std_logic_vector(4 dow nto 0);sig nal regb: std
13、_logic_vector(4 dow nto 0);beginprocess(clk)beginif(risi ng_edge(clk)the nrega<='0' & a;regb<='0' & b;end if;end process;process(clk)beginif(rst='1')the nreg<="00000"elsif(ris in g_edge(clk)the nreg<=rega+regb;end if;end process;sum<=reg(3 dow
14、 nto 0);c<=reg(4);end depict;4位十進(jìn)制數(shù)計(jì)數(shù)器library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_ un sig ned.all;use ieee.std_logic_arith.all;en tity dec_disp is port( clk_c nt : in std_logic;sel1 : out std_logic_vector(3 dow nto 0); sel2 : out std_logic_vector(3 dow nto 0);sel3 : out std_logic_
15、vector(3 dow nto 0);sel4 : out std_logic_vector(3 dow nto 0);end dec_disp;architecture behav of dec_disp issig naldata1:std_logic_vector(3 dow nto 0);sig naldata2:std_logic_vector(3 dow nto 0);sig naldata3:std_logic_vector(3 dow nto 0);sig naldata4:std_logic_vector(3 dow nto 0);begincoun t:process(c
16、lk_c nt)beginif(risi ng_edge(clk_cnt)the n if(data 1="1001")the n data1<="0000"else if(data2="1001")the n data2<="0000" data1<=data1+1;else if(data3="1001")the n data3<="0000" data2<=data2+1;else if(data4="1001")the
17、 n data4<="0000" data3<=data3+1;else data4<=data4+1;end if;end if;end if;end if;end if;end process count;sel1<=data1;sel2<=data2;sel3<=data3;sel4<=data4;end behav;vQV»iu n Hi口蘭加“2 £ T 士32*Jh. n I?血_9»OHbZd叵fhil«ll*i| I He 12 hi 工應(yīng) 1h 3te 14U- J 5rit
18、 4-K» 5«ufl BVk EX t.h# T£uc I Qua Bg 9 瞰 l.bi Pnjuu JL L JJLTL JUUL LUL'LLUtfLULIT lJinJE LJ JLrLl'J'Jt'LT_TLIL JJll L'LltTLLfLTL'MD3*正弦波發(fā)生器sin .mif 文件depth=256;width=8;address_radix=dec;data_radix=dec; contentbegin43:241;87:234;0: 131;44:242;88:233;1: 134;45:
19、244;89:231;2: 137;46:245;90:229;3: 141;47:246;91:227;4: 144;48:247;92:225;5: 147;49:249;93:223;6: 150;50:250;94:221;7: 153;51:250;95:219;8: 156;52:251;96:216;9: 159;53:252;97:214;10: 162;54:253;98:212;11: 165;55:254;99:209;12: 168;56:254;100:207;13: 171;57:255;101:204;14: 174;58:255;102:202;15: 177;
20、59:255;103:199;16: 180;60:255;104:196;17: 183;61:255;105:194;18: 186;62:255;106:191;19: 188;63:255;107:188;20: 191;64:255;108:186;21: 194;65:255;109:183;22: 196;66:255;110:180;23: 199;67:255;111:177;24: 202;68:255;112:174;25: 204;69:255;113:171;26: 207;70:254;114:168;27: 209;71:254;115:165;28: 212;7
21、2:253;116:162;29: 214;73:252;117:159;30: 216;74:251;118:156;31!219;75:250;119:153;32:221;76:250;120:150;33:223;77:249;121:147;34:225;78:247;122:144;35:227;79:246;123:141;36:229;80:245;124:137;37:231;81:244;125:134;38:233;82:242;126:131;39:234;83:241;127:128;40:236;84:239;128:125;41:238;85:238;129:122;42:239;86:236;130:119;131:115;175:10;219:29;132:112;176:9;220:31;133:109;177:7;221:33;134:106;178:6;222:35;135:103;179:6;223:37;136:10;180:5;224:40;137:97;181:4;225:42;1
溫馨提示
- 1. 本站所有資源如無(wú)特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025年法律職業(yè)資格考試主要知識(shí)點(diǎn)試題及答案
- 比亞迪入職培訓(xùn)
- 企業(yè)培訓(xùn)課件
- 承臺(tái)安全教育培訓(xùn)
- 競(jìng)選護(hù)理總帶教
- 素質(zhì)教育評(píng)價(jià)體系構(gòu)建與實(shí)施路徑
- 腫瘤科護(hù)患工休座談會(huì)
- 幼兒園小班美術(shù)種子粘貼畫教案
- 員工制度管理制度培訓(xùn)
- 部門培訓(xùn)方案
- 新生兒糖尿病喂養(yǎng)指導(dǎo)
- 山西省太原市(2024年-2025年小學(xué)五年級(jí)語(yǔ)文)統(tǒng)編版期末考試(下學(xué)期)試卷及答案
- 住院患者跌倒、墜床、壓力性損傷的風(fēng)險(xiǎn)評(píng)估及管理
- 2023風(fēng)光互補(bǔ)路燈設(shè)計(jì)方案
- 2023年山東省夏季普通高中學(xué)業(yè)水平合格考試會(huì)考生物試題及參考答案
- 2024年山東省青島市中考英語(yǔ)試卷附答案
- 材料力學(xué)(山東聯(lián)盟-中國(guó)石油大學(xué)(華東))智慧樹知到期末考試答案章節(jié)答案2024年中國(guó)石油大學(xué)(華東)
- 江西省南昌二中心遠(yuǎn)教育集團(tuán)九灣學(xué)校2023-2024學(xué)年八年級(jí)下學(xué)期期末考試物理試題
- 深入理解Nginx(模塊開發(fā)與架構(gòu)解析)
- MOOC 中國(guó)文化概論-華南師范大學(xué) 中國(guó)大學(xué)慕課答案
- 初中人教版八年級(jí)下冊(cè)期末物理真題模擬試卷經(jīng)典套題
評(píng)論
0/150
提交評(píng)論