找回密碼
 立即注冊(cè)

QQ登錄

只需一步,快速開(kāi)始

搜索
查看: 5789|回復(fù): 0
收起左側(cè)

VHDL除法器宏模塊及編程調(diào)用

[復(fù)制鏈接]
ID:262 發(fā)表于 2014-10-17 18:51 | 顯示全部樓層 |閱讀模式
1.在要調(diào)用項(xiàng)目的文件夾創(chuàng)建除法器宏模塊
    按下圖設(shè)置和添加宏模塊
































Library ieee;
Use ieee.std_logic_1164.all;
Use ieee.std_logic_unsigned.all;
Use ieee.std_logic_arith.all;
Entity dddd is
Port(a:in std_logic_vector(6 downto 0);
     b:in std_logic_vector(3 downto 0);
   x:out std_logic_vector(6 downto 0);
   y:out std_logic_vector(3 downto 0));
end ;
architecture dd of dddd is
--------定義調(diào)用宏模塊
component chufa is
port(numer:in std_logic_vector(6 downto 0);
     denom:in std_logic_vector(3 downto 0);
   quotient:out std_logic_vector(6 downto 0);
     remain:out std_logic_vector(3 downto 0) );
end component;
-----------------結(jié)束定義
begin
U:chufa port map(a,b,x,y);  -----調(diào)用
end;

回復(fù)

使用道具 舉報(bào)

本版積分規(guī)則

手機(jī)版|小黑屋|51黑電子論壇 |51黑電子論壇6群 QQ 管理員QQ:125739409;技術(shù)交流QQ群281945664

Powered by 單片機(jī)教程網(wǎng)

快速回復(fù) 返回頂部 返回列表