Skip to content

Instantly share code, notes, and snippets.

@iaserrat
Last active December 25, 2015 02:29
Show Gist options
  • Save iaserrat/f205287c77c4cdd9ca74 to your computer and use it in GitHub Desktop.
Save iaserrat/f205287c77c4cdd9ca74 to your computer and use it in GitHub Desktop.
Comportamental Type D FlipFlop (verilog)
module foo
(
input In,
input Reset,
input Clock,
input Set,
output reg D);
always @(posedge CLK)
begin
if(!Reset)
D <= 0;
else if(Set)
D <= 1;
else
D <= In;
end
endmodule
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment