L10 Process
L10 Process
• ➜ Processes
05.2023 4
Anatomy of a Process
05.2023 6
PROCESS with a SENSITIVITY
LIST
• List of signals to which
the process is sensitive.
• Whenever there is an
event on any of thesignals
in the sensitivity list, the
process fires. label:
• Every time the process process (sensitivity list)
fires, it will run in its declarations
entirety.
begin
sequential statements
end process;
05.2023
wait statements are NOT ALLOWED in a process 7
with a sensitivity list.
Processes – Semantics
1. An event on a sensitive signal occurs, or
2. Certain amount of delay has passed.
05.2023 10
Wrong Processes
priority: process(a, b)
begin
wait on a, b;
c <= a and b;
end process;
wait on signal_list;
-- wait on a, b;
05.2023 13
Process for Conditional Concurrent Signal
Assignment – IF Statement
architecture arch of ex is
To model a combinational
begin circuit, all input signals, all
process(a, b, c, m, n) signals in conditions and
signals on RHS of signal
begin assignments must be included
if m=n then in the sensitivity list!
r <= a + b + c;
elsif m > 0 then
r <= a – b;
else
r <= c + 1;
end if;
end process;
05.2023 end architecture arch; 14
If Statement – Syntax
if boolean_expr_1 then
sequential_statements;
elsif boolean_expr_2 then
sequential_statements;
elsif boolean_expr_3 then
sequential_statements;
...
else
sequential_statements;
end if;
05.2023 15
Process for Selected Concurrent Signal
Assignment
architecture arch of ex is
begin
with sel select
r <= a + b + c when “00” else
a – b when “10” else
c + 1 when others;
end architecture arch;
05.2023 16
Process for Selected Concurrent Signal
Assignment – Case Statement
architecture arch of ex is
begin
process(a, b, c, sel)
begin
case sel is
when “00” =>
r <= a + b + c;
when “10” =>
r <= a – b;
when others =>
r <= c + 1;
end case;
end process;
end architecture arch;
05.2023 17
Case Statement – Syntax
case case_expression is
when choice_1 =>
sequential statements;
when choice_2 =>
sequential statements;
...
when choice_n =>
sequential statements;
end case;
05.2023 18
Comparison to Concurrent Statements
05.2023 21
Signal Assignments in Processes (1)
05.2023 22
Signal Assignments in Processes (2)
-- Is this process the
-- right model?
process (d1, d2, d3)
begin
s <= d1 xor d2;
o <= s and d3;
end process;
05.2023 23
Signal Assignments in Processes (3)
-- Is this process the
-- right model?
process (d1, d2, d3, s)
begin
s <= d1 xor d2;
o <= s and d3;
end process;
05.2023 24
Signal Assignments in Processes (4)
process (d1, d2, d3, s)
begin
s <= d1 xor d2; process (d1, d2, d3, s)
o <= s and d3; begin
end process; o <= s and d3;
s <= d1 xor d2;
end process;
05.2023 25