Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
08/13/06 23:39
Modified:
  08/13/06 23:43

Read: times


 
Msg Score: +1
 +1 Informative
#122173 - implementing other crc using crc package
Responding to: ???'s previous message
If you click on the link http://www.easics.com/webtools/crctool
you can define your custon polynomial by just clicking the appropriate boxes and then apply,set the data bus width and then generate which is how is how I produced and downloaded the package used in the code i posted.It produces a vhdl package which you compile and use with a use work.your_package.all and then you call the function defined in the package like so :-
if nextCRC5_D13(crcreg(17 downto 5),crcreg(4 downto 0))/=crcreg(4 downto 0)
I just set the polynomial and data width and it produced this package

library IEEE;
use IEEE.std_logic_1164.all;

package PCK_CRC5_D13 is

-- polynomial: (0 1 2 3 4 5)
-- data width: 13
-- convention: the first serial data bit is D(12)
function nextCRC5_D13
( Data: std_logic_vector(12 downto 0);
CRC: std_logic_vector(4 downto 0) )
return std_logic_vector;

end PCK_CRC5_D13;

library IEEE;
use IEEE.std_logic_1164.all;

package body PCK_CRC5_D13 is

-- polynomial: (0 1 2 3 4 5)
-- data width: 13
-- convention: the first serial data bit is D(12)
function nextCRC5_D13
( Data: std_logic_vector(12 downto 0);
CRC: std_logic_vector(4 downto 0) )
return std_logic_vector is

variable D: std_logic_vector(12 downto 0);
variable C: std_logic_vector(4 downto 0);
variable NewCRC: std_logic_vector(4 downto 0);

begin

D := Data;
C := CRC;

NewCRC(0) := D(12) xor D(7) xor D(6) xor D(1) xor D(0) xor C(4);
NewCRC(1) := D(12) xor D(8) xor D(6) xor D(2) xor D(0) xor C(0) xor
C(4);
NewCRC(2) := D(12) xor D(9) xor D(6) xor D(3) xor D(0) xor C(1) xor
C(4);
NewCRC(3) := D(12) xor D(10) xor D(6) xor D(4) xor D(0) xor C(2) xor
C(4);
NewCRC(4) := D(12) xor D(11) xor D(6) xor D(5) xor D(0) xor C(3) xor
C(4);

return NewCRC;

end nextCRC5_D13;

end PCK_CRC5_D13;


List of 36 messages in thread
TopicAuthorDate
5 bit CRC polynomial            01/01/70 00:00      
   there are several            01/01/70 00:00      
   what does "no success" mean?            01/01/70 00:00      
      He said            01/01/70 00:00      
         maybe we need a new 'forum' where            01/01/70 00:00      
      They said            01/01/70 00:00      
         This must be a very smart shaft encoder            01/01/70 00:00      
            competitor like Kuebler            01/01/70 00:00      
         This must be a very smart shaft encoder            01/01/70 00:00      
         Brute force it.            01/01/70 00:00      
            Yes this is what we were doing            01/01/70 00:00      
   can you find it in the pascal here? -- Kai            01/01/70 00:00      
      zyklische Redundanzprüfung            01/01/70 00:00      
      I searched all their site            01/01/70 00:00      
         did you search the pascal code examples            01/01/70 00:00      
            Where?            01/01/70 00:00      
               I did not look at it all, but there is much here            01/01/70 00:00      
                  I downloaded them all            01/01/70 00:00      
                     what about all the .pas            01/01/70 00:00      
      Found a document name            01/01/70 00:00      
         I feel your pain            01/01/70 00:00      
            This is how we get experienced            01/01/70 00:00      
               CRC time            01/01/70 00:00      
                  FPGA option            01/01/70 00:00      
                  SiLabs            01/01/70 00:00      
               have you seen this?            01/01/70 00:00      
                  Maybe it is X^5+X^4+X^3+X^2+X+1            01/01/70 00:00      
   rather than all that processing            01/01/70 00:00      
      The thing is            01/01/70 00:00      
         USB 5bit CRC            01/01/70 00:00      
         implementing other crc using crc package            01/01/70 00:00      
            impressive            01/01/70 00:00      
   rather than all that processing            01/01/70 00:00      
   Initial value?            01/01/70 00:00      
      and the final value            01/01/70 00:00      
   Friends            01/01/70 00:00      

Back to Subject List