No BSD License  

Highlights from
Home Networking Basis

Home Networking Basis

by

 

11 Aug 2003 (Updated )

M-files for chapters 2-10 and Simulink models for Ethernet and Wireless Ethernet.

gpoly.m
%Generator Polynomial
%Initialize ppr and dpr tables
rsprp
%GF size
n=8;
%Polynomial order
m=16;
%Initialization
gp=-1*ones(1,m+1);
%Set up for m=1
gp(1)=0;
gp(2)=1;
%Multiplication loop
for i=2:m
    gpp=gp;
    for j=1:i
        co1=p2bin(gpp(j+1),n,bpr);
        co2=p2bin(gpp(j)+i,n,bpr);
        gp(j+1)=b2pw(xor(co1,co2),n,ppr);
    end
end

Contact us