Reputation: 1212
I'm trying to compile the following component in GHDL in Ubuntu 17.10. This is the code of the component:
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all; -- Unsigned
entity simple is end simple;
architecture behaviour of simple is
signal clk : std_logic := '0';
signal sigterm : std_logic := '0';
signal counter : unsigned(7 downto 0) := x"00";
begin
process
begin
wait for 5 us;
clkloop : loop
wait for 1 us;
clk <= not clk;
if sigterm = '1' then
exit;
end if;
end loop clkloop;
wait for 5 us;
wait;
end process;
process (clk)
begin
if rising_edge(clk) then
if counter = 16 then
sigterm <= '1';
end if;
counter <= counter + 1;
end if;
end process;
end behaviour;
I'm getting this error message while elaborating the component:
ghdl:*command-line*: bad character in identifier
I'm using the following flags in order to make the commands work in my 64-bits machine, I don't know if they are totally OK:
ghdl -a -Wa,--32 -Wl,--32 simple.vhdl
ghdl -e -Wa,--32 -Wl,--32 simple.vhdl
Upvotes: 1
Views: 1583
Reputation: 28945
This is an elaboration error message: what is expected here is the name of a design unit, not a file name, plus, if it is not the default work
, the name of the library.
ghdl -a -Wa,--32 -Wl,--32 simple.vhdl
ghdl -e -Wa,--32 -Wl,--32 simple
Or, if you compile simple.vhdl
in library foolib
:
ghdl -a -Wa,--32 -Wl,--32 --work=foolib simple.vhdl
ghdl -e -Wa,--32 -Wl,--32 --work=foolib simple
Upvotes: 1