
































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

































































Sequential VHDL constructions
Differences between signal and
variable processing
process
Sum1 and sum2 are variables p1: process variable sum1, sum2: integer; begin wait for 10 ns; sum1:=sum1+1; sum2:=sum1+1; end process ;
Global variables
Architecture bhv of ex is
shared variable v: std_logic_vector(3 downto 0);
begin
p0: process (a, b) begin v:=a & b; end process ; p1: process (d) begin if v=“0110” then c<=d; else c<=( others =>‘0’); end if ; end process ;
end ;
Docsity.com
Process statement
If the state is Waiting, a condition must be satisfied, e.g. wait until clk=‘1’;.
This means that the process will start when clk has a rising edge.
Then the process will be Executing.
Once it has executed the code, it will wait for the next rising edge.
The condition after the until means not only the necessity of the value ‘1’, but
also the necessity of changing the value to ‘1’.
Example to test the “wait until”
command - stimulus generator
Example to test the “wait until”
command - test bench I
Example to test the “wait until”
command - test bench III
Example to test the “wait until”
command - simulation result