Forum Discussion
Altera_Forum
Honored Contributor
14 years agothat should work.. i hope you realized that your circuit is level triggered and not edge triggered.. a 16 bit edge triggered d flip flop would look like this
module D_latch_async_rst(RST, CLK, DAT, Q);
input RST, CLK;
input DAT;
output reg Q;
always @ (posedge CLK) begin
if(~RST)
Q = 1'b0;
else
Q = DAT;
end
endmodule i hope someone will correct me if im wrong