i'm beginner but still, cant believe i can't make so simple code to work. i have Digilent Nexys2 FPGA, programming xilinx ISE my goal is to print number "2" and "1" on two, different seven segment displays (i want to see "21" on it with my eyes. A,B,C,D,E,F,G,P are the leds of displays (kathodes), AN0 and AN1 are anodes of displays, 0 turns them on).
the logic i am trying to invest there, is that the FPGA will repeat this 'process' so quickly that my eye will only detect the light on. i think the reason i should put clk in process sensitivity list is that every time the clock changes, it will go into the process and execute my commands, am i right? what logical mistakes am i making here? i tried to make if else statement where IF rising_edge (clk) then "1" will be displayed else "2" but it still caused some errors.. what the heck? should i make this process clocked?
here is the warning i get when i want to synthesize it
WARNING:Xst:647 - Input <clk> is never used. This port will be preserved and left unconnected if it belongs to a top-level block or it belongs to a sub-block and the hierarchy of this sub-block is preserved.
here are the warnings i get when i try to generate a programming bit file
WARNING:PhysDesignRules:367 - The signal <clk_IBUF> is incomplete. The signal does not drive any load pins in the design.
WARNING:Par:288 - The signal clk_IBUF has no load. PAR will not attempt to route this signal.
WARNING:Par:283 - There are 1 loadless signals in this design. This design will cause Bitgen to issue DRC warnings.
WARNING:PhysDesignRules:367 - The signal <clk_IBUF> is incomplete. The signal does not drive any load pins in the design.
and
here is the UCF- file:
NET "clk" LOC = B8;
NET "A" LOC = L18;
NET "B" LOC = F18;
NET "C" LOC = D17;
NET "D" LOC = D16;
NET "E" LOC = G14;
NET "F" LOC = J17;
NET "G" LOC = H14;
NET "P" LOC = C17;
NET "AN0" LOC = F17;
NET "AN1" LOC = H17;
NET "AN2" LOC = C18;
NET "AN3" LOC = F15;
and here comes the code itself:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity disp is
Port (
clk : in STD_LOGIC;
A : out STD_LOGIC;
B : out STD_LOGIC;
C : out STD_LOGIC;
D : out STD_LOGIC;
E : out STD_LOGIC;
F : out STD_LOGIC;
G : out STD_LOGIC;
P : out STD_LOGIC;
AN0 : out STD_LOGIC;
AN1 : out STD_LOGIC;
AN2 : out STD_LOGIC;
AN3 : out STD_LOGIC
);
end disp;
-- main idea: writing "21" on seven segment display.
architecture BEHAV of disp is
begin
process (clk)
begin
--writing '1' ( AN0 is on )
AN0 <='0';
AN1 <='1';
AN2 <='1';
AN3 <='1';
A <='1';
B <='0';
C <='0';
D <='1';
E <='1';
F <='1';
G <='1';
P <='1';
--writing '2' ( AN1 is on )
AN0 <='1';
AN1 <='0';
AN2 <='1';
AN3 <='1';
A <='0';
B <='0';
C <='1';
D <='0';
E <='0';
F <='1';
G <='0';
P <='1';
end process;
end BEHAV;