Edit code - EDA Playground
Warning! This exercise has been opened in another tab; autosave has been disabled. Close this tab or refresh to reactivate.

 Languages & Libraries

 Tools & Simulators

 Examples

205


21
 
1
//----------------------------------------------------------------------------------
2
//                      www.verificationguide.com
3
//----------------------------------------------------------------------------------
4
module repeat_loop_break;
5
  int i;
6
  
7
  initial begin
8
    $display("-----------------------------------------------------------------");
9
    
10
    repeat(5) begin
11
      $display("\tValue of i=%0d",i);
12
      if(i == 2) begin
13
        $display("\tCalling break,");
14
        break;
15
      end  
16
      i++;
17
    end      
18
    
19
    $display("-----------------------------------------------------------------");
20
  end     
21
endmodule
xxxxxxxxxx
1
 
1
// Code your design here
2
292 views and 0 likes     
A short description will be helpful for you to remember your playground's details
 
100:0