2014年10月20日 星期一

not_behavioral




module top;
  integer ia;
  reg  a;
  wire out;

  not_behavioral and1(out,a);

  initial
    begin
      for (ia=0; ia<=1; ia = ia+1)
        begin
          a = ia;
          #50 $display("a=%d out=%d",a,out);
 end
    end
endmodule

module not
_behavioral(out,a);
  input a;
  output out;
  wire a;
  reg out;

  always @(a )
    out = ~a ;
endmodule

沒有留言:

張貼留言