complex assignment not supported

Viewed 58

I wrote a fixed point divider module and this part of the code is related to post shifting (quotient, reminder normalization). In Modelsim/Quartus simulation, it works properly but every time I synthesize the code, Vivado comes up with --> complex assignment not supported error. Do you have any idea?

process(rst,done,ir_jq)
variable QLSLD,RLSLD:std_logic_vector(1 downto 0);
variable h:integer;
variable p:integer;
variable flg:boolean;
    begin
        if (rst='1')then
            h:=0;
            p:=0;
            ir_jq<=0;
            flg:=true;
            RLSLD:="00";
            QLSLD:="00";
            tmp_reminder<=(others=>'0');
            tmp_quotient<=(others=>'0');
    --post shifting notification
        elsif(done='1')then
            ir_jq<= ir-jq;
            for m in 0 to lc loop
                h:=2*m;
                if( Reminder(Wordlength-h downto Wordlength-(h+1))="01" or Reminder(Wordlength-h downto Wordlength-(h+1))="10") then
                    report "The value of 'h' is " & integer'image(h);
                    exit;
                end if;
            end loop;
            
            if(ir>jq and jq-h>0) then
                p:=jq-h-(ir-jq-2);
                report "The value of 'p' is " & integer'image(p);
            elsif((ir=jq or ir<jq) and jq-h>0) then 
                p:=(ir-h);
                report "The value of 'p' is " & integer'image(p);
            elsif (jq-h<1 or ir-h<1)then
                p:=0;
                h:=h+p;
                report "The value of 'h' is " & integer'image(h);
                report "The value of 'p' is " & integer'image(p);
            end if;
            
        -- Part 1: check if both dividend's and divisior's Non-Zero leading digits are in the same position.
        -- The quotient is 0.5 < Quotient < 2.0. 
        
            if(ir=jq)then
                tmp_reminder(Wordlength downto 18+p)<=(others=>'0');
                tmp_quotient(Wordlength downto ir)<=Quotient(Wordlength-ir downto 0);
                if(ir/=0)then
                    tmp_quotient(ir-1 downto 0)<=(others=>'0');
                end if;
                if(ir>12)then
                    tmp_reminder(17+p downto ir-14)<=Reminder(Wordlength-ir+p downto 0); --> Error line
                    if(ir>14)then
                        tmp_reminder(ir-15 downto 0)<=(others=>'0');
                    end if;
                else
                    tmp_reminder(17+p downto 0)<=Reminder(Wordlength-ir+p downto 14-ir);
                end if;
                
        -- Part 2: check if dividend's Non-Zero leading digit is lower position than divisior's .
        -- The quotient is 0.0 < Quotient ≤ 5.0 . 
            
            elsif(ir>jq)then
                tmp_reminder(Wordlength downto 16+p)<=(others=>'0');
                tmp_quotient(Wordlength downto jq)<=Quotient(Wordlength-jq downto 0);
                if(jq/=0)then
                    tmp_quotient(jq-1 downto 0)<=(others=>'0');
                end if;
                --tmp_reminder(Wordlength downto h)<=Quotient(Wordlength-h downto 0);
                --if(h/=0)then
                --tmp_reminder(h-1 downto 0)<=(others=>'0');
                --end if;
                if(jq>14)then
                    if (15+p-(Wordlength-h)<0) then
                        tmp_reminder(15+p downto 0)<=Reminder(Wordlength-h downto Wordlength-h-(15+p));     
                    else
                        tmp_reminder(15+p downto 15+p-(Wordlength-h))<=Reminder(Wordlength-h downto 0); --> Error line
                        if(jq>16)then
                            tmp_reminder( jq-15-(ir-jq) downto 0)<=(others=>'0');
                        end if;
                    end if;
                else    
                    tmp_reminder(15+p  downto 0)<=Reminder(Wordlength-(h) downto Wordlength-(h)-(15+p));
                end if;
            
        -- Part 2: check if divisor's Non-Zero leading digit is lower position than dividend's .
        -- The quotient is 2.0 ≤ Quotient ≤ (2^n)-1.
        
            elsif(ir<jq)then
                tmp_reminder(Wordlength downto 18+p)<=(others=>'0');
                tmp_quotient(Wordlength downto ir)<=Quotient(Wordlength-ir downto 0);
                if(ir/=0)then
                    tmp_quotient(ir-1 downto 0)<=(others=>'0');
                end if;
                if(ir>10)then
                    if (17+p-(Wordlength-h)<0) then
                        tmp_reminder(17+p downto 0)<=Reminder(Wordlength-h downto Wordlength-h-(17+p)); 
                    else
                        tmp_reminder(17+p downto 17+p-(Wordlength-h))<=Reminder(Wordlength-h downto 0);--> Error line
                        if(ir>12)then
                            tmp_reminder( 16+p-(Wordlength-h) downto 0)<=(others=>'0');
                        end if;
                    end if;
                elsif(ir<12)then
                    tmp_reminder(17+p  downto 0)<=Reminder(Wordlength-(h) downto Wordlength-(h)-(17+p));                    
                end if;
            end if;
        end if;
        
end process;
0 Answers
Related