velu.plg
Member level 5
- Joined
- Jul 30, 2013
- Messages
- 93
- Helped
- 1
- Reputation
- 2
- Reaction score
- 1
- Trophy points
- 1,288
- Location
- chennai
- Activity points
- 1,974
this is my simple code for ADC.
error in that code is........
pls give the idea to remove the error...
Code VHDL - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; use ieee.numeric_bit.all; use ieee.numeric_std; use ieee.std_logic_arith.all; entity adc is port(clk:in std_logic;a:in std_logic_vector(15 downto 0);vout:out real); end adc; architecture a_body of adc is begin process(clk) begin if(clk='1')then Vout <= (3.3 * ((real((to_integer(unsigned(a)))) / 65535.0))); end if; end process; end a_body;
error in that code is........
** Error: D:/project files/wsn and prng/foldedtree.vhd(18): (vcom-1078) Identifier "unsigned" is not directly visible.
Potentially visible declarations are:
ieee.std_logic_arith.unsigned (type declaration)
ieee.numeric_bit.unsigned (type declaration)
** Error: D:/project files/wsn and prng/foldedtree.vhd(18): Illegal type conversion to std.standard.real (operand type is not known).
** Error: D:/project files/wsn and prng/foldedtree.vhd(22): VHDL Compiler exiting
pls give the idea to remove the error...
Last edited by a moderator: