VHDL流水線加法器_第1頁(yè)
VHDL流水線加法器_第2頁(yè)
VHDL流水線加法器_第3頁(yè)
VHDL流水線加法器_第4頁(yè)
VHDL流水線加法器_第5頁(yè)
已閱讀5頁(yè),還剩3頁(yè)未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(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譯碼器源代碼:LIBRARYieee;USEdc38ISPORT(sel:instd_logic_vector(2downto0);y:outstd_logic_vector(7downto0);ENDdc38;ARCHITECTUREbehaviorOFdc38ISBEGINy<=""WHENsel="000"else""WHENsel="001"else""WHENsel=&q

2、uot;010"else""WHENsel="011"else""WHENsel="100"else""WHENsel="101"else""WHENsel="110"else"01111111"WHENsel="111"else"ZZZZZZZZ"ENDbehavior;仿真結(jié)果:一位全加器ABCISCO0000000110010100110110010101011

3、100111111四級(jí)流水加法器第四級(jí)鎖存器一位全加器第三級(jí)鎖存器一位全加器A * H第二級(jí)鎖存器一位全加器級(jí) 鎖 存 器一位全加器libraryieee;useadderisport(clk,rst:instd_logic;a,b:instd_logic_vector(3downto0);sum:outstd_logic_vector(3downto0);c:outstd_logic);endentityadder;architecturedepictofadderissignalreg1:std_logic_vector(7downto0);signalreg2:std_logic_vec

4、tor(6downto0);signalreg3:stdlogicvector(5downto0);beginbit0:process(clk,rst)beginif(rst='1')thenreg1<="00000000"elsif(rising_edge(clk)thenreg1(0)<=a(0)xorb(0);reg1(1)<=a(0)andb(0);reg1(2)<=a(1);reg1(3)<=b(1);reg1(4)<=a(2);reg1(5)<=b(2);reg1(6)<=a(3);reg1(7)&

5、lt;=b(3);endif;endprocessbit0;bit1:process(clk,rst)beginif(rst='1')thenreg2<="0000000"elsif(rising_edge(clk)thenreg2(0)<=reg1(0);reg2(1)<=reg1(1)xorreg1(2)xorreg1(3);reg2(2)<=(reg1(1)andreg1(2)or(reg1(1)andreg1(3)or(reg1(2)andreg1(3);reg2(6downto3)<=reg1(7downto4);en

6、dif;endprocessbit1;bit2:process(clk,rst)beginif(rst='1')thenreg3<="000000"elsif(rising_edge(clk)thenreg3(1downto0)<=reg2(1downto0);reg3(2)<=reg2(2)xorreg2(3)xorreg2(4);reg3(3)<=(reg2(2)andreg2(3)or(reg2(2)andreg2(4)or(reg2(3)andreg2(4);reg3(5downto4)<=reg2(6downto5);

7、endif;endprocessbit2;bit3:process(clk,rst)beginif(rst='1')thensum<="0000"c<='0'elsif(rising_edge(clk)thensum(2downto0)<=reg3(2downto0);sum(3)<=reg3(3)xorreg3(4)xorreg3(5);reg3(5)or(reg3(4)andc<=(reg3(3)andreg3(4)or(reg3(3)andreg3(5);endif;endprocessbit3;endde

8、pict;libraryieee;usenoaddisport(clk,rst:instd_logic;a,b:instd_logic_vector(3downto0);sum:outstd_logic_vector(3downto0);c:outstd_logic);endentitynoadd;architecturedepictofnoaddissignalreg:std_logic_vector(4downto0);signalrega:std_logic_vector(4downto0);signalregb:std_logic_vector(4downto0);beginproce

9、ss(clk)beginif(rising_edge(clk)thenrega<='0'&a;regb<='0'&b;endif;endprocess;process(clk)beginif(rst='1')thenreg<="00000"elsif(rising_edge(clk)thenreg<=rega+regb;endif;endprocess;sum<=reg(3downto0);c<=reg(4);enddepict;4位十進(jìn)制數(shù)計(jì)數(shù)器libraryieee;us

10、edec_dispisport(clk_cnt:instd_logic;sel1:outstd_logic_vector(3downto0);sel2:outstd_logic_vector(3downto0);sel3:outstd_logic_vector(3downto0);sel4:outstd_logic_vector(3downto0);enddec_disp;architecturebehavofdec_dispissignalsignalsignalsignaldata1data2data3data4std_logic_vector(3downto0);std_logic_ve

11、ctor(3downto0);std_logic_vector(3downto0);std_logic_vector(3downto0);begincount:process(clk_cnt)beginif(rising_edge(clk_cnt)thenif(data1="1001")thendata1<="0000"elseif(data2="1001")thendata2<="0000"data1<=data1+1;elseif(data3="1001")thendata

12、3<="0000"data2<=data2+1;elseif(data4="1001")thendata4<="0000"data3<=data3+1;elsedata4<=data4+1;endif;endif;endif;endif;endif;endprocesscount;sel1<=data1;sel2<=data2;sel3<=data3;sel4<=data4;endbehav;正弦波發(fā)生器文件data_radix=dec;1:134;depth=256;conten

13、t2:137;width=8;begin3:141;address_radix=dec;0:131;4:144;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;59:255;103:199;16:180;60:255;

14、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;72:253;116:162;29:214;73:252;117:159;30:216

15、;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;43:241;87:234;131:11

16、5;44:242;88:233;132:112;45:244;89:231;133:109;46:245;90:229;134:106;47:246;91:227;135:103;48:247;92:225;136:10;137:97;181:4;225:42;138:94;182:3;226:44;139:91;183:2;227:47;140:88;184:2;228:49;141:85;185:1;229:52;142:82;186:1;230:54;143:79;187:1;231:57;144:76;188:0;232:60;145:73;189:0;233:62;146:70;19

17、0:0;234:65;147:68;191:0;235:68;148:65;192:0;236:70;149:62;193:0;237:73;150:60;194:0;238:76;151:57;195:1;239:79;152:54;196:1;240:82;153:52;197:1;241:85;154:49;198:2;242:88;155:47;199:2;243:91;156:44;200:3;244:94;157:42;201:4;245:97;158:40;202:5;246:100;159:37;203:6;247:103;160:35;204:6;248:106;161:33;205:7;249:109;162:31;206:9;250:112;163:29;207:10;251:11

溫馨提示

  • 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝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ì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論