Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
10 years ago

Modelsim error

Hii i am using Modelsim student edition for the simulation of my edge detection code.

I am getting the following error....

** Error: fixed_pkg Unbounded number passed, was a literal used?**

can any one please suggest what is the meaning of this error???

Thanx and regards!!

13 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    Very little information to go on:

    What version of modelsim?

    what version of fixed_pkg?

    post some code?

    --- Quote End ---

    Sorry for less information...I am using model sim 10.4a PE student version.And fixed_package is of $Revision: 1.11 $ version.

    Actually my code is of 877 lines so its not possible to paste the complete code.Also I am having two more modules with it. It is showing error in the following process ..

    angle1: process (clk)

    variable index2 :integer:=0;

    variable index3 :integer:=0;

    variable count1 :integer:=0;

    VARIABLE row_cnt_m: INTEGER:=0;--row count

    VARIABLE col_cnt_m: INTEGER:=0;--coloumn count

    VARIABLE col_tr_m: BOOLEAN:=FALSE;--end of coloumn

    begin

    IF(clk'EVENT AND clk='1') THEN

    mod_d <= unsigned(to_ufixed(resize((abs(dx)+abs(dy)),7,0))); --Resize the result to 8 bits

    buffm(index2)<=(mod_d);

    index2 := index2+1;

    col_cnt_m := col_cnt_m +1;

    count1 := count1+1;

    --at end of one row

    IF (count1=256) THEN

    row_cnt_m:=row_cnt_m+1;

    IF (col_tr_m=FALSE) THEN

    col_res_m<=col_cnt_m;

    col_tr_m:=TRUE;

    END IF;

    count1 := 0;

    col_cnt_m :=0;

    END IF;

    --at end of one frame

    IF (index2=65535) THEN

    row_res_m<=row_cnt_m;

    row_cnt_m:=0;

    col_cnt_m:=0;

    index2:=0;

    count1 := 0;

    END IF;

    IF (row_cnt_m=3) THEN

    prv_load_m<='1';

    cur_load_m<='1';

    nex_load_m<='1';

    END IF;

    IF (dx /= "000000000000000" ) THEN

    IF (dy /= "000000000000000" ) THEN

    div <= resize((dy /dx),8,-3);

    END IF;

    END IF;

    if ((num1 < div AND div < num2)or( num5 < div AND div < num1) ) then

    data <= my_lut(4);

    elsif (num2 < div AND div < num4 ) then

    data <= my_lut(1);

    elsif ((num4 < div AND div < num8) OR (num7< div AND div < num6) ) then

    data <= my_lut(2);

    elsif (num6 < div and div < num5) then

    data <= my_lut(3);

    end if;

    bufang(index3) <= data;

    index3 := index3 +1;

    if (index3 =65535) then

    index3 := 0;

    end if;

    END IF;

    end process angle1;

    I am taking a 256 * 256 image.And this is the part for angle calculation in canny edge detector.my_lut is a lookup table having values 0 ,45,90 and 135 in degree.and variable num is different variable range in sfixed formate.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Very little information to go on:

    What version of modelsim?

    what version of fixed_pkg?

    post some code?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Why would you think anyone will know what's wrong when you didn't include any code?