Introduction To Processes: Dr. Yann-Hang Lee GWC 224 Yhlee@asu - Edu
Introduction To Processes: Dr. Yann-Hang Lee GWC 224 Yhlee@asu - Edu
entity traffic_light_controller
generic ( yellow_time : time;
min_hwygreen : time;
max_hwyred : time );
port (
farmroad_trip : in boolean;
farmroad_light : out color;
highway_light : out color );
end traffic_light_controller;
begin
Zvar := ‘1’;
for i in x'range loop -- for every i in the range of x
if x(i) = '0' then
Zvar := '0' ;
exit ;
end if;
end loop;
Z <= Zvar after Tprop ;
end process AND_n;
library IEEE;
use IEEE.std_logic_1164.all;
entity andcircuit is
port(
in1, in2, in3 : in std_ulogic;
out1 : out std_ulogic
);
end andcircuit;
begin
process (in1, in2)
begin
if (in1 = '1' and in2 = '1') then
net1 <= '0' ;
elsif (in1 = '0' or in2 = '0') then
net1 <= '1' ;
end if;
end process;
Even so, this is not enough to fulfill all the requirements for
initializing a model.
Signals
Used to communicate between concurrently
executing processes.
Within a process they continue to have the form
sig <= waveform ;
Means that for the signal a sequence of value
updating events is to be scheduled for the future.
Variables:
Exist within procedural bodies, like processes,
functions, and procedures. Not visible to others.
Variable assignment statements appear as follows:
var := expression;
Used within the sequential body just as in other
procedural languages.
X <= Y; X := Y;
Y <= X; Y := X;
Memory: process is
begin
DAV <= '0';
wait until Mem_Req = '1';
Data <= ROM_DATA(Address) after 50 ns;
DAV <= '1' after 60 ns;
wait until Mem_Req = '0';
end process;
CPU_Read: process is
begin
Mem_Req <= '0';
wait until ... the need for memory read ;
Address <= . . . address value . . .
Mem_Req <= '1' after 10 ns;
wait until DAV = '1';
MD_Reg <= Data;
end process;
CSE 422 page 18
label: process ( a, b, c, d ) is
where signals a, b, c, d are the sensitivity list