Hi,
In my simple design, I am giving some inputs and it is difficult for me to know which signal act as a clock. i.e. only "y" act as a clock or both "x" and "y" act as clock.
Code:
module my_design (q, d, x, y);
input x, y, d;
output reg q;
always@(posedge x or posedge y)
begin
if(x)
q <= 1'b0;
else
q <= d;
end
endmodule
Despite of the event specification "posedge x", x is acting as level sensitive input in this well know Verilog template for a DFF with asynchronous reset.
A detailed explanation can be found in the (withdrawn) IEEE Std 1364.1 Verilog Register Transfer Level Synthesis
Despite of the event specification "posedge x", x is acting as level sensitive input in this well know Verilog template for a DFF with asynchronous reset.
A detailed explanation can be found in the (withdrawn) IEEE Std 1364.1 Verilog Register Transfer Level Synthesis
This is one of the minor things I don't like about Verilog. In VHDL, you can have registers without reset in the same process as registers with reset. The reset logic just is placed at the end of the process.