Diff
checker
Text
Text
Images
Documents
Excel
Folders
Legal
Enterprise
Desktop
Pricing
Sign in
Download Diffchecker Desktop
Compare text
Find the difference between two text files
Tools
History
Real-time editor
Hide unchanged lines
Disable line wrap
Layout
Split
Unified
Diff precision
Smart
Word
Char
Syntax highlighting
Choose syntax
Ignore
Transform text
Go to first change
Edit input
Diffchecker Desktop
The most secure way to run Diffchecker. Get the Diffchecker Desktop app: your diffs never leave your computer!
Get Desktop
serial CRC verilog implementation
Created
6 years ago
Diff never expires
Clear
Export
Share
Explain
2 removals
Lines
Total
Removed
Characters
Total
Removed
To continue using this feature, upgrade to
Diff
checker
Pro
View Pricing
28 lines
Copy
1 addition
Lines
Total
Added
Characters
Total
Added
To continue using this feature, upgrade to
Diff
checker
Pro
View Pricing
28 lines
Copy
Copy
Copied
Copy
Copied
module crc_serial_
optimized
(clk, reset, data, crc);
module crc_serial_
long_division
(clk, reset, data, crc);
//=============================================================
//=============================================================
// Verilog function that implements serial USB CRC5
// Verilog function that implements serial USB CRC5
//=============================================================
//=============================================================
input clk, reset;
input clk, reset;
input data;
input data;
output reg [4:0] crc;
output reg [4:0] crc;
always @(posedge clk)
always @(posedge clk)
begin
begin
if(reset) crc <= 0;
if(reset) crc <= 0;
else begin
else begin
crc[0] <= crc[4] ^ data;
crc[0] <= crc[4] ^ data;
crc[1] <= crc[0];
crc[1] <= crc[0];
Copy
Copied
Copy
Copied
crc[2] <= crc[1] ^ crc[4]
^ data
;
crc[2] <= crc[1] ^ crc[4]
;
crc[3] <= crc[2];
crc[3] <= crc[2];
crc[4] <= crc[3];
crc[4] <= crc[3];
end
end
end
end
//============================================================
//============================================================
endmodule
endmodule
Saved diffs
Original text
Open file
module crc_serial_optimized(clk, reset, data, crc); //============================================================= // Verilog function that implements serial USB CRC5 //============================================================= input clk, reset; input data; output reg [4:0] crc; always @(posedge clk) begin if(reset) crc <= 0; else begin crc[0] <= crc[4] ^ data; crc[1] <= crc[0]; crc[2] <= crc[1] ^ crc[4] ^ data; crc[3] <= crc[2]; crc[4] <= crc[3]; end end //============================================================ endmodule
Changed text
Open file
module crc_serial_long_division(clk, reset, data, crc); //============================================================= // Verilog function that implements serial USB CRC5 //============================================================= input clk, reset; input data; output reg [4:0] crc; always @(posedge clk) begin if(reset) crc <= 0; else begin crc[0] <= crc[4] ^ data; crc[1] <= crc[0]; crc[2] <= crc[1] ^ crc[4]; crc[3] <= crc[2]; crc[4] <= crc[3]; end end //============================================================ endmodule
Find difference