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.

I need Table lookup CRC algorithm VHDL code

Status
Not open for further replies.

Yihan

Newbie level 6
Joined
Jan 28, 2011
Messages
12
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,359
Can somebody post a complete Table lookup CRC algorithm VHDL code? I can't find any.
 

CRC is just shift registers and a few XORs. Easier to make it with logic than having a table.
 
  • Like
Reactions: Yihan

    Yihan

    Points: 2
    Helpful Answer Positive Rating
Tables are only good for software CRC implementations.

Look at this tool:

Easics
 
  • Like
Reactions: Yihan

    Yihan

    Points: 2
    Helpful Answer Positive Rating
Between the Table lookup method and using logics, which one is more efficient for FPGA (area-wise)??
 

The LSFR is going to be more efficient in an FPGA.
 
  • Like
Reactions: Yihan

    Yihan

    Points: 2
    Helpful Answer Positive Rating
Hi RBB, Can you tell me why the LSFR is more efficient in FPGA? Are there any links that I can get those detailed information from? Thanks.
 

Because an LSFR is just a shift register & a handful of xor gates. The shift register is the same length as your CRC polynomial.
Google CRC + LSFR and there is a great deal of information available.
 
  • Like
Reactions: Yihan

    Yihan

    Points: 2
    Helpful Answer Positive Rating
Hi RBB, I got another question: what is the most efficient algorithm (area-wise) for doing a 16 bit/16 bit signed division in FPGA?? Thanks for the help!
 

I don't know. I'm an ASIC guy. I just let me synthesis tools pick the optimal solution. ;)
 

    V

    Points: 2
    Helpful Answer Positive Rating
Any idea if the LFSR method would still take less area than the LUT methold if I have a lots EEPROM for the table ??
 

Depends on your CRC size & your data size. If your CRC size is 8 bits and data size is 8 bits then you need an 256x8 LUT. If you used the LSFR approach it would take 8 flops & a couple of xor gates.
 
  • Like
Reactions: Yihan

    Yihan

    Points: 2
    Helpful Answer Positive Rating
Why do you want a table? The "normal" hardware implementation (shift register + xor's) is very small and does one iteration every clock cycle. Even if you get the table memory for free, I think it is a very bad idea.

A table can speed up a software implementation, but a hardware implementation will be smaller and faster without a table.
 
  • Like
Reactions: Yihan

    Yihan

    Points: 2
    Helpful Answer Positive Rating
A table in indeed a software approach - try to avoid this when targetting hardware (CPLD, FPGA, ASIC, Struct ASIC...).

The algorithm will indeed take only a couple of cells from you logic.

If you aren't sure about it. Make a test case and implement both, synthesize, and see what the outcome is.
This is true for your other question as well (16 bit division).
 
  • Like
Reactions: Yihan

    Yihan

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top