Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

CRC-16 VHDL

2,025 views
Skip to first unread message

Hamish Moffatt

unread,
May 5, 1998, 3:00:00 AM5/5/98
to

Does anyone have some VHDL, or a description of the algorithm (NON-table
based) for a 16 bit CRC? There's been plenty of 32-bit versions posted
here (I saw them on Dejanews) but I am looking for a 16-bit one.


Thanks,
Hamish

--
Hamish Moffatt, StudIEAust ham...@debian.org, ham...@moffatt.nu
Student, computer science & computer systems engineering. 4th year, RMIT.
http://hamish.home.ml.org/ (PGP key here) CPOM: [****** ] 64%
Get a stable, reliable & upgradable operating system free at www.debian.org

Jan Zegers

unread,
May 5, 1998, 3:00:00 AM5/5/98
to
If you tell me what your polynomial is and the data width on which
to calculate the CRC, then I can generate your VHDL code.

Kind regards,
Jan
--
===================================================================
Jan Zegers === Easics ===
General Manager === VHDL-based ASIC design services ===
Tel: +32-16-395 601 ===================================
Fax: +32-16-395 619 Interleuvenlaan 86, B-3001 Leuven, BELGIUM
mailto:ja...@easics.be http://www.easics.com

petter gustad

unread,
May 5, 1998, 3:00:00 AM5/5/98
to

ham...@moffatt.nu (Hamish Moffatt) writes:

> Does anyone have some VHDL, or a description of the algorithm (NON-table
> based) for a 16 bit CRC? There's been plenty of 32-bit versions posted
> here (I saw them on Dejanews) but I am looking for a 16-bit one.

There are different versions of 16 bit CRC (they have different
generating polynomials). Most algorithms are specified on a serial
form, but you can easily convert it into parallel form using any
number of bits as input. Here's the CCITT CRC-16 serial version with
the generating polynomial X^16+X^12+X^5+1:

c15 = c0 XOR d
c14 = c15
c13 = c14
c12 = c13
c11 = c12
c10 = c11 XOR c0 XOR d
c9 = c10
c8 = c9
c7 = c8
c6 = c7
c5 = c6
c4 = c5
c3 = c4 XOR c0 XOR d
c2 = c3
c1 = c2
c0 = c1

c0 is the MSB, d is the input.

Petter
Not responsible for mistakes in any of the above information.

--
________________________________________________________________________
Petter Gustad 8'h2B | (~8'h2B) - Hamlet http://home.sol.no/~pegu
#include <stdio.h>/* compile/run this program to get my email address */
int main(void) {printf ("pegu\100computer\056org\nmy opinions only\n");}

hamzae...@gmail.com

unread,
Mar 28, 2019, 4:45:12 AM3/28/19
to
Can you give me any links for the vhdl code of crc 16 of 32 bits . Im stuck . And its also urgents can u help me out . Please.

Allan Herriman

unread,
Mar 28, 2019, 5:50:29 AM3/28/19
to
On Thu, 28 Mar 2019 01:45:09 -0700, hamzaelaloui wrote:

> Can you give me any links for the vhdl code of crc 16 of 32 bits . Im
> stuck . And its also urgents can u help me out . Please.


There's an online code generator here:
https://www.easics.com/webtools/crctool

You will need to know the polynomial. "crc 16" is ambiguous, as there
are several 16 bit CRC polynomials in common use.

Regards,
Allan
0 new messages