Advertisement
Guest User

Untitled

a guest
Sep 16th, 2019
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. module main(clk);
  3.     input clk;
  4.     integer i;
  5.    
  6.    
  7.     initial begin
  8.         i=236;
  9.         if (i>5) begin
  10.             $display("More than 5");
  11.             if (i>78) begin
  12.                 $display("More than 78");
  13.                 if (i<90) begin
  14.                     $display("Less than 90");
  15.                 end
  16.             end
  17.            
  18.             else begin
  19.                $display("Less than 53");
  20.                $display("Less than 10");
  21.             end
  22.            
  23.         end
  24.         else begin
  25.             $display("Less than 90");
  26.             $display("Less than 53");
  27.             $display("Less than 10");
  28.         end
  29.         if (i%2==0) begin
  30.             $display("Even");
  31.             if (i%10==0) begin
  32.                 $display("Divisible by 10");
  33.             end
  34.             if(i==36) begin
  35.                     $display("Its a 36!");
  36.             end
  37.         end
  38.         if (i%3==0) begin
  39.             $display("Divisibile by 3");
  40.         end
  41.         if(i/10%10==3) begin
  42.             $display("-3-");
  43.         end
  44.         else if(i%100==67) begin
  45.             $display("-67");
  46.         end
  47.     end
  48.    
  49.     always @(posedge clk) begin
  50.     end    
  51.        
  52.  
  53. endmodule
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement