verilog code

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

Reply to
Ambreen Ashfaq Afridi
Loading thread data ...

The error is referring to a identifier named "scr_addr" but probably it should be "src_addr". In the version of the rtl you have a typo. But interestingly the code you posted doesn't have a scr_addr in it.

Reply to
Muzaffer Kal

The error is referring to an identifier named "scr_addr" but probably it should be "src_addr". In the version of the rtl you have a typo. But interestingly the code you posted doesn't have a scr_addr in it.

Reply to
Muzaffer Kal

chkchk(buff1,len_tcp,src_addr,dest_addr,word,word32,tcplen,prot_tcp,led1,led2,sum);

You do declare src_addr here

Reply to
Lorenz Kolb

1,le=ADd2,sum);
Reply to
Jon Beniston

I know those "did you mean" messages. Nevertheless they do not automatically repair the code. A human can read any text as lnog as the frsit and the lsat lteetrs are ccrerot and the lttrees in bwteeen are in ttaol dsroiedr. This has been proven ;-)

(Sorry for the disordered letters above I couldn't resist, personally I thing dsroiedr is the hardest one).

Regards,

Lorenz

Reply to
Lorenz Kolb

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.