Discussion in 'VHDL' started by sunwij, Dec 28, 2003.

  1. sunwij

    sunwij Guest

    Following is a portion of the code which calculates a rate of rain
    fall at a remote location and executes a specfic task if the rate
    exceeds a given threshold. Synopsis throws following error: "
    STANDARD.STD" package not found

    Am I missing any specific pkg. Tried http://www.eda.org/fphdl/
    read the whole page. None found. As a work around I am using a
    function to do division which uses lot of hardware.

    library ieee;
    use ieee.std_logic_1164.all;
    use ieee.numeric_std.all;
    use ieee.math_real.all;
    entity real_division is port ( rain_fall : in real;
    time_elapsed: in real;
    rain_rate: out real}
    end real_division;
    architecture myreal_division of real_division is

    Signal a1,b1 :real;


    a1<= rain_fall;
    b1<= time_elapsed;
    process (a1,b1)
    rain_rate <=a1/b1;

    end process;

    end real_division;
    sunwij, Dec 28, 2003
    1. Advertisements

  2. sunwij

    David Bishop Guest

    First off, "real" is not synthesizable, since it is implementation
    dependent (I know that that is fixed in vhdl-2000). In the floating
    point packages, I created a type called "fp32".
    Download "fphdl_base_pkg.vhd", "fphdl_base_pkg_body.vhd", and
    replace this line with:
    use work.fphdl32_pkg.all;
    Change "real" to "fp32" (32 bit floating point number).
    Once again, "fp32".
    Now this still won't work in Synopsys. Why? Synopsys can't do a
    divide that isn't a divide by 2.
    Not to worry. In "fphdl_base_pkg_body.vhd" you will find a synthesizable
    unsigned divide routine that will work fine with Synopsys.

    The downside here is that the divider will not be very fast. I have one
    that will work at 100 MHz in a "Xilinx" part if you want it.
    David Bishop, Dec 28, 2003
    1. Advertisements

  3. sunwij

    sunwij Guest

    Thanks so much for your valuble advise.

    sunwij, Dec 29, 2003
  4. sunwij

    sunwij Guest

    Is this "Xlinix" part is hardware or a VHDL code ? . Please give
    little more details. Thanks
    sunwij, Dec 29, 2003
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.