Created
May 30, 2019 17:07
-
-
Save kokjo/4b126121e1643c605bd7b2a402065a37 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
`default_nettype none | |
module crc32_top ( | |
input clk, input rst, | |
input [7:0] data, | |
output [31:0] state, | |
); | |
reg [31:0] state_reg; | |
wire [31:0] state_next; | |
crc32 crc32 ( | |
.data_in(data), | |
.state_in(state_reg), | |
.state_out(state_next), | |
); | |
assign state = state_reg; | |
always @(posedge clk) if(rst) begin | |
state_reg <= 32'hffffffff; | |
end else begin | |
state_reg <= state_next; | |
end | |
endmodule |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment