1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
module x;
reg a;
reg b;
reg c;
always @(/*AUTOSENSE*/a or b or rst) begin
if ( rst ) begin
/*AUTORESET*/
// Beginning of autoreset for uninitialized flops
c = 1'h0;
// End of automatics
end
else begin
if ( a <= b ) begin
c = a;
end
else begin
c = b;
end
end
end
always @ (posedge a) begin
if ( rst ) begin
/*AUTORESET*/
// Beginning of autoreset for uninitialized flops
c <= 1'h0;
// End of automatics
end
else if ( a <= b ) begin
c <= a;
end
end
endmodule
|