That is because you have not included the package that contains them, ieee.std_logic_arith, but you should not use this package as it is not a vhdl standard package. You should use numeric_std instead.
Actually, it was FvM who led Binome down the wrong path since it was his code that Binome is basically having troubles compiling.
@Binome: As Tricky mentions, the package ieee.std_logic_arith (which contains the 'conv_unsigned' function) is not really a VHDL standard, it is however a defacto standard since it has been in use a long time and is still actively being used. It has a few issues though which make numeric_std the better choice. You simply add a 'use work.ieee.numeric_stc.all;' statement just like the 'use ieee.std_logic_1164.all' statement that you already have.
Ieee.numeric_std contains a function called 'to_unsigned' which converts integers to a representation of an 'unsigned' value. That function takes two arguments just like 'conv_unsigned'. The first argument is the integer you would like to convert; the second argument defines how many bits are to be in this unsigned representation. These arguments are exactly the same as 'conv_unsigned' so the bottom line is that you simply need to do a text substitution of 'conv_unsigned' to 'to_unsigned'.
Extending this a bit, you could ask yourself why bother making the rom table be an array of std_logic_vectors when they are intended to hold unsigned? Rather than this...
TYPE SINTAB IS ARRAY(0 TO 7) OF STD_LOGIC_VECTOR (7 DOWNTO 0);
Do this instead...
TYPE SINTAB IS ARRAY(0 TO 7) OF unsigned (7 DOWNTO 0);
By using the correct data types in the first place, you avoid cluttering the code with type conversions. In this case, you have
SINROM(idx) <= STD_LOGIC_VECTOR(xn);
Which, if SINROM was an array of unsigned like you intend it to be, could be simply...
SINROM(idx) <= xn;
Or even more simply, get rid of xn completly and have...
SINROM(idx) <= to_unsigned((INTEGER(x*real(8)),8));
or
SINROM(idx) <= to_unsigned((INTEGER(x*8.0),8));
Actually, since your table is computing sine values you really don't want to use unsigned, they should be type signed like this...
TYPE SINTAB IS ARRAY(0 TO 7) OF signed (7 DOWNTO 0);
Taking this to the final conclusion, sin(x) is always between -1.0 and +1.0 so your table should be an array of fixed point signed values like this...
TYPE SINTAB IS ARRAY(0 TO 7) OF sfixed (1 DOWNTO -6);
Then you would need the conversion function to convert between real and sfixed. This function is included in the fixed point package: to_sfixed to be specific.
Kevin Jennings