【正文】
進行功能仿真; ? ⑵能在 EDA實驗系統(tǒng)上進行硬件驗證測試。順序語句只能用在進程與子程 序中。 常用的順序描述語句: 賦值語句; if語句; case語句; loop語句; next語句; exit語句;子程序; return語句; wait語句; null語句。 3)有效范圍的不同: 信號:程序包、實體、結(jié)構(gòu)體;全局量。 ARCHITECTURE {SIGNAL Declarations} label1: PROCESS {VARIABLE Declarations} label2: PROCESS {VARIABLE Declarations} ┇ 4)賦值行為的不同: 信號賦值延遲更新數(shù)值、時序電路; 變量賦值立即更新數(shù)值、組合電路。 begin process(…) begin a = b。 end process。 architecture rtl of ex is signal a : std_logic。 … end process。 ... end process。 例:信號賦值與變量賦值的比較 信號賦值: architecture rtl of sig is signal a,b : std_logic。 b = a 。 end rtl 。 定義變量 begin a := b 。 end process 。 結(jié)果是 a和 b的值都等于 b的初值 例:變量賦值實現(xiàn)循環(huán)語句功能 process(indicator, sig) variable temp : std_logic。 for i in 0 to 3 loop temp:=temp xor (sig(i) and indicator(i))。 output = temp。 以上語句等效為: process(indicator, sig) variable temp : std_logic 。 temp :=temp xor (sig(0) and indicator(0))。 temp :=temp xor (sig(2) and indicator(2))。 output = temp 。 如改為信號,則無法實現(xiàn)原功能: …… signal temp : std_logic。 temp=temp xor (sig(0) and indicator(0))。 temp=temp xor (sig(2) and indicator(2))。 output = temp 。 轉(zhuǎn)向控制 語句 轉(zhuǎn)向控制語句通過條件控制開關(guān)決定