I have a very frustrating problem and would really appreciate some help.
I am trying to test a RAM block using the switches and LED's on board the Nexys A7-100T FPGA development board. My code is synthesising fine but fails on implementation due to the errors shown in the image below.
I have also shown my constraint file and top level code file.
I am new to FPGA boards and I am unsure what I am doing wrong. I have tested this code on testbench and it works perfect. Would like to map it onto the FPGA to learn how.
EDIT
I have the clocks commented out in the constraints file as they caused even more errors.
Thanks!
Constraints file
#create_clock -period 10.000 -name clk -waveform {0.000 5.000} [get_ports clk]
#set_property -dict { PACKAGE_PIN E3 IOSTANDARD LVCMOS33 } [get_ports { clk }];
set_property -dict { PACKAGE_PIN P17 IOSTANDARD LVCMOS33 } [get_ports { Set_Button }]; #IO_L12P_T1_MRCC_14 Sch=btnl
set_property -dict { PACKAGE_PIN M17 IOSTANDARD LVCMOS33 } [get_ports { Enable_Button }]; #IO_L10N_T1_D15_14 Sch=btnr
set_property -dict { PACKAGE_PIN J15 IOSTANDARD LVCMOS33 } [get_ports { RAM_Address[0] }]; #IO_L24N_T3_RS0_15 Sch=sw[0]
set_property -dict { PACKAGE_PIN L16 IOSTANDARD LVCMOS33 } [get_ports { RAM_Address[1] }]; #IO_L3N_T0_DQS_EMCCLK_14 Sch=sw[1]
set_property -dict { PACKAGE_PIN M13 IOSTANDARD LVCMOS33 } [get_ports { RAM_Address[2] }]; #IO_L6N_T0_D08_VREF_14 Sch=sw[2]
set_property -dict { PACKAGE_PIN R15 IOSTANDARD LVCMOS33 } [get_ports { RAM_Address[3] }]; #IO_L13N_T2_MRCC_14 Sch=sw[3]
set_property -dict { PACKAGE_PIN H17 IOSTANDARD LVCMOS33 } [get_ports { Data_out[0] }]; #IO_L18P_T2_A24_15 Sch=led[0]
set_property -dict { PACKAGE_PIN K15 IOSTANDARD LVCMOS33 } [get_ports { Data_out[1] }]; #IO_L24P_T3_RS1_15 Sch=led[1]
set_property -dict { PACKAGE_PIN J13 IOSTANDARD LVCMOS33 } [get_ports { Data_out[2] }]; #IO_L17N_T2_A25_15 Sch=led[2]
set_property -dict { PACKAGE_PIN N14 IOSTANDARD LVCMOS33 } [get_ports { Data_out[3] }]; #IO_L8P_T1_D11_14 Sch=led[3]
Top level file
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
use work.Architecture_size.ALL;
entity RAM_Block is
Port ( RAM_Address : in std_logic_vector (Data_width-1 downto 0);
Data_in : in std_logic_vector (Data_width-1 downto 0);
Set_Button : in std_logic;
Enable_Button : in std_logic;
Data_out : out std_logic_vector (Data_width-1 downto 0));
end RAM_Block;
architecture Behavioral of RAM_Block is
component Enabler_Block is
Port ( A : in std_logic_vector(Data_width-1 downto 0);
Enable : in std_logic;
Q : out std_logic_vector(Data_width-1 downto 0));
end component;
type memory is array (0 to 3) of std_logic_vector (Data_width-1 downto 0);
signal RAM : memory := ("0000" , "0000" , "0000" , "0000");
signal RAM_output : std_logic_vector (Data_width-1 downto 0);
signal RAM_Address_int : integer;
begin
Enabler_Block_instance : Enabler_Block port map (A => RAM_output , Enable => Enable_Button , Q => Data_out);
RAM_Address_int <= conv_integer(unsigned(RAM_Address));
Process (Set_Button , Enable_Button)
begin
if(rising_edge(Set_Button) and Set_Button = '1') then
RAM(RAM_Address_int) <= Data_in;
end if;
if(rising_edge(Enable_Button) and Enable_Button = '1') then
RAM_output <= RAM(RAM_Address_int);
end if;
end Process;
end Behavioral;