名稱:基于FPGA的三位數(shù)的非負(fù)加法器設(shè)計(jì)VHDL代碼VIVADO仿真
軟件:VIVADO
語言:VHDL
代碼功能:
實(shí)驗(yàn)室任務(wù)書
在FPGA中實(shí)現(xiàn)對通用邏輯和DSP元件(使用 Xilinx Ip核生成器)的和,差,移位,循環(huán)移位和乘法運(yùn)算。輸入采用板上的按鈕和滑塊,輸出采用LED指示燈。
需要
1.兩個(gè)非負(fù)三位數(shù)的加法器。
個(gè)數(shù)字設(shè)備必須有兩個(gè)三位輸入(滑塊)和四個(gè)輸出(發(fā)光二極管)。在進(jìn)行加法操作時(shí),必須考慮位溢出的可能性。要做到這一點(diǎn),必須將項(xiàng)中的位數(shù)增加1。
使用以下模板聲明模塊接口
FPGA代碼Verilog/VHDL代碼資源下載:www.hdlcode.com
演示視頻:
設(shè)計(jì)文檔:
1. 硬件連接
X1連滑塊的0~2,x1連滑塊的3~5;y連LED的0~3。
2. 工程文件
3. 程序文件
4. 程序編譯
5. RTL圖
實(shí)現(xiàn)圖
6. Testbench
7. 仿真圖
8. Tcl信息
部分代碼展示:
--?Company:? --?Engineer:? --? --?Create?Date:?2021/12/06?22:57:06 --?Design?Name:? --?Module?Name:?test?-?Behavioral --?Project?Name:? --?Target?Devices:? --?Tool?Versions:? --?Description:? --? --?Dependencies:? --? --?Revision: --?Revision?0.01?-?File?Created --?Additional?Comments: --? ---------------------------------------------------------------------------------- library?IEEE; use?IEEE.STD_LOGIC_1164.ALL; --?Uncomment?the?following?library?declaration?if?using --?arithmetic?functions?with?Signed?or?Unsigned?values --use?IEEE.NUMERIC_STD.ALL; --?Uncomment?the?following?library?declaration?if?instantiating --?any?Xilinx?leaf?cells?in?this?code. --library?UNISIM; --use?UNISIM.VComponents.all; entity?test?is --??Port?(?); end?test;
代碼文件(付費(fèi)下載):
點(diǎn)擊鏈接獲取代碼文件:http://www.hdlcode.com/index.php?m=home&c=View&a=index&aid=833