R
rwdfan
I am debugging a VHDL block which has a "for loop" inside a
procedure. Within each iteration of the for loop, a variable is
conditionally assigned. For troubleshooting the design, I am
interested in viewing the value of the variable at specific locations
of the process. Since the variable is re-assigned subsequently within
the process, the variable has changed state multiple times in zero
time. I realize this rules out any viewing in a wave window.
process(clk,reset)
variable a;
variable b;
begin
if rising_edge(clk) then
for i in 0 to 7 loop
if condition1 then
a := x(i);
end if;
b := a;
if condition2 then
a := x(i+1);
end if;
end for;
end if
end process;
Here is a simple example. Please do not recommend a different coding
style, as this is merely an attempt to illustrate the problem. Let's
say I want to lok at the value of a (or i, for that matter) at the end
of the first if statement. I do not want to see it after the process
completes. I would be happy if I could insert a line of code similar
to the report command, that could display the value of a variable at
the time of execution.
Any suggestions?
Brett
procedure. Within each iteration of the for loop, a variable is
conditionally assigned. For troubleshooting the design, I am
interested in viewing the value of the variable at specific locations
of the process. Since the variable is re-assigned subsequently within
the process, the variable has changed state multiple times in zero
time. I realize this rules out any viewing in a wave window.
process(clk,reset)
variable a;
variable b;
begin
if rising_edge(clk) then
for i in 0 to 7 loop
if condition1 then
a := x(i);
end if;
b := a;
if condition2 then
a := x(i+1);
end if;
end for;
end if
end process;
Here is a simple example. Please do not recommend a different coding
style, as this is merely an attempt to illustrate the problem. Let's
say I want to lok at the value of a (or i, for that matter) at the end
of the first if statement. I do not want to see it after the process
completes. I would be happy if I could insert a line of code similar
to the report command, that could display the value of a variable at
the time of execution.
Any suggestions?
Brett