K
kb33
Guest
Hi,
I have the following code:
//IP_src_addr signal.....
reg [31:0] IP_src_addr,
IP_src_addr_comb;
//Flip-flop generation...
always @(negedge sys_clk)
begin
IP_src_addr <= #1 IP_src_addr_comb;
end
//Combinational Logic...
always @(reset_n or pkt_enab_n or byte_counter or pkt_in or
IP_src_addr)
begin
if(~reset_n)
begin
IP_src_addr_comb <= 0;
end
else
if(~pkt_enab_n)
casex (byte_counter)
34:
IP_src_addr_comb[31:24] <= pkt_in;
35:
IP_src_addr_comb[23:16] <= pkt_in;
36:
IP_src_addr_comb[15:8] <= pkt_in;
37:
IP_src_addr_comb[7:0] <= pkt_in;
default:
IP_src_addr_comb <= IP_src_addr;
endcase
else
IP_src_addr_comb <= 0;
end
When I try to synthesize this code with Synplicity, I get the following
error(for each one of the 32 bits of register IP_src_addr_comb) :
@W: CL118 kt_incom.v:303:5:303:6|Latch generated from always block
for signal IP_src_addr_comb, probably caused by a missing assignment in
an if or case stmt
I would like to know where I am making a mistake in the case statement
(or somewhere else) due to which this error is being generated.
Thanks,
Kanchan
I have the following code:
//IP_src_addr signal.....
reg [31:0] IP_src_addr,
IP_src_addr_comb;
//Flip-flop generation...
always @(negedge sys_clk)
begin
IP_src_addr <= #1 IP_src_addr_comb;
end
//Combinational Logic...
always @(reset_n or pkt_enab_n or byte_counter or pkt_in or
IP_src_addr)
begin
if(~reset_n)
begin
IP_src_addr_comb <= 0;
end
else
if(~pkt_enab_n)
casex (byte_counter)
34:
IP_src_addr_comb[31:24] <= pkt_in;
35:
IP_src_addr_comb[23:16] <= pkt_in;
36:
IP_src_addr_comb[15:8] <= pkt_in;
37:
IP_src_addr_comb[7:0] <= pkt_in;
default:
IP_src_addr_comb <= IP_src_addr;
endcase
else
IP_src_addr_comb <= 0;
end
When I try to synthesize this code with Synplicity, I get the following
error(for each one of the 32 bits of register IP_src_addr_comb) :
@W: CL118 kt_incom.v:303:5:303:6|Latch generated from always block
for signal IP_src_addr_comb, probably caused by a missing assignment in
an if or case stmt
I would like to know where I am making a mistake in the case statement
(or somewhere else) due to which this error is being generated.
Thanks,
Kanchan