2 回答

TA貢獻1878條經驗 獲得超4個贊
如何定義component,是直接編寫需要的文件vhd 文件嗎,與一般的普通vhd文件有何不同?
2.如何調用component,能不能有簡單的例子來解釋一下?
3.component里面的generic以及后面括號里的是什么內容?
4.舉個最簡單的例子,構建一個8bit寄存器,調用8個DFF觸發(fā)器,整個過程
5.感激!
--以下定義dff
library ieee;
use ieee.std_logic_1164.all;
entity dff is
port( clk, D : in std_logic;
Q : out std_logic
);
end dff;
architecture arch_dff of dff is
begin
process(clk)
begin
if(clk'event and clk='1') then
Q<=D;
end process;
以下調用dff作為component構建8bit register并行入并行出PIPO 觸發(fā)器
library ieee;
use ieee.std_logic_1164.all;
entity reg_8bit is
port( clk, clr : in std_logic;
x : in std_logic_vector(7 down to 0);
y: out std_logic_vector(7down to 0)
);
end reg_8bit;
architecture arch_reg_8bit of reg_8bit is
不知道前面有沒有寫對,然后后面也不知道了,求助...
還有,8bit 觸發(fā)器是不是可以可有有直接通過編程實現(xiàn)或者通過從小到大構建(比如先dff,然后以dff為component來往上構建更復雜的元件)
- 2 回答
- 0 關注
- 1736 瀏覽
添加回答
舉報