Last active
April 8, 2019 19:42
-
-
Save axayjha/a58c7c5763052dde33997b992a382f08 to your computer and use it in GitHub Desktop.
This file contains 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 PIPO_R2 (dout, din, ld, clr, clk); | |
input [15:0] din; | |
input ld, clr, clk; | |
output reg [15:0] dout; | |
always @(posedge clk) | |
// if clear signal is on, set register value to 0 | |
if (clr) dout <= 16'b0; | |
// else if load signal is on, load new data | |
else if (ld) dout <= din; | |
endmodule |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment