Advertisement
Guest User

Untitled

a guest
Jan 24th, 2017
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. module problem2(a,b,c,d,out);
  2.     input a,b,c,d;
  3.     output out;
  4.     assign out = (c & (a | b | d));
  5. endmodule
  6.  
  7. module test_problem;
  8.     reg [3:0] count;
  9.     wire out;
  10.    
  11.     problem2 p2(count[3],count[2],count[1],count[0],out);
  12.    
  13.     initial begin
  14.         count = 4'b0000;
  15.         repeat (16) begin
  16.             #100
  17.             $display("In = %b, out = %b ", count, out);
  18.             //$display("A is = %b, B is = %b, C is = %b, D is = %b", count[3], count[2], count[1], count[0]);
  19.             count = count + 4'b0001;
  20.         end
  21.     end
  22. endmodule
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement