R
ric
Guest
Hi,guys!
I have maybe a silly question,but it confused me all the day,the
question is:
I have a function with 5-inputs and one output,and thus XST maps to
2 LUTs in the Xilinx FPGA,but I think its a bit too wasteful--there is
about 5000 such functions in my design.So I want to use a 4-input LUT
and a D-LATCH with async clear instead(one of the 5-inputs is used to
clear the output).But,the question is,I do use the LUT and latch in
the same slice,but the other LUT in the same slice can not be used by
other logic!
Why my method could not work?Is there any resource conflict?
Appreciate for your help!Thanks!
ps.
My verilog code is like this:
always @ (zero_flag or a or b )
if (zero_flag)
o_tmp_data <= 14'h0 ;
else if (b[1:0] == 2'b00)
o_tmp_data <= a[13:0] ;
else if (b[1:0] == 2'b01)
o_tmp_data <= {a[12:0],1'b0} ;
else if (b[1:0] == 2'b11)
o_tmp_data <= ~a[13:0] ;
else
o_tmp_data <= {~a[12:0],1'b1} ;
or I use two blocks and the other block is exactly like what Xilinx
suggests in its template,but the XST could not recognize it as a LUT
and a latch,and still 2 LUTs.I wonder if I miss something?
I have maybe a silly question,but it confused me all the day,the
question is:
I have a function with 5-inputs and one output,and thus XST maps to
2 LUTs in the Xilinx FPGA,but I think its a bit too wasteful--there is
about 5000 such functions in my design.So I want to use a 4-input LUT
and a D-LATCH with async clear instead(one of the 5-inputs is used to
clear the output).But,the question is,I do use the LUT and latch in
the same slice,but the other LUT in the same slice can not be used by
other logic!
Why my method could not work?Is there any resource conflict?
Appreciate for your help!Thanks!
ps.
My verilog code is like this:
always @ (zero_flag or a or b )
if (zero_flag)
o_tmp_data <= 14'h0 ;
else if (b[1:0] == 2'b00)
o_tmp_data <= a[13:0] ;
else if (b[1:0] == 2'b01)
o_tmp_data <= {a[12:0],1'b0} ;
else if (b[1:0] == 2'b11)
o_tmp_data <= ~a[13:0] ;
else
o_tmp_data <= {~a[12:0],1'b1} ;
or I use two blocks and the other block is exactly like what Xilinx
suggests in its template,but the XST could not recognize it as a LUT
and a latch,and still 2 LUTs.I wonder if I miss something?