Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Examples and discussion about CRC implementation

Status
Not open for further replies.

sree205

Advanced Member level 1
Joined
Mar 13, 2006
Messages
453
Helped
58
Reputation
116
Reaction score
25
Trophy points
1,308
Activity points
4,420
Hi,
would it be possible to calculate CRC for incoming data which is not a byte-multiple? lets say 10 or 15 or 26 or any such random no. ?

i came across another crc implementation post which uses this following polynomial.

g(x) = x12+x10+x8+x5+x4+x3+1

in this explanation, there is also something like a seed value given. is this what the input data should be ?
 

CRC implementation

would it be possible to calculate CRC for incoming data which is not a byte-multiple?/quote]

The usuall method is to pad the data with zero's.
 

CRC implementation

another question. for a polynomial of degree 12, shouldn't we get a checksum of 13 bits (coz, x^0, 1 is also taken into account) ?
 

Re: CRC implementation

Maybe the attachement will help you.
 

Re: CRC implementation

Hi,
I have attached the CRC rtl from verilog designer's library. it has been implemented as a simple LFSR would be. On testing it with the testbench, i find that the checksum obtained with this is not the same as CRC should be. so, why is there a disparity ?

this link provides a 8-bit crc calculator using a polynomial x^8+x^2+x+1. feel free to check the crc values.

http://www.smbus.org/faq/crc8Applet.htm
 

Re: CRC implementation

Hi everybody
I'm searching for a dependable Crc32 calculator to verify my work

Could anybody help me?

Thanks
Mohammad
 

Re: CRC implementation

Hi
My code implements the parallel crc32 where the data width is a nibble (4 bits) which is applied for ethernet

Now, I made a testbench that examines the value of the generated CRC and counts the number of clocks required to get it

It examines the value of the CRC by comparing it with a value I obtained by the calculator from http://www.zorc.breitbandkatze.de/crc.html

for example:
using this calculator for a Data message=U (which is 8'h55) we will get CRC=C9034AF6

to check my work I made this testbench
// eb1 1
always @(posedge Clk)
begin
Data = 4'b0101;
if (Crc[31:0] == 32'hc9034af6) begin
$display("the CRC is given after", Clk_Counter," clocks");
#5 $finish;
end
end

when running the simulator and make a break point at the $display line I found it doesn't stop and continue running forever

Do you think there is a mistake with my work?
Do you think the result of this calculator is not right?

I appreciate ur help

Thanks
 

Re: CRC implementation

Also, I want to add something
The tested core compares the Crc value with the magic number of 32'hc704dd7b by this line
assign CrcError = Crc[31:0] != 32'hc704dd7b;

and when I tried to simulate it I found the CrcError signal is always high

I don't know where is the mistake?

could you help please?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top