




版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、用quartus II軟件設(shè)計(jì)4位乘法器1.并行乘法的算法:卜而根據(jù)乘法例題來(lái)分析這種算法,題中 M4, M3, M2, M1是被乘數(shù),用M表示。N4,N3,N2,N1是乘數(shù),用N表示4/16/20122.乘法模塊Library ieee;Use ieee.std_logic_1164.all;Use ieee.std_logic_unsigned.all;Entity and4a isPort(a:in std_logic_vector(3 downto 0);en:in std_logic;r:out std_logic_vector(3 downto 0);End and4a;Archi
2、tecture behave of and4a isBeginProcess(en,a(3 downto 0)BeginIf (en=1) thenr=a;Elser=0000”;End if;End process;End behave;-and4a元件源程序library ieee;use ieee.stdjogicl 164.all;use ieee.std_logic_unsigned.all;璀 I,。)一 兩仞一entity and4a is丫 g). Q 昌mul4p=1套歹噌琢粉Proit!i_t NavigatorEnti tv * 瓣 and4a.vhd瓣 is283.vh
3、d| 辱 mul4p.vhd。Compilation Fl ep. | 旦 mul4p. vwfl幽 FLEK10K: EFF10K10LC i mul4pdb,加法模塊ModulePrugi-tjEE %JS i mill at orLHLibrary ieee;12345678910111213141516171819202122Liljrary ieee;Use ieee . stcl_ 1 gic_ 1164 .all;Use ieee std_1gic_uns igned.a11;H Ent.it.y and4a isP rt- (a: in std_lugic_vector (3
4、dunnt-u u:i ;en: in 3t.Ll_lugic;r : ut stcl_logic_vectur (3 duTiinto u :i :i ;End and4a;IS Architect, ur e toe have f ancH a isH BeginPeucess (en,r a (3 duTiintu 0) :i BeginIf (en= 1 11 ) t-hen rOa;HElser=ULIULI;End if;Encl process;End toehave;Use ieee.std_logic_1164.all;Use ieee.std_logic_unsigned.
5、all;Entity ls283 isPort (o1,o2:in std_logic_vector(3 downto 0); res:out std_logic_vector(4 downto 0); End ls283;Architecture behave of ls283 isBeginProcess(o1,o2)Beginres=(0&o1)+(0&o2);End process;End behave;4.主程序Library ieee;Use ieee.std_logic_1164.all;Use ieee.std_logic_unsigned.all;Entity mul4p i
6、sPort (op1,op2:in std_logic_vector(3 downto 0);result:out std_logic_vector(7 downto 0);End mul4p;Architecture count of mul4p iscomponent and4a port (a:in std_logic_vector(3 downto 0); en:in std_logic;r:out std_logic_vector(3 downto 0);End component;Component ls283 port (o1,o2:in std_logic_vector(3 d
7、ownto 0); res:out std_logic_vector(4 downto 0);End component;Signal sa:std_logic_vector(3 downto 0);Signal sb:std_logic_vector(4 downto 0);Signal sc:std_logic_vector(3 downto 0);Signal sd:std_logic_vector(4 downto 0);Signal se:std_logic_vector(3 downto 0);Signal sf:std_logic_vector(3 downto 0);Signa
8、l sg:std_logic_vector(3 downto 0);-signal tmp1:std_logic;Beginsg=(0&sf (3 downto 1);-tmp1op2,en=op1(1),r=se);U1:and4a port map(a=op2,en=op1(3),r=sa);U2:ls283 port map(o1=sb(4 downto 1),o2=sa,res=result(7 downto 3);U3:and4a port map(a=op2,en=op1(2),r=sc);U4:ls283 port map(o1=sc,o2=sd(4 downto 1),res=
9、sb);u5:ls283 port map(o1=sg,o2=se,res=sd);u6:and4a port map(a=op2,en=op1(0),r=sf);result(0)=sf(0);result(1)=sd(0);result(2)=sb(0);-result(7 downto 0) Compilation. | 包 mul4p.vwf | 料 Simulation R. | Pin Planner I 斷(roup 5Named:Nude Nameop2r3IniX :-op221Iniop2lOP20毒日 re5ultr7.O=_一II1TOI.CF :- resultr?O
10、lCF resultrfiOl祁 result5TCpVfeWFLBCWKEPFl0K10LC8i-*J.amed:B=| 明 Edit: _xy |PIN_50Filter: |pin:s: eNode NameDirectionLocationReservedGroup1W opl3InputPIN_28opl3.02W opl2InputPIN_29opl3.03 opllInputPIN_30opl3,.0qW opl0InputPIN_35opl3.05W op23InputPIN_47op23.06op22InputPIN_48op23.07W op2lInputPIN_49op23.08op20InputPIN_50op23.09涉 re5ult7OutputPIN_61result7.O10枝 result6OutputPIN_60result7.O11涉 result5OutputPIN_59result7.O12祁 result4OutputPIN_58result7.O13涉 re5ult3OutputPIN_54result7.O14枝 result2OutputPIN_53result7.O15涉 resultlOutputPIN
溫馨提示
- 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ù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 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ì)自己和他人造成任何形式的傷害或損失。
最新文檔
- T-ZSA 231-2024 氧化鎵單晶片X 射線雙晶搖擺曲線半高寬測(cè)試方法
- T-ZMDS 10022-2024 光學(xué)脊柱測(cè)量及姿態(tài)評(píng)估設(shè)備
- 二零二五年度名義購(gòu)房代持合同中的房產(chǎn)繼承與轉(zhuǎn)讓安排
- 2025年度高品質(zhì)車位租賃與社區(qū)設(shè)施管理合同
- 二零二五年度安全生產(chǎn)評(píng)價(jià)資質(zhì)借用服務(wù)合同
- 2025年度高速公路監(jiān)控系統(tǒng)維保服務(wù)協(xié)議雙聯(lián)
- 二零二五年度解除勞動(dòng)合同通知書及員工離職后商業(yè)保險(xiǎn)權(quán)益處理及終止協(xié)議
- 2025年度電力系統(tǒng)設(shè)備租賃合同模板
- 2025年美業(yè)美容儀器銷售代表入職合同
- 二零二五年度淘寶平臺(tái)商家入駐信息保密協(xié)議
- GB/T 24498-2025建筑門窗、幕墻用密封膠條
- 悟哪吒精神做英雄少年開(kāi)學(xué)第一課主題班會(huì)課件-
- 清華大學(xué)第二彈:DeepSeek賦能職場(chǎng)-從提示語(yǔ)技巧到多場(chǎng)景應(yīng)用
- 2025年P(guān)EP人教版小學(xué)三年級(jí)英語(yǔ)下冊(cè)全冊(cè)教案
- 2025年春季學(xué)期教導(dǎo)處工作計(jì)劃及安排表
- 2024年江蘇省中小學(xué)生金鑰匙科技競(jìng)賽(高中組)考試題庫(kù)(含答案)
- 新質(zhì)生產(chǎn)力的綠色意蘊(yùn)
- DL-T5002-2021地區(qū)電網(wǎng)調(diào)度自動(dòng)化設(shè)計(jì)規(guī)程
- 2024年個(gè)人信用報(bào)告(個(gè)人簡(jiǎn)版)樣本(帶水印-可編輯)
- 16J914-1 公用建筑衛(wèi)生間
- 2024年長(zhǎng)沙幼兒師范高等??茖W(xué)校高職單招(英語(yǔ)/數(shù)學(xué)/語(yǔ)文)筆試歷年參考題庫(kù)含答案解析
評(píng)論
0/150
提交評(píng)論