hithesh123
Full Member level 6
- Joined
- Nov 21, 2009
- Messages
- 324
- Helped
- 1
- Reputation
- 2
- Reaction score
- 1
- Trophy points
- 1,298
- Location
- lax
- Activity points
- 3,548
I am generating serial clock in my test bench.
The straight forward way works fine -
But if I want to generate the clock, when sclk_en=1, then the test bench does not run. It just stops at the 'if' statement.
Not sure why it just hangs at the if statement.
The straight forward way works fine -
Code:
sclk <= '0';
wait for sclk_period/2;
sclk <= '1';
wait for sclk_period/2;
But if I want to generate the clock, when sclk_en=1, then the test bench does not run. It just stops at the 'if' statement.
Code:
if (sclk_en='1') then
sclk <= '0';
wait for sclk_period/2;
sclk <= '1';
wait for sclk_period/2;
else
sclk<='1';
end if;
Not sure why it just hangs at the if statement.