From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,19ab04458779b99e X-Google-Attributes: gid1164f8,public X-Google-Thread: 102b75,d5991e208f8d5b5b X-Google-Attributes: gid102b75,public From: Kai Harrekilde-Petersen Subject: Re: [++] Re: Steal their thunder (was Re: Alpha window of opportunity?) Date: 1998/06/11 Message-ID: #1/1 X-Deja-AN: 361634759 References: <6l5gh1$vjc$1@piglet.cc.uic.edu> <35787CE8.51BF357E@videotron.ca> <6la6kf$ljm@crl3.crl.com> <357E265D.D42F5D98@shore.net> <357E3248.BFEC13E3@hda.hydro.com> <357F7842.3A27C0C9@shore.net> <357F877C.3E4B362@hda.hydro.com> Organization: EUnet Norway Newsgroups: comp.arch,comp.sys.dec Terje Mathisen writes: > Russell Sasamori wrote: > > >especially if you also have a popcount > > I think Alpha has an instruction that counts the number of ones. > > > > > temp = lfsr & feedback_mask; > > > feedback_term = parity(temp); // # define parity(x) (popcount(x) & 1) > > > lfsr = (lfsr << 1) | feedback_term; > > > > I visualized the circuit in my head but could not figure out what > > it is doing in terms of polynomial algebra. OTOH this I can understand: > > > > if(LFSR & 0x8000000000000000) > > lfsr=(lfsr<<1)^POLYNOMIAL; > > else > > lfsr=(lfsr<<1); > > That isn't a LFSR, it is instead the traditional way to implement CRC! If I remember my ECC stuff correct, the two implementations are identical wrt sequence length etc. The only difference is the actual sequence generated. Regards, --Kai