--- Quote Start ---
Hi Rysc:
Yes, there is a too long "if elsif". So the tool sythnsesize it to many mux. The "if elsif"'s lenth is desided by the sorter's depth. However, i must need the sorter's depth not short than 30.
--- Quote End ---
process(clkin,reset)
begin
if reset='0' then
sorter_empty <= '1';dum_push <= '0';dum_cnt <= (others => '0');
reg1_sort <= (others => '0');reg2_sort <= (others => '0');reg3_sort <= (others => '0');reg4_sort <= (others => '0');
reg5_sort <= (others => '0');reg6_sort <= (others => '0');reg7_sort <= (others => '0');reg8_sort <= (others => '0');reg9_sort <= (others => '0');
reg10_sort <= (others => '0');reg11_sort <= (others => '0');reg12_sort <= (others => '0');reg13_sort <= (others => '0');reg14_sort <= (others => '0');
reg15_sort <= (others => '0');reg16_sort <= (others => '0');reg17_sort <= (others => '0');reg18_sort <= (others => '0');reg19_sort <= (others => '0');
reg20_sort <= (others => '0');reg21_sort <= (others => '0');reg22_sort <= (others => '0');reg23_sort <= (others => '0');reg24_sort <= (others => '0');
reg25_sort <= (others => '0');reg26_sort <= (others => '0');reg27_sort <= (others => '0');reg28_sort <= (others => '0');reg29_sort <= (others => '0');
reg30_sort <= (others => '0');reg31_sort <= (others => '0');reg32_sort <= (others => '0');reg33_sort <= (others => '0');
elsif clkin'event and clkin='1' then
if d_valid='1' then
dum_cnt <= (others => '0');
if sorter_empty='1' then
reg1_sort <= reg0_sort;
sorter_empty <= '0';
else--sorter_empty=0
if reg0_sort(46 downto 0)<reg32_sort(46 downto 0) then
reg33_sort <= reg0_sort;
elsif reg0_sort(46 downto 0)<reg31_sort(46 downto 0) then
reg32_sort <= reg0_sort;reg33_sort <= reg32_sort;
elsif reg0_sort(46 downto 0)<reg30_sort(46 downto 0) then
reg31_sort <= reg0_sort;reg32_sort <= reg31_sort;reg33_sort <= reg32_sort;
elsif reg0_sort(46 downto 0)<reg29_sort(46 downto 0) then
reg30_sort <= reg0_sort;
reg31_sort <= reg30_sort;reg32_sort <= reg31_sort;reg33_sort <= reg32_sort;
elsif reg0_sort(46 downto 0)<reg28_sort(46 downto 0) then
reg29_sort <= reg0_sort;reg30_sort <= reg29_sort;
reg31_sort <= reg30_sort;reg32_sort <= reg31_sort;reg33_sort <= reg32_sort;
elsif reg0_sort(46 downto 0)<reg27_sort(46 downto 0) then
reg28_sort <= reg0_sort;reg29_sort <= reg28_sort;reg30_sort <= reg29_sort;
reg31_sort <= reg30_sort;reg32_sort <= reg31_sort;reg33_sort <= reg32_sort;
elsif reg0_sort(46 downto 0)<reg26_sort(46 downto 0) then
reg27_sort <= reg0_sort;reg28_sort <= reg27_sort;reg29_sort <= reg28_sort;
reg30_sort <= reg29_sort;reg31_sort <= reg30_sort;reg32_sort <= reg31_sort;reg33_sort <= reg32_sort;
elsif reg0_sort(46 downto 0)<reg25_sort(46 downto 0) then
.........