Cell Relay Archive

Cell Relay Retreat>List Archive>month:1998-Jul> msg00265



[Date Prev][Date Next][Thread Prev][Thread Next]  
  [Date Index][Thread Index][Author Index][Subject Index]

Re: AAL2 HEC Calculation

  • From: Juha Pirkola <juha.pirkola@ntc.nokia.no_spam_please.com>
  • Date: Wed, 22 Jul 1998 21:05:51 +0300

C. M. Heard/VVNET, Inc. wrote:
> 
> Colleagues,
> 
> On two separate occasions in the the past six months I have been asked
> for assistance in formulating a C program which performs the AAL2 CPS
> Header HEC calculation.  Attached below my signature is what I _think_
> is an implementation of this calculation using the serial shift register
> algorithm illustrated in Fig. 5.02 of Elwyn R. Berlekamp's book "Algebraic
> Coding Theory", 1st edition (McGraw-Hill, 1968).
> 
> I would be much obliged if other readers of this newsgroup would check
> this program for correctness and post their findings (including any
> necessary corrections).

Hi,

I implemented AAL2 CPS HEC calculation about a year ago, and
now I verified that your program gives the same result as mine. 
However, I haven't verified my implementation against any other 
implementation before this, so there is still a small chance that
we were both wrong. Anyway I was happy to see your implementation 
and to notice that we have interpreted the specification the same 
way.

My CRC calculation is table driven, which means it uses a 
pre-calculated look-up table to update the CRC accumulator for each 
eight CPS_PH bits (one header byte) at a time. I save a few shifts
and XOR's that way, but on the other hand I need to do table 
look-ups from memory. I guess it depends on the environment which 
way is more efficient. Just out of curiosity I measured the 
execution times of our CRC calculations on a 200 Mhz Pentium. 
Your function used about 1.5 us and mine about 0.3 us per calculation, 
so in this case the table driven method was more efficient. 
Actually speed was not an issue in my application, but I implemented 
the table driven algorithm because I'm used to doing that with CRC16 
and CRC32 too.

Regards,

Juha Pirkola                            email: juha.pirkola
Nokia Telecommunications                       @ntc.nokia.com