02-08-2018 04:15 AM
i have made a very simple VHDL program using a easy starter guide. When i clicked run simulation the program wont go past the loading.. i have tried many different codes and this allways happens.. Here is a picture
My VHDL code:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity AND_GATE is
Port ( a : in STD_LOGIC;
b : in STD_LOGIC;
c : out STD_LOGIC);
end AND_GATE;
architecture Behavioral of AND_GATE is
begin
c <= a AND b;
end Behavioral;
My Testbench:
library IEEE;
use IEEE.Std_logic_1164.all;
use IEEE.Numeric_Std.all;
entity AND_GATE_tb is
end;
architecture bench of AND_GATE_tb is
component AND_GATE
Port ( a : in STD_LOGIC;
b : in STD_LOGIC;
c : out STD_LOGIC);
end component;
signal a: STD_LOGIC;
signal b: STD_LOGIC;
signal c: STD_LOGIC;
begin
uut: AND_GATE port map ( a => a,
b => b,
c => c );
stimulus: process
begin
a <= '0';
b <= '0';
wait for 10 ns;
a <= '1';
b <= '0';
wait for 10 ns;
a <= '0';
b <= '1';
wait for 10 ns;
a <= '1';
b <= '1';
wait for 10 ns;
a <= '0';
b <= '0';
wait;
end process;
end;
02-08-2018 04:42 AM
The XSIM compiler is your 1st friend, are looking at the compiler generated messages?
Moreover....
entity AND_GATE_tb is
end;
should be -
entity AND_GATE_tb is
end AND_GATE_tb;
Similar problem when you are ending/closing architecture Behavioral of AND_GATE is
------------FPGA enthusiast------------
Consider giving "Kudos" if you like my answer. Please mark my post "Accept as solution" if my answer has solved your problem
02-08-2018 04:47 AM
i cant look annywhere because the whole program is stuck in loading simulation..
02-08-2018 04:55 AM
If you can't kill Vivado, then please open your source code in a separate text editor and check.
------------FPGA enthusiast------------
Consider giving "Kudos" if you like my answer. Please mark my post "Accept as solution" if my answer has solved your problem
02-14-2018 02:53 AM
Hi @jonar1995,
Welcome to VHDL in VIvado, here are a few tips that might make it easier for you.
Vivado has language templates built in that you can fill out, this can make it easier to avoid syntax errors.
Having said that copying and pasting code is frequently not your friend.
You can also check the syntax of your design at any stage using the check_syntax command in the tcl console e.g.
check_syntax
INFO: [Vivado 12-4796] No errors or warning reported.
Btw I ran your code in the simulator and it completed as expected.
Best Regards
Aidan