IMHO LRM is not explicit for below case. Should it be error if variable
is driven by both continous assignment and ref port of function (ref
port of module)?
I assume that const ref should be ok.
module bench ;
reg packetbanch = 0;
bit valid ;
initial #5 packetbanch=1;
initial #6 packetbanch=0;
test chk1( packetbanch, valid) ;
endmodule
function automatic bit crc(ref reg packetcrc ) ;
//packetcrc = 1;
return 1'b0;
endfunction
module test ( input reg packet, output bit valid ) ;
initial begin
$monitor("%d> %d %d", $time, packet, bench.packetbanch);
#1;
if (crc( packet ) == 1'b1) // error packet is driven by both
continous and procedural assign???
valid = 1'b1 ;
#10;
$finish;
end
endmodule
-- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Thu Oct 20 02:09:07 2011
This archive was generated by hypermail 2.1.8 : Thu Oct 20 2011 - 02:09:21 PDT