a:IN STD_ LOGIC_VECTOR(7 DOWNTO O HGH=7 LOW- RIGHT-O LEFT-7 RANGE-7 DOWNTO O LENGTH-8
a : IN STD_LOGIC_VECTOR(7 DOWNTO 0) • ‘HIGH - 7 • ‘LOW - 0 • ‘RIGHT - 0 • ‘LEFT - 7 • ‘RANGE - 7 DOWNTO 0 • ‘LENGTH - 8
WAIT Statements WAT语句使进程挂起 WAIT [sensitivity_clause] [condition_clausel [timeout_clause] sensitivity_clause: wait on clockt condition clause: until boolean expression wait until clock=“1’3 timeout_clause: for time_expression wait for 150 ns;
WAIT Statements • WAIT语句使进程挂起 • WAIT [sensitivity_clause] [condition_clause] [timeout_clause] sensitivity_clause: on signal_name{, signal_name} wait on clock; condition_clause: until boolean_expression wait until clock = ‘1’; timeout_clause: for time_expression wait for 150 ns;
进程的(wait)等效描述 敏感信号( sensitive signals)与WAT ON process (a,b, cin) process begin begin sum < a XOR b XOR cin; sum <e a XoRb XOR cin; end process wait on a, b, cin; end process; 如果使用了 sensitivity_list,在 process中就不能使用WAT 语句 如果使用了WAT语句,在 process中就不能使用 sensitivity_list
进程的(wait)等效描述 • 敏感信号(sensitive signals)与WAIT ON process (a, b, cin) process begin begin sum <= a XOR b XOR cin; sum <= a XOR b XOR cin; end process; wait on a, b, cin; end process; NOTE: 如果使用了sensitivity_list,在process中就不能使用WAIT 语句 如果使用了WAIT语句,在process中就不能使用 sensitivity_list
IE-THENELSE VS WATIUNTIL Entity testl is IBRARY IEEE Entity testl is lport(clk, d: in bit SE IEEE std logic 1164. all port(clk, d: in bit q: out bit) ENTITY tdff IS q: out bit) nd test PORT(clk, d: in std_logic, end testl architecture testl b of testl is q: out std_logic); architecture testl b of testl gl END toff. begin process(clk, d) architecture behaviour OF tdff IS process(clk) BEGIN begin begin PROCESS if(clk="1'and clk'event)then if(clk='1")then q<=d; BEGIN <=d end if rait until clk=1 end if end proces d; end process lend test1 b END PROCESS end testl ENd behaviour 0aene题
IF-THEN-ELSE vs WATI UNTIL LIBRARY IEEE; USE IEEE.std_logic_1164.all; ENTITY tdff IS PORT(clk, d: in std_logic; q : out std_logic); END tdff; architecture behaviour OF tdff IS BEGIN PROCESS BEGIN wait until clk = '1'; q <= d; END PROCESS; END behaviour; Entity test1 is port (clk, d : in bit; q : out bit); end test1; architecture test1_b of test1 is begin process (clk) begin if (clk = ‘1’) then q <= d; end if; end process; end test1_b; Entity test1 is port (clk, d : in bit; q : out bit); end test1; architecture test1_b of test1 is begin process (clk,d) begin if (clk = ‘1’ and clk’event) then q <= d; end if; end process; end test1_b;