Hello all,
I'm trying to build this simple code for the rot13 algorithm:
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use IEEE.std_logic_unsigned.all;
entity rot13 is port (
port_in: in std_logic_vector(7 downto 0);
port_out: out std_logic_vector(7 downto 0) ;
clk, start: in std_logic
);
end rot13;
architecture encrypt of rot13 is
begin
rot:
process (clk, start)
begin
if ((clk and start) = '1') then
if ((port_in > "01000000" AND port_in < "01001110") OR
(port_in > "01100000" AND port_in < "01101110")) then
port_out <= port_in + "00001101";
elsif ((port_in > "01001101" AND port_in < "01011011") OR
(port_in > "01101101" AND port_in < "01111011")) then
port_out <= port_in - "00001101";
else
port_out <= port_in;
end if;
end if;
end process;
end architecture encrypt;
And I'm getting this results:
:~$ ghdl -a rot13.vhdl
rot13.vhdl:4:10: primary unit "std_logic_arith" not found in library "ieee"
rot13.vhdl:5:10: primary unit "std_logic_unsigned" not found in library "ieee"
ghdl: compilation error
:~$ vim rot13.vhdl
Can anyone tell me how to make this code compile??
Where is these units ??
I've checked the whole library looking for this ones and found them here:
/usr/lib/ghdl/lib/gcc/i486-linux-gnu/4.1.1/vhdl/lib/v93/synopsys/std_logic_arith.o
/usr/lib/ghdl/lib/gcc/i486-linux-gnu/4.1.1/vhdl/lib/v93/mentor/std_logic_arith.o
/usr/lib/ghdl/lib/gcc/i486-linux-gnu/4.1.1/vhdl/lib/v93/mentor/std_logic_arith_body.o
/usr/lib/ghdl/lib/gcc/i486-linux-gnu/4.1.1/vhdl/lib/v87/synopsys/std_logic_arith.o
/usr/lib/ghdl/lib/gcc/i486-linux-gnu/4.1.1/vhdl/src/synopsys/std_logic_arith.vhdl
/usr/lib/ghdl/lib/gcc/i486-linux-gnu/4.1.1/vhdl/src/mentor/std_logic_arith.vhdl
/usr/lib/ghdl/lib/gcc/i486-linux-gnu/4.1.1/vhdl/src/mentor/std_logic_arith_body.vhdl
/usr/lib/ghdl/lib/gcc/i486-linux-gnu/4.1.1/vhdl/lib/v93/synopsys/std_logic_unsigned.o
/usr/lib/ghdl/lib/gcc/i486-linux-gnu/4.1.1/vhdl/lib/v87/synopsys/std_logic_unsigned.o
/usr/lib/ghdl/lib/gcc/i486-linux-gnu/4.1.1/vhdl/src/synopsys/std_logic_unsigned.vhdl
The vhdl files doesn't matter.. only the already built ones... how to
use them properly ??
I've trying to use "library mentor;" and "library synopsys;" but
didn't work also...
thanks in advance
--
Best Regards,
Felipe Balbi
[EMAIL PROTECTED]
_______________________________________________
Ghdl-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/ghdl-discuss