Skip to content

Instantly share code, notes, and snippets.

@Ravenslofty
Created December 6, 2019 14:11
Show Gist options
  • Save Ravenslofty/fcd6761a630b3688956a9a63a0b13ed8 to your computer and use it in GitHub Desktop.
Save Ravenslofty/fcd6761a630b3688956a9a63a0b13ed8 to your computer and use it in GitHub Desktop.
module MISTRAL_FF(input D, CLK, ACn, ASn, EN, output reg Q);
parameter INIT = 1'b0;
initial Q = INIT;
always @(posedge CLK or negedge ACn or negedge ASn) begin
if (!ACn) begin
Q <= 0;
end
else if (!ASn) begin
Q <= 1;
end
else begin
if (EN) Q <= D;
end
end
endmodule
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment