2 回答

TA貢獻(xiàn)1878條經(jīng)驗(yàn) 獲得超4個贊
如何定義component,是直接編寫需要的文件vhd 文件嗎,與一般的普通vhd文件有何不同?
2.如何調(diào)用component,能不能有簡單的例子來解釋一下?
3.component里面的generic以及后面括號里的是什么內(nèi)容?
4.舉個最簡單的例子,構(gòu)建一個8bit寄存器,調(diào)用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;
以下調(diào)用dff作為component構(gòu)建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ā)器是不是可以可有有直接通過編程實(shí)現(xiàn)或者通過從小到大構(gòu)建(比如先dff,然后以dff為component來往上構(gòu)建更復(fù)雜的元件)
- 2 回答
- 0 關(guān)注
- 1721 瀏覽
添加回答
舉報(bào)