module chkchk(buff1,len_tcp,src_addr,dest_addr,word,word32,tcplen,prot_tcp,led1,led2,sum); input [159:0] len_tcp; input [31:0] src_addr; input [31:0] dest_addr; input [255:0] buff1; //input [255:0] buff2; //input [255:0] buff3; input [15:0] word; input [31:0] word32; input [15:0] tcplen; input [15:0] prot_tcp; //input padding; output [31:0] sum; output led1; output led2;
//parameter [15:0] padd=0; //parameter [15:0] prot_tcp=6; parameter i=0; //parameter num1 = 16'hff00; //p//arameter num2 = 8'hff; //parameter prot_tcp; //parameter tcplen; //parameter num1 = 15'hFFFF; reg led1; reg led2; reg [31:0] sum; //wire [15:0] src_addr; wire [255:0] buff1; //wire [255:0] buff2; //wire [255:0] buff3;
wire [15:0] num1 ; wire [159:0] len_tcp ; wire [31:0] src_addr ; wire [31:0] dst_addr; wire [15:0] tcplen; wire [15:0] prot_tcp;
always @(len_tcp,src_addr,dest_addr,buff1,word,word32) begin //chk for even odd padding //if (padding & 1==1) //begin //padd=1; //buff[len_tcp]=0; //end //sum=0; buff1 =
255'hcda9005095209e7d0de26866501010321a6f0000c0a806f3453f602800060014; num1 = 15'hffff; len_tcp = buff1[159:0]; src_addr = buff1[191:160]; dst_addr= buff1[223:192]; tcplen= buff1[239:224]; prot_tcp=buff1[255:225];//claculate sum of all 16 bit words for( i=0; i