Hi
My code snippet is as below
forever begin
fork
begin:process_1
if (credit 0 is returned)
begin //
//drive stimulus for agent0
end
end:process_1
begin:process_2
if(credit 1 is returned)
begin
// driver stimulus for agent1
end
end:process_2
join_none
end//forever
The purpose of adding fork was to make sure I simultaneouly check for credits returned by Agent0 and Agent1 and drive the stimulus to agent0 and agent1 as soon as any credit is received.Credit 0 and 1 are not dependent on each other and can be returned simultaneously from their respective agents.
My question is - > Do I really to add fork in between? if i dont add fork then also 2 seperate if statements will keep executing in forever loop simultaneously.