Created
October 12, 2017 09:27
-
-
Save buttercutter/59803bc1b6030cdcd8013edcc2852500 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 shift_register(clk, serial_in, data_is_available, received_data); // manages sampling-related data signal using SIPO shift register | |
input clk, serial_in, data_is_available; | |
output reg [7:0] received_data; // SIPO | |
always @(posedge clk) | |
begin | |
if(data_is_available) | |
received_data <= { serial_in , received_data[7:1] }; // LSB received first by UART definition | |
end | |
endmodule |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment