Professional Documents
Culture Documents
VHDL
VHDL process
If statement
Case statement
VHDL process
process(sensitivity_list)
declarations;
begin
sequential statement;
sequential statement;
...
end process;
3
Process
Process
Wait statements
Process continues the execution until a wait statement is reached and then suspended
Forms of wait statement:
wait on signals;
wait until boolean_expression;
wait for time_expression;
Sequential signal
assignment statement
Sequential signal
assignment statement
process(a,b,c,d)
process(a,b,c,d)
begin
begin
y <= a or c;
y <= c and d;
y <= a and b;
end process;
y <= c and d;
end process;
Variable assignment
statement
Syntax
variable_name := value_expression;
Variable assignment
statement
process(a,b)
process(a,b)
begin
begin
tmp := '0';
tmp0 := '0';
tmp := tmp or a;
tmp1 := tmp0 or a;
tmp := tmp or b;
tmp2 := tmp1 or b;
y <= tmp;
y <= tmp2;
end process;
end process;
10
IF statement
Syntax
if boolean_expr_1 then
sequential_statements;
else
sequential_statements;
end if;
11
IF statement
Examples
- 4 to 1 Multiplexer Home work
- 2 to 4 Decoder Homework
- 4 to 2 Priority encoder
12
13
14
15
Incomplete branch
16
Incomplete signal
assignment
17
Conceptual interpretation
18
Conceptual interpretation
19
Case statement
Syntax
case case_expression is
when choice_1 =>
sequential statements;
.
.
when choice_n =>
sequential statements;
end case;
20
Examples
4 to 1 multiplexer
2 to 4 decoder Homework
4 to 2 priority encoder
21
Comparison to selected
signal assignment
22
Incomplete signal
assignment
23
Conceptual
implementation
24
Syntax :
for index in loop_range loop
sequential statements;
end loop;
26
27
Conceptual
implementation
y<= temp(3);
28
Notes
29