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

204


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