0% found this document useful (0 votes)
102 views10 pages

FORKJOIN

The document discusses the concept of fork-join in System Verilog (SV) and emphasizes the need for practice to achieve expertise. It includes several questions and code examples related to the fork-join mechanism, asking for the expected outputs of various code snippets. The content is aimed at helping learners solidify their understanding of this topic through practical exercises.

Uploaded by

strangerrr999
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
102 views10 pages

FORKJOIN

The document discusses the concept of fork-join in System Verilog (SV) and emphasizes the need for practice to achieve expertise. It includes several questions and code examples related to the fork-join mechanism, asking for the expected outputs of various code snippets. The content is aimed at helping learners solidify their understanding of this topic through practical exercises.

Uploaded by

strangerrr999
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

V Y

O
L U
S QUESTIONS ON T
I U
FORK JOIN B
T CONCEPT IN E
C
O
SYSTEM VERILOG H
A
Y N
N
O E
U L
V Y
O
L SOME CONCEPTS IN SV NEEDS
U
S REPEATED PRACTICE TO ACHIEVE
T
EXPERTISE IN THEM. ONE SUCH
I TOPIC IN SV IS FORK-JOIN.
U
B
E
T C
O TRY TO SOLVE ALL THESE
H
QUESTIONS TO PRACTICE WHAT
A
YOU HAVE LEARNT
Y N
N
O E
U L
V Y
O
L Write code that will create the four U
S processes (Process_A through Process_D). T
I U
Process_C should begin when Process_A has B
finished,and then Process_D. E
T C
O However, Process_D ought to wait for H
Process_B to finish. A
Y N
N
O E
U L
V What will be the output of this??? Y
O
L U
S T
I U
B
E
T C
O H
A
Y N
N
O E
U L
V Y
What will be the output of this???
O
L U
S T
I U
B
E
T C
O H
A
Y N
N
O E
U L
V What will be the output of this??? Y
module top; O
L U
initial begin
S T
fork
I U
begin B
#0 $display( "a" );
end E
T C
begin
O #0 $display( "b" ); H
end
A
Y join N
end N
O endmodule E
U L
V What will be the output of this??? Y
O
L module top;
U
S initial T
I begin U
fork B
$display( $time, "A" ); E
T #1 $display( $time, "B" );
C
O #0 $display( $time, "C" );
H
join_any
$display( "D" );
A
Y end N
N
O endmodule E
U L
V What will be the output of this??? Y
O
L module top;
U
S initial T
I begin U
fork
B
$display( $time, "A" );
E
T $display( $time, "B" );
C
$display( $time, "C" );
O join_none H
$display( "D" ); A
Y end N
N
O endmodule
E
U L
V module top; What will be the output of this??? Y
O
L initial U
S begin T
I fork
fork
U
#4 $display( $time, "A" ); B
#0 $display( $time, "B" ); E
T $display( $time, "C" ); C
O join_none
H
$display( "D" );
join_any
A
Y $display( "E" ); N
end N
O E
U endmodule
L
V What will be the output of this??? Y
O
L module top;
U
S initial
T
I begin U
int ARR[]; B
E
T fork
C
O ARR = new[10];
join_any H
$display( "ARR[0] : %0d", ARR[0] ); A
Y end N
N
O endmodule
E
U L

You might also like