Forum Discussion
Altera_Forum
Honored Contributor
17 years agowhy the simulation result is differenct between fork join and begin end?
this is the testbench in an495. why can not use begin ... end. initial begin arst <= 1'b0; // resetting the contoller initially # 250 arst <= 1'b1; ider...
Altera_Forum
Honored Contributor
17 years agoThe difference between "begin-end" and "fork-join" is that in initial block "begin-end" operations work step-by-step, but in "fork-join" they work simultaneously. You can rewrite the testbench using "begin-end". For example,
begin arst <= 1'b0; // resetting the contoller initially iderst <= 1'b0; ideen <= 1'b1; pioiordyen <= 1'b1; piorqst <= 1'b1; pioaddr <= 4'b0111; piodatain <= 16'b1111111100000000; piowe <= 1'b1; iordy <= 1'b1; intrq <= 1'b1; flag <= 1'b0; //if error occured in the test procedure,then asserted ddi <= 16'b0000000011111111; # 250 arst <= 1'b1; # 350 piowe <= 1'b0; # 4400 $stop; end I believe, it will work like original "fork-join"