因此,通過我自己的研究,我明白如果我們在過程中分配信號,它將在過程後更新。現在,如果我們直接分配一個輸出值,那麼在進程之後它也會被更新或者沒有? 我附上兩個版本作爲一個簡單的例子來說明我的意思。在過程中分配信號與分配實際輸出之間的區別
版本1:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity testing is
port(
clk : in std_logic;
a : in std_logic;
b : in std_logic;
c : out std_logic
);
end testing;
architecture arch of testing is
signal temp: std_logic;
begin
process(clk)
begin
if(rising_edge(clk)) then
if(a = '1' and b = '1') then
temp <= '1'
end if;
end if;
end process;
c <= temp;
end arch;
現在另一個版本:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity testing is
port(
clk : in std_logic;
a : in std_logic;
b : in std_logic;
c : out std_logic
);
end testing;
architecture arch of Intermediate is
begin
process(clk)
begin
if(rising_edge(clk)) then
if(a = '1' and b = '1') then
C <= '1';
end if;
end if;
end process;
end arch;
是否有一個時間差在這裏?在第二個版本中,C會比第一個版本高嗎?