Created
May 23, 2017 19:29
-
-
Save mgronhol/74bb835fb40d5cd6d49c28587c62a0b1 to your computer and use it in GitHub Desktop.
Flip-flop in verilog
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module flapflap(d,clk,q,qn); | |
| input d,clk; | |
| output q,qn; | |
| reg q,qn; | |
| initial | |
| begin | |
| q=0; | |
| qn=1; | |
| end | |
| always @(posedge clk) | |
| begin | |
| q <= d; | |
| qn <= !d; | |
| end | |
| endmodule |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment