I keep receiving an error while compiling my code below in quartus even though it does in the code below:
Error (12002): Port "qsys_dram_clk" does not exist in macrofunction "u0"
library ieee;
use ieee.std_logic_1164.all;
entity flappyroscoe is
port(
CLOCK_50 : IN STD_LOGIC := 'X';
CLOCK_27 : IN STD_LOGIC_VECTOR(0 downto 0);
AUD_XCK : OUT STD_LOGIC;
I2C_SDAT : INOUT STD_LOGIC := 'X';
I2C_SCLK : OUT STD_LOGIC;
AUD_ADCDAT : IN STD_LOGIC := 'X';
AUD_ADCLRCK : IN STD_LOGIC := 'X';
AUD_BCLK : IN STD_LOGIC := 'X';
DRAM_ADDR : OUT STD_LOGIC_VECTOR(11 DOWNTO 0);
DRAM_BA_1 : OUT STD_LOGIC;
DRAM_BA_0 : OUT STD_LOGIC;
DRAM_CAS_N : OUT STD_LOGIC;
DRAM_CKE : OUT STD_LOGIC;
DRAM_CS_N : OUT STD_LOGIC;
DRAM_DQ : INOUT STD_LOGIC_VECTOR(15 DOWNTO 0) := (OTHERS =>
DRAM_UDQM : OUT STD_LOGIC;
DRAM_LDQM : OUT STD_LOGIC;
DRAM_RAS_N : OUT STD_LOGIC;
DRAM_WE_N : OUT STD_LOGIC;
VGA_HS : OUT STD_LOGIC; VGA_VS : OUT STD_LOGIC;
VGA_R : OUT STD_LOGIC_VECTOR(3 DOWNTO 0);
VGA_G : OUT STD_LOGIC_VECTOR(3 DOWNTO 0);
VGA_B : OUT STD_LOGIC_VECTOR(3 DOWNTO 0);
DRAM_CLK : OUT STD_LOGIC
);
end entity;
architecture behavior of flappyroscoe is
component flappy_system is
port (
clk_clk: in std_logic:= 'X';
up_clocks_0_clk_in_secondary_clk: IN STD_LOGIC_VECTOR(0 downto 0);
up_clocks_0_audio_clk_clk: out std_logic;
audio_and_video_config_0_external_interface_SDAT : inout std_logic:= 'X';
audio_and_video_config_0_external_interface_SCLK : out std_logic;
audio_0_external_interface_ADCDAT : in std_logic:= 'X';
audio_0_external_interface_ADCLRCK : in std_logic:= 'X';
audio_0_external_interface_BCLK: in std_logic:= 'X';
qsys_dram_addr : out std_logic_vector(11 downto 0);
qsys_dram_ba : out std_logic_vector(1 downto 0);
qsys_dram_cas_n : out std_logic;
qsys_dram_cke: out std_logic;
qsys_dram_cs_n: out std_logic;
qsys_dram_dq : inout std_logic_vector(15 downto 0) := (others => 'X');
qsys_dram_dqm : out std_logic_vector(1 downto 0);
qsys_dram_ras_n: out std_logic;
qsys_dram_we_n: out std_logic;
qsys_vga_HS: out std_logic;
qsys_vga_VS: out std_logic;
qsys_vga_R: out std_logic_vector(3 downto 0);
qsys_vga_G: out std_logic_vector(3 downto 0);
qsys_vga_B: out std_logic_vector(3 downto 0);
qsys_dram_clk: out std_logic
);
end component flappy_system;
signal dqm_sig,ba_sig: std_logic_vector(1 downto 0);
signal n: std_logic;
begin
DRAM_BA_1 <= ba_sig(1);
DRAM_BA_0 <= ba_sig(0);
DRAM_UDQM <= dqm_sig(1);
DRAM_LDQM <= dqm_sig(0);
u0 : component flappy_system
port map (
clk_clk => CLOCK_50,
up_clocks_0_clk_in_secondary_clk => CLOCK_27,
up_clocks_0_audio_clk_clk => AUD_XCK,
audio_and_video_config_0_external_interface_SDAT => I2C_SDAT,
audio_and_video_config_0_external_interface_SCLK => I2C_SCLK,
audio_0_external_interface_ADCDAT => AUD_ADCDAT,
audio_0_external_interface_ADCLRCK => AUD_ADCLRCK,
audio_0_external_interface_BCLK => AUD_BCLK,
qsys_dram_addr => dram_addr,
qsys_dram_ba => ba_sig,
qsys_dram_cas_n => dram_cas_n,
qsys_dram_cke => dram_cke,
qsys_dram_cs_n => dram_cs_n,
qsys_dram_dq => dram_dq,
qsys_dram_dqm => dqm_sig,
qsys_dram_ras_n => dram_ras_n,
qsys_dram_we_n => dram_we_n,
qsys_vga_HS => vga_HS,
qsys_vga_VS => vga_VS,
qsys_vga_R => vga_R,
qsys_vga_G => vga_G,
qsys_vga_B => vga_B,
qsys_dram_clk => DRAM_CLK
);
end architecture;
Related
I'm having some synthesis issues using 7 series GTX transceiver wizard in my project. I designed a basic custom protocol and a top level wrapper. In behavioral everything works just fine, but when synthesizing project the data bus attached to gt0_txdata_in[15:0] it's not properly rendered thus forcing unknown "X" (same thing happens for gt0_txcharisk_in[1:0]). I'm using Vivado and the compiler doesn't give me any specific warning. I've also looked at gtwizard example design and I'm not doing anything too different from that.
I'm developing my project on Kintex-7 FPGA.
Here is scope and wave window:
(click to enlarge)
(click to enlarge)
Here is my protocol VHDL entity:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
-- Uncomment the following library declaration if using
-- arithmetic functions with Signed or Unsigned values
--use IEEE.NUMERIC_STD.ALL;
-- Uncomment the following library declaration if instantiating
-- any Xilinx leaf cells in this code.
--library UNISIM;
--use UNISIM.VComponents.all;
entity protocol_frame_gen is
Port ( pfg_clk_in : in STD_LOGIC;
pfg_reset_in : in STD_LOGIC;
pfg_data_in : in STD_LOGIC_VECTOR (15 downto 0);
pfg_fifo_empty_in : in STD_LOGIC;
pfg_trasm_rqst_in : in STD_LOGIC;
pfg_fifo_rd_enable_out : out STD_LOGIC;
pfg_data_out : out STD_LOGIC_VECTOR (15 downto 0);
pfg_txcharisk: out STD_LOGIC_VECTOR (1 downto 0)
);
end protocol_frame_gen;
architecture Behavioral of protocol_frame_gen is
type state_type is ( idle, trasmission, dummy_state, end_trasmission);
signal state: state_type;
signal pfg_data_out_reg: STD_LOGIC_VECTOR (15 downto 0):= (others => '0');
signal mux_addr: integer range 0 to 3 := 0;
begin
pfg_data_out <= pfg_data_out_reg;
main: process(pfg_reset_in, pfg_clk_in)
begin
if pfg_reset_in='1' then
state <= idle;
mux_addr <= 0;
pfg_fifo_rd_enable_out <= '0';
elsif rising_edge(pfg_clk_in) then
case state is
when idle =>
if pfg_trasm_rqst_in='1' then
state <= trasmission;
end if;
when trasmission =>
if mux_addr<2 then
mux_addr <= mux_addr+1;
pfg_fifo_rd_enable_out <= '1';
else
null;
end if;
if pfg_fifo_empty_in='1' then
state <= end_trasmission;
pfg_fifo_rd_enable_out <= '0';
mux_addr <= 3;
end if;
when end_trasmission =>
mux_addr <= 0;
state <= idle;
when dummy_state =>
null;
end case;
end if;
end process main;
mux: process (pfg_clk_in)
begin
if rising_edge(pfg_clk_in) then
if mux_addr=0 then
pfg_data_out_reg <= "1111110111111101"; --idle character K29.7 1111110111111101
pfg_txcharisk <= "00";
elsif mux_addr=1 then
pfg_data_out_reg <= "0000000110111100"; --start of frame K28.5 1011110010111100
pfg_txcharisk <= "01";
elsif mux_addr=2 then
pfg_data_out_reg <= pfg_data_in; --valid data
pfg_txcharisk <= "00";
elsif mux_addr=3 then
pfg_data_out_reg <= "0001110000011100"; --end of frame K28.0
pfg_txcharisk <= "00";
end if;
end if;
end process mux;
end Behavioral;
here is wrapper code:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use ieee.numeric_std.all;
use ieee.std_logic_unsigned.all;
use ieee.std_logic_misc.all;
library UNISIM;
use UNISIM.VCOMPONENTS.ALL;
-- Uncomment the following library declaration if using
-- arithmetic functions with Signed or Unsigned values
--use IEEE.NUMERIC_STD.ALL;
library UNISIM;
use UNISIM.VComponents.all;
entity gtx_interface_wrapper is
Port (--reset
gt_soft_reset_in: in STD_LOGIC;
protocol_reset_in: in STD_LOGIC;
--clocking
GTREFCLK_PAD_P_IN: in STD_LOGIC;
GTREFCLK_PAD_N_IN: in STD_LOGIC;
tx_fifo_clk_out : out STD_LOGIC;
rx_fifo_clk_out : out STD_LOGIC;
fsm_clk_in: in STD_LOGIC;
--tx
tx_data_in : in STD_LOGIC_VECTOR (15 downto 0);
tx_fifo_empty_in : in STD_LOGIC;
tx_trasm_rqst_in : in STD_LOGIC;
tx_fifo_rd_enable_out : out STD_LOGIC;
--rx
rx_data_out : out STD_LOGIC_VECTOR (15 downto 0);
rx_fifo_wren_out : out STD_LOGIC;
--serial I/O
gtxtxp_out: out STD_LOGIC;
gtxtxn_out: out STD_LOGIC;
gtxrxp_in: in STD_LOGIC;
gtxrxn_in: IN STD_LOGIC
);
end gtx_interface_wrapper;
architecture Mapping of gtx_interface_wrapper is
----Component Declaration------
component gtwizard_0
port
(
SOFT_RESET_TX_IN : in std_logic;
SOFT_RESET_RX_IN : in std_logic;
DONT_RESET_ON_DATA_ERROR_IN : in std_logic;
Q0_CLK1_GTREFCLK_PAD_N_IN : in std_logic;
Q0_CLK1_GTREFCLK_PAD_P_IN : in std_logic;
GT0_TX_FSM_RESET_DONE_OUT : out std_logic;
GT0_RX_FSM_RESET_DONE_OUT : out std_logic;
GT0_DATA_VALID_IN : in std_logic;
GT0_TX_MMCM_LOCK_OUT : out std_logic;
GT0_RX_MMCM_LOCK_OUT : out std_logic;
GT0_TXUSRCLK_OUT : out std_logic;
GT0_TXUSRCLK2_OUT : out std_logic;
GT0_RXUSRCLK_OUT : out std_logic;
GT0_RXUSRCLK2_OUT : out std_logic;
gt0_cpllfbclklost_out : out std_logic;
gt0_cplllock_out : out std_logic;
gt0_cpllreset_in : in std_logic;
gt0_drpaddr_in : in std_logic_vector(8 downto 0);
gt0_drpdi_in : in std_logic_vector(15 downto 0);
gt0_drpdo_out : out std_logic_vector(15 downto 0);
gt0_drpen_in : in std_logic;
gt0_drprdy_out : out std_logic;
gt0_drpwe_in : in std_logic;
gt0_dmonitorout_out : out std_logic_vector(7 downto 0);
gt0_eyescanreset_in : in std_logic;
gt0_rxuserrdy_in : in std_logic;
gt0_eyescandataerror_out : out std_logic;
gt0_eyescantrigger_in : in std_logic;
gt0_rxdata_out : out std_logic_vector(15 downto 0);
gt0_rxdisperr_out : out std_logic_vector(1 downto 0);
gt0_rxnotintable_out : out std_logic_vector(1 downto 0);
gt0_gtxrxp_in : in std_logic;
gt0_gtxrxn_in : in std_logic;
gt0_rxdfelpmreset_in : in std_logic;
gt0_rxmonitorout_out : out std_logic_vector(6 downto 0);
gt0_rxmonitorsel_in : in std_logic_vector(1 downto 0);
gt0_rxoutclkfabric_out : out std_logic;
gt0_gtrxreset_in : in std_logic;
gt0_rxpmareset_in : in std_logic;
gt0_rxmcommaalignen_in : in std_logic;
gt0_rxpcommaalignen_in : in std_logic;
gt0_rxchariscomma_out : out std_logic_vector(1 downto 0);
gt0_rxcharisk_out : out std_logic_vector(1 downto 0);
gt0_rxresetdone_out : out std_logic;
gt0_gttxreset_in : in std_logic;
gt0_txuserrdy_in : in std_logic;
gt0_txdata_in : in std_logic_vector(15 downto 0);
gt0_gtxtxn_out : out std_logic;
gt0_gtxtxp_out : out std_logic;
gt0_txoutclkfabric_out : out std_logic;
gt0_txoutclkpcs_out : out std_logic;
gt0_txcharisk_in : in std_logic_vector(1 downto 0);
gt0_txresetdone_out : out std_logic;
GT0_QPLLOUTCLK_OUT : out std_logic;
GT0_QPLLOUTREFCLK_OUT : out std_logic;
sysclk_in : in std_logic
);
end component;
component protocol_frame_gen
port
(
pfg_clk_in : in STD_LOGIC;
pfg_reset_in : in STD_LOGIC;
pfg_data_in : in STD_LOGIC_VECTOR (15 downto 0);
pfg_fifo_empty_in : in STD_LOGIC;
pfg_trasm_rqst_in : in STD_LOGIC;
pfg_fifo_rd_enable_out : out STD_LOGIC;
pfg_data_out : out STD_LOGIC_VECTOR (15 downto 0);
pfg_txcharisk: out STD_LOGIC_VECTOR (1 downto 0)
);
end component;
component protocol_frame_check
port
(
pfc_clk_in : in STD_LOGIC;
pfc_reset_in : in STD_LOGIC;
pfc_data_in : in STD_LOGIC_VECTOR (15 downto 0);
pfc_data_out : out STD_LOGIC_VECTOR (15 downto 0);
pfc_fifo_wren_out : out STD_LOGIC
);
end component;
--_______________________INTERNAL REGISTER______________________--
--gt0 I/O registers
signal SOFT_RESET_TX_IN_i: std_logic;
signal SOFT_RESET_RX_IN_i: std_logic;
signal DONT_RESET_ON_DATA_ERROR_IN_i: std_logic;
signal Q0_CLK1_GTREFCLK_PAD_N_IN_i: std_logic;
signal Q0_CLK1_GTREFCLK_PAD_P_IN_i: std_logic;
signal GT0_TX_FSM_RESET_DONE_OUT_i: std_logic;
signal GT0_RX_FSM_RESET_DONE_OUT_i: std_logic;
signal GT0_DATA_VALID_IN_i: std_logic;
signal GT0_TX_MMCM_LOCK_OUT_i: std_logic;
signal GT0_RX_MMCM_LOCK_OUT_i: std_logic;
signal GT0_TXUSRCLK_OUT_i: std_logic;
signal GT0_TXUSRCLK2_OUT_i: std_logic;
signal GT0_RXUSRCLK_OUT_i: std_logic;
signal GT0_RXUSRCLK2_OUT_i: std_logic;
signal gt0_cpllfbclklost_out_i: std_logic;
signal gt0_cplllock_out_i: std_logic;
signal gt0_cpllreset_in_i: std_logic;
signal gt0_drpaddr_in_i: std_logic_vector(8 downto 0);
signal gt0_drpdi_in_i: std_logic_vector(15 downto 0);
signal gt0_drpdo_out_i: std_logic_vector(15 downto 0);
signal gt0_drpen_in_i: std_logic;
signal gt0_drprdy_out_i: std_logic;
signal gt0_drpwe_in_i: std_logic;
signal gt0_dmonitorout_out_i: std_logic_vector(7 downto 0);
signal gt0_eyescanreset_in_i: std_logic;
signal gt0_rxuserrdy_in_i: std_logic;
signal gt0_eyescandataerror_out_i: std_logic;
signal gt0_eyescantrigger_in_i: std_logic;
signal gt0_rxdata_out_i: std_logic_vector(15 downto 0);
signal gt0_rxdisperr_out_i: std_logic_vector(1 downto 0);
signal gt0_rxnotintable_out_i: std_logic_vector(1 downto 0);
signal gt0_gtxrxp_in_i: std_logic;
signal gt0_gtxrxn_in_i: std_logic;
signal gt0_rxdfelpmreset_in_i: std_logic;
signal gt0_rxmonitorout_out_i: std_logic_vector(6 downto 0);
signal gt0_rxmonitorsel_in_i: std_logic_vector(1 downto 0);
signal gt0_rxoutclkfabric_out_i: std_logic;
signal gt0_gtrxreset_in_i: std_logic;
signal gt0_rxpmareset_in_i: std_logic;
signal gt0_rxmcommaalignen_in_i: std_logic;
signal gt0_rxpcommaalignen_in_i: std_logic;
signal gt0_rxchariscomma_out_i: std_logic_vector(1 downto 0);
signal gt0_rxcharisk_out_i: std_logic_vector(1 downto 0);
signal gt0_rxresetdone_out_i: std_logic;
signal gt0_gttxreset_in_i: std_logic;
signal gt0_txuserrdy_in_i: std_logic;
signal gt0_txdata_in_i: std_logic_vector(15 downto 0);
signal gt0_gtxtxn_out_i: std_logic;
signal gt0_gtxtxp_out_i: std_logic;
signal gt0_txoutclkfabric_out_i: std_logic;
signal gt0_txoutclkpcs_out_i: std_logic;
signal gt0_txcharisk_in_i: std_logic_vector(1 downto 0);
signal gt0_txresetdone_out_i: std_logic;
signal GT0_QPLLOUTCLK_OUT_i: std_logic;
signal GT0_QPLLOUTREFCLK_OUT_i: std_logic;
signal sysclk_in_i: std_logic ;
--frame generator
signal pfg_clk_in_i: STD_LOGIC;
signal pfg_reset_in_i: STD_LOGIC;
signal pfg_data_in_i: STD_LOGIC_VECTOR (15 downto 0);
signal pfg_fifo_empty_in_i: STD_LOGIC;
signal pfg_trasm_rqst_in_i: STD_LOGIC;
signal pfg_fifo_rd_enable_out_i: STD_LOGIC;
signal pfg_data_out_i: STD_LOGIC_VECTOR (15 downto 0) ;
signal pfg_txcharisk_i: std_logic_vector(1 downto 0);
--frame checker
signal pfc_clk_in_i: STD_LOGIC;
signal pfc_reset_in_i: STD_LOGIC;
signal pfc_data_in_i: STD_LOGIC_VECTOR (15 downto 0);
signal pfc_data_out_i: STD_LOGIC_VECTOR (15 downto 0);
signal pfc_fifo_wren_out_i: STD_LOGIC;
begin
unit_gt0: gtwizard_0 port map ( SOFT_RESET_TX_IN => SOFT_RESET_TX_IN_i,
SOFT_RESET_RX_IN => SOFT_RESET_RX_IN_i,
DONT_RESET_ON_DATA_ERROR_IN => DONT_RESET_ON_DATA_ERROR_IN_i,
Q0_CLK1_GTREFCLK_PAD_N_IN => Q0_CLK1_GTREFCLK_PAD_N_IN_i,
Q0_CLK1_GTREFCLK_PAD_P_IN => Q0_CLK1_GTREFCLK_PAD_P_IN_i,
GT0_TX_FSM_RESET_DONE_OUT => GT0_TX_FSM_RESET_DONE_OUT_i,
GT0_RX_FSM_RESET_DONE_OUT => GT0_RX_FSM_RESET_DONE_OUT_i,
GT0_DATA_VALID_IN => GT0_DATA_VALID_IN_i,
GT0_TX_MMCM_LOCK_OUT => GT0_TX_MMCM_LOCK_OUT_i,
GT0_RX_MMCM_LOCK_OUT => GT0_RX_MMCM_LOCK_OUT_i,
GT0_TXUSRCLK_OUT => GT0_TXUSRCLK_OUT_i,
GT0_TXUSRCLK2_OUT => GT0_TXUSRCLK2_OUT_i,
GT0_RXUSRCLK_OUT => GT0_RXUSRCLK_OUT_i,
GT0_RXUSRCLK2_OUT => GT0_RXUSRCLK2_OUT_i,
gt0_cpllfbclklost_out => gt0_cpllfbclklost_out_i,
gt0_cplllock_out => gt0_cplllock_out_i,
gt0_cpllreset_in => gt0_cpllreset_in_i,
gt0_drpaddr_in => gt0_drpaddr_in_i,
gt0_drpdi_in => gt0_drpdi_in_i,
gt0_drpdo_out => gt0_drpdo_out_i,
gt0_drpen_in => gt0_drpen_in_i,
gt0_drprdy_out => gt0_drprdy_out_i,
gt0_drpwe_in => gt0_drpwe_in_i,
gt0_dmonitorout_out => gt0_dmonitorout_out_i,
gt0_eyescanreset_in => gt0_eyescanreset_in_i,
gt0_rxuserrdy_in => gt0_rxuserrdy_in_i,
gt0_eyescandataerror_out => gt0_eyescandataerror_out_i,
gt0_eyescantrigger_in => gt0_eyescantrigger_in_i,
gt0_rxdata_out => gt0_rxdata_out_i,
gt0_rxdisperr_out => gt0_rxdisperr_out_i,
gt0_rxnotintable_out => gt0_rxnotintable_out_i,
gt0_gtxrxp_in => gt0_gtxrxp_in_i,
gt0_gtxrxn_in => gt0_gtxrxn_in_i,
gt0_rxdfelpmreset_in => gt0_rxdfelpmreset_in_i,
gt0_rxmonitorout_out => gt0_rxmonitorout_out_i,
gt0_rxmonitorsel_in => gt0_rxmonitorsel_in_i,
gt0_rxoutclkfabric_out => gt0_rxoutclkfabric_out_i,
gt0_gtrxreset_in => gt0_gtrxreset_in_i,
gt0_rxpmareset_in => gt0_rxpmareset_in_i,
gt0_rxmcommaalignen_in => gt0_rxmcommaalignen_in_i,
gt0_rxpcommaalignen_in => gt0_rxpcommaalignen_in_i,
gt0_rxchariscomma_out => gt0_rxchariscomma_out_i,
gt0_rxcharisk_out => gt0_rxcharisk_out_i,
gt0_rxresetdone_out => gt0_rxresetdone_out_i,
gt0_gttxreset_in => gt0_gttxreset_in_i,
gt0_txuserrdy_in => gt0_txuserrdy_in_i,
gt0_txdata_in => gt0_txdata_in_i,
gt0_gtxtxn_out => gt0_gtxtxn_out_i,
gt0_gtxtxp_out => gt0_gtxtxp_out_i,
gt0_txoutclkfabric_out => gt0_txoutclkfabric_out_i,
gt0_txoutclkpcs_out => gt0_txoutclkpcs_out_i,
gt0_txcharisk_in => gt0_txcharisk_in_i,
gt0_txresetdone_out => gt0_txresetdone_out_i,
GT0_QPLLOUTCLK_OUT => GT0_QPLLOUTCLK_OUT_i,
GT0_QPLLOUTREFCLK_OUT => GT0_QPLLOUTREFCLK_OUT_i,
sysclk_in => sysclk_in_i );
unit_pfg: protocol_frame_gen port map ( pfg_clk_in => pfg_clk_in_i,
pfg_reset_in => pfg_reset_in_i,
pfg_data_in => pfg_data_in_i,
pfg_fifo_empty_in => pfg_fifo_empty_in_i,
pfg_trasm_rqst_in => pfg_trasm_rqst_in_i,
pfg_fifo_rd_enable_out => pfg_fifo_rd_enable_out_i,
pfg_data_out => pfg_data_out_i,
pfg_txcharisk => pfg_txcharisk_i );
unit_pfc: protocol_frame_check port map ( pfc_clk_in => pfc_clk_in_i,
pfc_reset_in => pfc_reset_in_i,
pfc_data_in => pfc_data_in_i,
pfc_data_out => pfc_data_out_i,
pfc_fifo_wren_out => pfc_fifo_wren_out_i );
--_______________EXTERNAL WIRING_______________--
--reset
SOFT_RESET_TX_IN_i <= gt_soft_reset_in;
SOFT_RESET_RX_IN_i <= gt_soft_reset_in;
pfg_reset_in_i <= protocol_reset_in;
pfc_reset_in_i <= protocol_reset_in;
--clocking (refclk has IBUF declaration)
Q0_CLK1_GTREFCLK_PAD_P_IN_i <= GTREFCLK_PAD_P_IN;
Q0_CLK1_GTREFCLK_PAD_N_IN_i <= GTREFCLK_PAD_N_IN;
tx_fifo_clk_out <= GT0_TXUSRCLK2_OUT_i;
rx_fifo_clk_out <= GT0_RXUSRCLK2_OUT_i;
sysclk_in_i <= fsm_clk_in;
--tx
pfg_data_in_i <= tx_data_in;
pfg_fifo_empty_in_i <= tx_fifo_empty_in;
pfg_trasm_rqst_in_i <= tx_trasm_rqst_in;
tx_fifo_rd_enable_out <= pfg_fifo_rd_enable_out_i;
--rx
rx_data_out <= pfc_data_out_i;
rx_fifo_wren_out <= pfc_fifo_wren_out_i;
--serial I/O
gtxtxp_out <= gt0_gtxtxp_out_i;
gtxtxn_out <= gt0_gtxtxn_out_i;
gt0_gtxrxp_in_i <= gtxrxp_in;
gt0_gtxrxn_in_i <= gtxrxn_in;
--_______________INTERNAL WIRING_______________--
--protocol clocking
pfg_clk_in_i <= GT0_TXUSRCLK2_OUT_i;
pfc_clk_in_i <= GT0_RXUSRCLK2_OUT_i;
--datapath
gt0_txdata_in_i <= pfg_data_out_i;
pfc_data_in_i <= gt0_rxdata_out_i;
--gt0 configuration: these signals are all tied to groung for
--proper gt funciotning
gt0_rxdfelpmreset_in_i <= '0';
gt0_gtrxreset_in_i <= '0';
gt0_rxpmareset_in_i <= '0';
gt0_cpllreset_in_i <= '0';
--DRP ports are not used
gt0_drpaddr_in_i <= (others => '0');
gt0_drpdi_in_i <= (others => '0');
gt0_drpen_in_i <= '0';
gt0_drpwe_in_i <= '0';
gt0_eyescanreset_in_i <= '0';
gt0_eyescantrigger_in_i <= '0';
gt0_gttxreset_in_i <= '0';
gt0_rxmonitorsel_in_i <= (others => '0');
gt0_txuserrdy_in_i <= '1';
gt0_rxuserrdy_in_i <= '1';
--gt0 configuration: these signals are all tied to power for
--proper gt funciotning
gt0_txcharisk_in_i <= pfg_txcharisk_i;
gt0_rxmcommaalignen_in_i <= '1';
gt0_rxpcommaalignen_in_i <= '1';
DONT_RESET_ON_DATA_ERROR_IN_i <= '0';
end Mapping;
library ieee;
use ieee.std_logic_1164.all;
entity alu_1bit is
port (
i_OPERATION : in std_logic_vector(1 downto 0); -- entrada de operação (controle de operação)
i_INV_BIT : in std_logic;
i_CARRY_IN : in std_logic;
i_A : in std_logic;
i_B : in std_logic;
i_LESS : in std_logic;
o_RESULT : out std_logic;
o_CARRY_OUT : out std_logic);
end alu_1bit;
architecture arch_1 of alu_1bit is
component full_adder is
port (
i_CIN : in std_logic;
i_DIN0 : in std_logic;
i_DIN1 : in std_logic;
o_DOUT : out std_logic;
o_COUT : out std_logic);
end component;
component mux4 is
port(i_SEL : in std_logic_vector(1 downto 0);
i_DIN0 : in std_logic;
i_DIN1 : in std_logic;
i_DIN2 : in std_logic;
i_DIN3 : in std_logic;
o_DOUT : out std_logic);
end component;
signal w_B : std_logic;
signal w_C : std_logic;
signal w_D : std_logic;
signal w_OUTFA : std_logic;
begin
w_B <= i_INV_BIT xor i_B;
w_C <= i_A and i_B;
w_D <= i_A or i_B;
u_1 : full_adder port map (i_CIN => i_CARRY_IN,
i_DIN0 => i_A,
i_DIN1 => w_B,
o_DOUT => w_OUTFA,
o_COUT => o_CARRY_OUT);
u_2 : mux4 port map(i_SEL => i_OPERATION,
i_DIN0 => w_C,
i_DIN1 => w_D,
i_DIN2 => w_OUTFA,
i_DIN3 => i_LESS,
o_DOUT => o_RESULT);
end arch_1;
I'm trying to simulate this on Quartus ModelSim but is giving me the following error on ModelSim.
Error: .../alu_1bit_msb.vhd(53): (vcom-1436) Actual expression (infix expression) of formal "i_DIN0" is not globally static.
Error: .../alu_1bit_msb.vhd(54): (vcom-1436) Actual expression (infix expression) of formal "i_DIN1" is not globally static.
I've already removed the logic expression out of the port map of mux4, i used a signal do this...
Full addder code:
library ieee;
use ieee.std_logic_1164.all;
entity full_adder is
port (
i_CIN : in std_logic;
i_DIN0 : in std_logic;
i_DIN1 : in std_logic;
o_DOUT : out std_logic;
o_COUT : out std_logic);
end full_adder;
architecture arch_1 of full_adder is
begin
o_DOUT <= i_CIN xor i_DIN0 xor i_DIN1;
o_COUT <= (i_CIN and i_DIN0) or
(i_CIN and i_DIN1) or
(i_DIN0 and i_DIN1);
end arch_1;
MUX4 code:
library ieee;
use ieee.std_logic_1164.all;
entity mux4 is
port (
i_SEL : in std_logic_vector(1 downto 0);
i_DIN0 : in std_logic;
i_DIN1 : in std_logic;
i_DIN2 : in std_logic;
i_DIN3 : in std_logic;
o_DOUT : out std_logic);
end mux4;
architecture arch_1 of mux4 is
begin
o_DOUT <= i_DIN0 when i_SEL = "00" else
i_DIN1 when i_SEL = "01" else
i_DIN2 when i_SEL = "10" else
i_DIN3;
end arch_1;
alu32 code:
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_misc.all;
entity alu_32bit is
port (
i_OPERATION : in std_logic_vector(1 downto 0);
i_INV_BIT : in std_logic;
i_A : in std_logic_vector(31 downto 0);
i_B : in std_logic_vector(31 downto 0);
o_RESULT : out std_logic_vector(31 downto 0);
o_ZERO : out std_logic;
o_OVERFLOW : out std_logic);
end alu_32bit;
architecture arch_1 of alu_32bit is
component alu_1bit is
port (
i_OPERATION : in std_logic_vector(1 downto 0);
i_INV_BIT : in std_logic;
i_CARRY_IN : in std_logic;
i_A : in std_logic;
i_B : in std_logic;
i_LESS : in std_logic;
o_RESULT : out std_logic;
o_CARRY_OUT : out std_logic);
end component;
component alu_1bit_msb is
port (
i_OPERATION : in std_logic_vector(1 downto 0); -- entrada de operação (controle de operação)
i_INV_BIT : in std_logic;
i_CARRY_IN : in std_logic;
i_A : in std_logic;
i_B : in std_logic;
i_LESS : in std_logic;
o_RESULT : out std_logic;
o_SET : out std_logic;
o_OVERFLOW : out std_logic);
end component;
signal w_RESULT : std_logic_vector(31 downto 0);
signal w_CARRY : std_logic_vector(30 downto 0);
signal w_SET : std_logic;
begin
o_RESULT <= w_RESULT;
o_ZERO <= NOT (or_reduce(w_RESULT));
u_0: alu_1bit port map (i_OPERATION => i_OPERATION,
i_INV_BIT => i_INV_BIT,
i_CARRY_IN => i_INV_BIT,
i_A => i_A(0),
i_B => i_B(0),
i_LESS => w_SET,
o_RESULT => w_RESULT(0),
o_CARRY_OUT => w_CARRY(0));
f_0: for i in 1 to (30) generate
u_1: alu_1bit port map (i_OPERATION => i_OPERATION,
i_INV_BIT => i_INV_BIT,
i_CARRY_IN => w_CARRY(i-1),
i_A => i_A(i),
i_B => i_B(i),
i_LESS => '0',
o_RESULT => w_RESULT(i),
o_CARRY_OUT => w_CARRY(i));
end generate f_0;
u_2: alu_1bit_msb port map (i_OPERATION => i_OPERATION,
i_INV_BIT => i_INV_BIT,
i_CARRY_IN => w_CARRY(30),
i_A => i_A(31),
i_B => i_B(31),
i_LESS => '0',
o_RESULT => w_RESULT(31),
o_SET => w_SET,
o_OVERFLOW => o_OVERFLOW);
end arch_1;
alu_1bit_msb code :
library ieee;
use ieee.std_logic_1164.all;
entity alu_1bit_msb is
port (
i_OPERATION : in std_logic_vector(1 downto 0);
i_INV_BIT : in std_logic;
i_CARRY_IN : in std_logic;
i_A : in std_logic;
i_B : in std_logic;
i_LESS : in std_logic;
o_RESULT : out std_logic;
o_SET : out std_logic;
o_OVERFLOW : out std_logic);
end alu_1bit_msb;
architecture arch_1 of alu_1bit_msb is
component full_adder is
port (
i_CIN : in std_logic;
i_DIN0 : in std_logic;
i_DIN1 : in std_logic;
o_DOUT : out std_logic;
o_COUT : out std_logic);
end component;
component mux4 is
port(i_SEL : in std_logic_vector(1 downto 0);
i_DIN0 : in std_logic;
i_DIN1 : in std_logic;
i_DIN2 : in std_logic;
i_DIN3 : in std_logic;
o_DOUT : out std_logic);
end component;
signal w_B : std_logic;
signal w_OUTFA : std_logic;
signal w_COUT : std_logic;
begin
w_B <= i_INV_BIT XOR i_B;
o_SET <= w_OUTFA;
o_OVERFLOW <= (w_COUT XOR i_CARRY_IN) AND i_OPERATION(1);
u_1: full_adder port map (i_CIN => i_CARRY_IN,
i_DIN0 => i_A,
i_DIN1 => w_B,
o_DOUT => w_OUTFA,
o_COUT => w_COUT);
u_2: mux4 port map(
i_SEL => i_OPERATION,
i_DIN0 => i_A AND i_B,
i_DIN1 => i_A OR i_B,
i_DIN2 => w_OUTFA,
i_DIN3 => i_LESS,
o_DOUT => o_RESULT);
end arch_1;
Do you realize you didn't post alu_1bit_msb.vhd in your question originally while showing us error messages for it? The confusion on your audience's part is pardonable. A file name isn't required to bear any relationship to declarations found within.
In any event the fix you put in alu_1bit should also be put in alu_1bit_msb:
architecture arch_1 of alu_1bit_msb is
component full_adder is
port (
i_CIN : in std_logic;
i_DIN0 : in std_logic;
i_DIN1 : in std_logic;
o_DOUT : out std_logic;
o_COUT : out std_logic);
end component;
component mux4 is
port(i_SEL : in std_logic_vector(1 downto 0);
i_DIN0 : in std_logic;
i_DIN1 : in std_logic;
i_DIN2 : in std_logic;
i_DIN3 : in std_logic;
o_DOUT : out std_logic);
end component;
signal w_B : std_logic;
signal w_C: std_logic; -- added
signal w_D: std_logic; -- added
signal w_OUTFA : std_logic;
signal w_COUT : std_logic;
begin
w_B <= i_INV_BIT XOR i_B;
o_SET <= w_OUTFA;
w_C <= i_A and i_B; -- added
w_D <= i_A or i_B; -- added
o_OVERFLOW <= (w_COUT XOR i_CARRY_IN) AND i_OPERATION(1);
u_1: full_adder port map (i_CIN => i_CARRY_IN,
i_DIN0 => i_A,
i_DIN1 => w_B,
o_DOUT => w_OUTFA,
o_COUT => w_COUT);
u_2: mux4 port map(
i_SEL => i_OPERATION,
i_DIN0 => w_C, -- was i_A AND i_B,
i_DIN1 => w_D, -- was i_A OR i_B,
i_DIN2 => w_OUTFA,
i_DIN3 => i_LESS,
o_DOUT => o_RESULT);
end arch_1;
Your arch_1 of alu_1bit_msb analyzes (alu_1bit_msb.vhd should compile with vcom).
After that if you have a different problem ask a different question, and please provide an MCVe so the problem can be reproduced.
I got top module including sub-modules instantiated in testbench file. The sub-modules are pretty free on their own, therefore when I am testing the top module, I need to introduce only few signals and track few outputs, but the top module has many other ports.
May I provide some "default"/"undefined" signal (and sink) to those pins (not regarding their size, type)?
There are 2 ways I solve that right now, either take out the sub-module to test it (well, but I want to test it within top module) or write appropriate "zero" inputs for inputs and introduce signals for outputs (lot of work as well).
using VHDL with Vivado 2015
alright, so this is the testbench
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use ieee.numeric_std.all;
entity tb_FIR_v0_3 is
end tb_FIR_v0_3;
architecture Behavioral of tb_FIR_v0_3 is
shared variable C_S00_AXI_DATA_WIDTH : integer := 32;
shared variable C_S00_AXI_ADDR_WIDTH : integer := 7;
component FIR_v0_3 is
generic (
C_S00_AXI_DATA_WIDTH : integer := 32;
C_S00_AXI_ADDR_WIDTH : integer := 7
);
port (
fir_clk : in std_logic;
fir_x_in : in std_logic_vector(C_S00_AXI_DATA_WIDTH-1 downto 0);
fir_y_out : out std_logic_vector(C_S00_AXI_DATA_WIDTH-1 downto 0);
fir_d_out : out std_logic_vector(C_S00_AXI_DATA_WIDTH-1 downto 0);
-- User ports ends
s00_axi_aclk : in std_logic;
s00_axi_aresetn : in std_logic;
s00_axi_awaddr : in std_logic_vector(C_S00_AXI_ADDR_WIDTH-1 downto 0);
s00_axi_awprot : in std_logic_vector(2 downto 0);
s00_axi_awvalid : in std_logic;
s00_axi_awready : out std_logic;
s00_axi_wdata : in std_logic_vector(C_S00_AXI_DATA_WIDTH-1 downto 0);
s00_axi_wstrb : in std_logic_vector((C_S00_AXI_DATA_WIDTH/8)-1 downto 0);
s00_axi_wvalid : in std_logic;
s00_axi_wready : out std_logic;
s00_axi_bresp : out std_logic_vector(1 downto 0);
s00_axi_bvalid : out std_logic;
s00_axi_bready : in std_logic;
s00_axi_araddr : in std_logic_vector(C_S00_AXI_ADDR_WIDTH-1 downto 0);
s00_axi_arprot : in std_logic_vector(2 downto 0);
s00_axi_arvalid : in std_logic;
s00_axi_arready : out std_logic;
s00_axi_rdata : out std_logic_vector(C_S00_AXI_DATA_WIDTH-1 downto 0);
s00_axi_rresp : out std_logic_vector(1 downto 0);
s00_axi_rvalid : out std_logic;
s00_axi_rready : in std_logic
);
end component FIR_v0_3;
signal e_clk : std_logic := '1' ;
signal e_reset : std_logic := '1' ;
signal e_x_in : std_logic_vector (31 downto 0);
signal e_y_out : std_logic_vector (31 downto 0);
signal e_d_out : std_logic_vector (31 downto 0);
signal s00_axi_awready : std_logic;
signal s00_axi_wready : std_logic;
signal s00_axi_bresp : std_logic_vector(1 downto 0);
signal s00_axi_bvalid : std_logic;
signal s00_axi_arready : std_logic;
signal s00_axi_rdata : std_logic_vector(32-1 downto 0);
signal s00_axi_rresp : std_logic_vector(1 downto 0);
signal s00_axi_rvalid : std_logic;
signal s00_axi_aclk : std_logic := '0';
signal s00_axi_aresetn : std_logic;
signal s00_axi_awaddr : std_logic_vector(C_S00_AXI_ADDR_WIDTH-1 downto 0);
signal s00_axi_awprot : std_logic_vector(2 downto 0);
signal s00_axi_awvalid : std_logic := '0';
signal s00_axi_wdata : std_logic_vector(C_S00_AXI_DATA_WIDTH-1 downto 0);
signal s00_axi_wstrb : std_logic_vector((C_S00_AXI_DATA_WIDTH/8)-1 downto 0);
signal s00_axi_wvalid : std_logic := '0';
signal s00_axi_bready : std_logic := '0';
signal s00_axi_araddr : std_logic_vector(C_S00_AXI_ADDR_WIDTH-1 downto 0);
signal s00_axi_arprot : std_logic_vector(2 downto 0);
signal s00_axi_arvalid : std_logic := '0';
signal s00_axi_rready : std_logic := '0';
begin
inst_FIR_v0_3 : FIR_v0_3
generic map (
C_S00_AXI_DATA_WIDTH => 32,
C_S00_AXI_ADDR_WIDTH => 7
)
port map (
-- Users to add ports here
fir_clk => e_clk,
fir_x_in => e_x_in,
fir_y_out => e_y_out,
fir_d_out => e_d_out,
-- Ports of Axi Slave Bus Interface S00_AXI
s00_axi_aclk => s00_axi_aclk,
s00_axi_aresetn => e_reset,
s00_axi_awaddr => ( others => '0' ),
s00_axi_awprot => ( others => '0' ),
s00_axi_awvalid => s00_axi_awvalid,
s00_axi_awready => s00_axi_awready,
s00_axi_wdata => ( others => '0' ),
s00_axi_wstrb => ( others => '0' ),
s00_axi_wvalid => s00_axi_wvalid,
s00_axi_wready => s00_axi_wready,
s00_axi_bresp => s00_axi_bresp,
s00_axi_bvalid => s00_axi_bvalid,
s00_axi_bready => s00_axi_bready,
s00_axi_araddr => ( others => '0' ),
s00_axi_arprot => ( others => '0' ),
s00_axi_arvalid => s00_axi_arvalid,
s00_axi_arready => s00_axi_arready,
s00_axi_rdata => s00_axi_rdata,
s00_axi_rresp => s00_axi_rresp,
s00_axi_rvalid => s00_axi_rvalid,
s00_axi_rready => s00_axi_rready
);
process
variable count : integer := 0;
begin
if ( count = 0 ) then
-- e_reset <= '0'; -- VALUES NOT INITIATED PROPERLY, FUCKER ? ... With the non-stop, pop pop and stainless steel (DMX)
e_x_in <= x"00000000";
end if;
if ( count = 3 ) then
-- e_reset <= '1';
end if;
if ( count = 3 ) then
e_x_in <= x"00000001";
end if;
if ( count = 5 ) then
e_x_in <= x"00000000";
end if;
if ( count = 8 ) then
e_x_in <= x"00000000";
end if;
e_clk <= not(e_clk);
wait for 0.5 ns;
count := count + 1;
if( (count = 60) ) then
count := 0;
end if;
end process;
end Behavioral;
I am too lazy to create signal for every AXI input/output ports and then connect them one by one. May I avoid somehow creating those 21 signals ...
signal s00_axi_awready : std_logic;
signal s00_axi_wready : std_logic;
signal s00_axi_bresp : std_logic_vector(1 downto 0);
signal s00_axi_bvalid : std_logic;
signal s00_axi_arready : std_logic;
....
...
and then connecting them ? Like this ...
s00_axi_wvalid => s00_axi_wvalid,
s00_axi_wready => s00_axi_wready,
s00_axi_bresp => s00_axi_bresp,
s00_axi_bvalid => s00_axi_bvalid,
s00_axi_bready => s00_axi_bready,
Is there any "universal" in/out signal that I would tie to pins that are not important, because I cant leave the ports of an instance unconnected (as far as I know and tried).
If I understand the question correctly, inputs in your port definition can have default values, and outputs can be left unconnected in an instantiation. For example:
entity ShiftRegister is
Generic (
WIDTH : integer
);
Port (
clk : in STD_LOGIC;
enable : in STD_LOGIC := '1';
serial_in : in STD_LOGIC := '0';
parallel_out : out STD_LOGIC_VECTOR (WIDTH-1 downto 0);
);
end ShiftRegister;
...
SR : entity work.ShiftRegister
Generic map (
WIDTH : integer => 8
)
Port map(
clk => serial_clk,
serial_in => serial_data_in
);
In this example, the register will always be enabled, and the entity does not output anything. Not a very useful instantiation in this case, but I think this answers your question!
ok so i added my microblaze from XPS generated a topvhdl file added the ucf file and in my microblaze i have 4 GPIO but i didnt put any of thier pins in the .ucf file although they are present as inout in the topvhdl but i was able to compile the project and gnerate a bitstream.
Now i commented out all the GPIO Pins in top vhdl and connected my microblaze system GPIO with internal signals as shown This also didnt case any trouble and i could generetate a bitstream.
Now what caused the problem is when i added the 7 ports of LED to external pins of my top vhdl file( which has nothing to do with my GPIO) it started telling me errors on the GPIO pins!!! here is the code :
-------------------------------------------------------------------------------
-- system_top.vhd
-------------------------------------------------------------------------------
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
library UNISIM;
use UNISIM.VCOMPONENTS.ALL;
entity system_top is
port (
fpga_0_Ethernet_MAC_PHY_tx_clk_pin : in std_logic;
fpga_0_Ethernet_MAC_PHY_rx_clk_pin : in std_logic;
fpga_0_Ethernet_MAC_PHY_crs_pin : in std_logic;
fpga_0_Ethernet_MAC_PHY_dv_pin : in std_logic;
fpga_0_Ethernet_MAC_PHY_rx_data_pin : in std_logic_vector(3 downto 0);
fpga_0_Ethernet_MAC_PHY_col_pin : in std_logic;
fpga_0_Ethernet_MAC_PHY_rx_er_pin : in std_logic;
fpga_0_Ethernet_MAC_PHY_rst_n_pin : out std_logic;
fpga_0_Ethernet_MAC_PHY_tx_en_pin : out std_logic;
fpga_0_Ethernet_MAC_PHY_tx_data_pin : out std_logic_vector(3 downto 0);
fpga_0_Ethernet_MAC_PHY_MDC_pin : out std_logic;
fpga_0_Ethernet_MAC_PHY_MDIO_pin : inout std_logic;
fpga_0_DDR2_SDRAM_DDR2_Clk_pin : out std_logic;
fpga_0_DDR2_SDRAM_DDR2_Clk_n_pin : out std_logic;
fpga_0_DDR2_SDRAM_DDR2_CE_pin : out std_logic;
fpga_0_DDR2_SDRAM_DDR2_CS_n_pin : out std_logic;
fpga_0_DDR2_SDRAM_DDR2_ODT_pin : out std_logic;
fpga_0_DDR2_SDRAM_DDR2_RAS_n_pin : out std_logic;
fpga_0_DDR2_SDRAM_DDR2_CAS_n_pin : out std_logic;
fpga_0_DDR2_SDRAM_DDR2_WE_n_pin : out std_logic;
fpga_0_DDR2_SDRAM_DDR2_BankAddr_pin : out std_logic_vector(1 downto 0);
fpga_0_DDR2_SDRAM_DDR2_Addr_pin : out std_logic_vector(12 downto 0);
fpga_0_DDR2_SDRAM_DDR2_DQ_pin : inout std_logic_vector(15 downto 0);
fpga_0_DDR2_SDRAM_DDR2_DM_pin : out std_logic_vector(1 downto 0);
fpga_0_DDR2_SDRAM_DDR2_DQS_pin : inout std_logic_vector(1 downto 0);
fpga_0_DDR2_SDRAM_DDR2_DQS_n_pin : inout std_logic_vector(1 downto 0);
fpga_0_DDR2_SDRAM_DDR2_DQS_Div_O_pin : out std_logic;
fpga_0_DDR2_SDRAM_DDR2_DQS_Div_I_pin : in std_logic;
fpga_0_clk_1_sys_clk_pin : in std_logic;
fpga_0_rst_1_sys_rst_pin : in std_logic;
LED : out std_logic_vector(0 to 7)--when i add this line it causses problems
-- xps_gpio_0_GPIO_IO_pin : inout std_logic_vector(0 to 31);--commented out the lines
-- xps_gpio_1_GPIO_IO_pin : inout std_logic_vector(0 to 31);
-- xps_gpio_2_GPIO_IO_pin : inout std_logic_vector(0 to 31);
-- xps_gpio_3_GPIO_IO_pin : inout std_logic_vector(0 to 31)
);
end system_top;
architecture STRUCTURE of system_top is
component system is
port (
fpga_0_Ethernet_MAC_PHY_tx_clk_pin : in std_logic;
fpga_0_Ethernet_MAC_PHY_rx_clk_pin : in std_logic;
fpga_0_Ethernet_MAC_PHY_crs_pin : in std_logic;
fpga_0_Ethernet_MAC_PHY_dv_pin : in std_logic;
fpga_0_Ethernet_MAC_PHY_rx_data_pin : in std_logic_vector(3 downto 0);
fpga_0_Ethernet_MAC_PHY_col_pin : in std_logic;
fpga_0_Ethernet_MAC_PHY_rx_er_pin : in std_logic;
fpga_0_Ethernet_MAC_PHY_rst_n_pin : out std_logic;
fpga_0_Ethernet_MAC_PHY_tx_en_pin : out std_logic;
fpga_0_Ethernet_MAC_PHY_tx_data_pin : out std_logic_vector(3 downto 0);
fpga_0_Ethernet_MAC_PHY_MDC_pin : out std_logic;
fpga_0_Ethernet_MAC_PHY_MDIO_pin : inout std_logic;
fpga_0_DDR2_SDRAM_DDR2_Clk_pin : out std_logic;
fpga_0_DDR2_SDRAM_DDR2_Clk_n_pin : out std_logic;
fpga_0_DDR2_SDRAM_DDR2_CE_pin : out std_logic;
fpga_0_DDR2_SDRAM_DDR2_CS_n_pin : out std_logic;
fpga_0_DDR2_SDRAM_DDR2_ODT_pin : out std_logic;
fpga_0_DDR2_SDRAM_DDR2_RAS_n_pin : out std_logic;
fpga_0_DDR2_SDRAM_DDR2_CAS_n_pin : out std_logic;
fpga_0_DDR2_SDRAM_DDR2_WE_n_pin : out std_logic;
fpga_0_DDR2_SDRAM_DDR2_BankAddr_pin : out std_logic_vector(1 downto 0);
fpga_0_DDR2_SDRAM_DDR2_Addr_pin : out std_logic_vector(12 downto 0);
fpga_0_DDR2_SDRAM_DDR2_DQ_pin : inout std_logic_vector(15 downto 0);
fpga_0_DDR2_SDRAM_DDR2_DM_pin : out std_logic_vector(1 downto 0);
fpga_0_DDR2_SDRAM_DDR2_DQS_pin : inout std_logic_vector(1 downto 0);
fpga_0_DDR2_SDRAM_DDR2_DQS_n_pin : inout std_logic_vector(1 downto 0);
fpga_0_DDR2_SDRAM_DDR2_DQS_Div_O_pin : out std_logic;
fpga_0_DDR2_SDRAM_DDR2_DQS_Div_I_pin : in std_logic;
fpga_0_clk_1_sys_clk_pin : in std_logic;
fpga_0_rst_1_sys_rst_pin : in std_logic;
xps_gpio_0_GPIO_IO_pin : inout std_logic_vector(0 to 31);
xps_gpio_1_GPIO_IO_pin : inout std_logic_vector(0 to 31);
xps_gpio_2_GPIO_IO_pin : inout std_logic_vector(0 to 31);
xps_gpio_3_GPIO_IO_pin : inout std_logic_vector(0 to 31)
);
end component;
attribute BUFFER_TYPE : STRING;
attribute BOX_TYPE : STRING;
attribute BUFFER_TYPE of fpga_0_Ethernet_MAC_PHY_tx_clk_pin : signal is "IBUF";
attribute BUFFER_TYPE of fpga_0_Ethernet_MAC_PHY_rx_clk_pin : signal is "IBUF";
attribute BOX_TYPE of system : component is "user_black_box";
signal xps_gpio_0_GPIO_IO : std_logic_vector(0 to 31);
signal xps_gpio_1_GPIO_IO : std_logic_vector(0 to 31);
signal xps_gpio_2_GPIO_IO : std_logic_vector(0 to 31);
signal xps_gpio_3_GPIO_IO : std_logic_vector(0 to 31);
begin
system_i : system
port map (
fpga_0_Ethernet_MAC_PHY_tx_clk_pin => fpga_0_Ethernet_MAC_PHY_tx_clk_pin,
fpga_0_Ethernet_MAC_PHY_rx_clk_pin => fpga_0_Ethernet_MAC_PHY_rx_clk_pin,
fpga_0_Ethernet_MAC_PHY_crs_pin => fpga_0_Ethernet_MAC_PHY_crs_pin,
fpga_0_Ethernet_MAC_PHY_dv_pin => fpga_0_Ethernet_MAC_PHY_dv_pin,
fpga_0_Ethernet_MAC_PHY_rx_data_pin => fpga_0_Ethernet_MAC_PHY_rx_data_pin,
fpga_0_Ethernet_MAC_PHY_col_pin => fpga_0_Ethernet_MAC_PHY_col_pin,
fpga_0_Ethernet_MAC_PHY_rx_er_pin => fpga_0_Ethernet_MAC_PHY_rx_er_pin,
fpga_0_Ethernet_MAC_PHY_rst_n_pin => fpga_0_Ethernet_MAC_PHY_rst_n_pin,
fpga_0_Ethernet_MAC_PHY_tx_en_pin => fpga_0_Ethernet_MAC_PHY_tx_en_pin,
fpga_0_Ethernet_MAC_PHY_tx_data_pin => fpga_0_Ethernet_MAC_PHY_tx_data_pin,
fpga_0_Ethernet_MAC_PHY_MDC_pin => fpga_0_Ethernet_MAC_PHY_MDC_pin,
fpga_0_Ethernet_MAC_PHY_MDIO_pin => fpga_0_Ethernet_MAC_PHY_MDIO_pin,
fpga_0_DDR2_SDRAM_DDR2_Clk_pin => fpga_0_DDR2_SDRAM_DDR2_Clk_pin,
fpga_0_DDR2_SDRAM_DDR2_Clk_n_pin => fpga_0_DDR2_SDRAM_DDR2_Clk_n_pin,
fpga_0_DDR2_SDRAM_DDR2_CE_pin => fpga_0_DDR2_SDRAM_DDR2_CE_pin,
fpga_0_DDR2_SDRAM_DDR2_CS_n_pin => fpga_0_DDR2_SDRAM_DDR2_CS_n_pin,
fpga_0_DDR2_SDRAM_DDR2_ODT_pin => fpga_0_DDR2_SDRAM_DDR2_ODT_pin,
fpga_0_DDR2_SDRAM_DDR2_RAS_n_pin => fpga_0_DDR2_SDRAM_DDR2_RAS_n_pin,
fpga_0_DDR2_SDRAM_DDR2_CAS_n_pin => fpga_0_DDR2_SDRAM_DDR2_CAS_n_pin,
fpga_0_DDR2_SDRAM_DDR2_WE_n_pin => fpga_0_DDR2_SDRAM_DDR2_WE_n_pin,
fpga_0_DDR2_SDRAM_DDR2_BankAddr_pin => fpga_0_DDR2_SDRAM_DDR2_BankAddr_pin,
fpga_0_DDR2_SDRAM_DDR2_Addr_pin => fpga_0_DDR2_SDRAM_DDR2_Addr_pin,
fpga_0_DDR2_SDRAM_DDR2_DQ_pin => fpga_0_DDR2_SDRAM_DDR2_DQ_pin,
fpga_0_DDR2_SDRAM_DDR2_DM_pin => fpga_0_DDR2_SDRAM_DDR2_DM_pin,
fpga_0_DDR2_SDRAM_DDR2_DQS_pin => fpga_0_DDR2_SDRAM_DDR2_DQS_pin,
fpga_0_DDR2_SDRAM_DDR2_DQS_n_pin => fpga_0_DDR2_SDRAM_DDR2_DQS_n_pin,
fpga_0_DDR2_SDRAM_DDR2_DQS_Div_O_pin => fpga_0_DDR2_SDRAM_DDR2_DQS_Div_O_pin,
fpga_0_DDR2_SDRAM_DDR2_DQS_Div_I_pin => fpga_0_DDR2_SDRAM_DDR2_DQS_Div_I_pin,
fpga_0_clk_1_sys_clk_pin => fpga_0_clk_1_sys_clk_pin,
fpga_0_rst_1_sys_rst_pin => fpga_0_rst_1_sys_rst_pin,
xps_gpio_0_GPIO_IO_pin => xps_gpio_0_GPIO_IO,--connected to a signal not any external pin
xps_gpio_1_GPIO_IO_pin => xps_gpio_1_GPIO_IO,--connected to a signal not any external pin
xps_gpio_2_GPIO_IO_pin => xps_gpio_2_GPIO_IO,--connected to a signal not any external pin
xps_gpio_3_GPIO_IO_pin => xps_gpio_3_GPIO_IO--connected to a signal not any external pin
);
end architecture STRUCTURE;
Error message :
ERROR:Place:866 - Not enough valid sites to place the following IOBs:
IO Standard: Name = LVCMOS25, VREF = NR, VCCO = 2.50, TERM = NONE, DIR = BIDIR, DRIVE_STR = 12
xps_gpio_0_GPIO_IO_pin<0>
xps_gpio_0_GPIO_IO_pin<1>
xps_gpio_0_GPIO_IO_pin<2>
xps_gpio_0_GPIO_IO_pin<3>
xps_gpio_0_GPIO_IO_pin<4>
xps_gpio_0_GPIO_IO_pin<5>
xps_gpio_0_GPIO_IO_pin<6>
xps_gpio_0_GPIO_IO_pin<7>
xps_gpio_0_GPIO_IO_pin<8>
xps_gpio_0_GPIO_IO_pin<9>
xps_gpio_1_GPIO_IO_pin<0>
xps_gpio_1_GPIO_IO_pin<1>
xps_gpio_1_GPIO_IO_pin<2>
xps_gpio_1_GPIO_IO_pin<3>
xps_gpio_1_GPIO_IO_pin<4>
xps_gpio_1_GPIO_IO_pin<5>
xps_gpio_1_GPIO_IO_pin<6>
xps_gpio_1_GPIO_IO_pin<7>
xps_gpio_1_GPIO_IO_pin<8>
xps_gpio_1_GPIO_IO_pin<9>
xps_gpio_1_GPIO_IO_pin<10>
xps_gpio_1_GPIO_IO_pin<11>
xps_gpio_1_GPIO_IO_pin<12>
xps_gpio_1_GPIO_IO_pin<20>
xps_gpio_1_GPIO_IO_pin<13>
xps_gpio_1_GPIO_IO_pin<21>
xps_gpio_1_GPIO_IO_pin<14>
xps_gpio_1_GPIO_IO_pin<22>
xps_gpio_1_GPIO_IO_pin<30>
xps_gpio_1_GPIO_IO_pin<15>
xps_gpio_1_GPIO_IO_pin<23>
xps_gpio_1_GPIO_IO_pin<31>
xps_gpio_1_GPIO_IO_pin<16>
xps_gpio_1_GPIO_IO_pin<24>
xps_gpio_1_GPIO_IO_pin<17>
xps_gpio_1_GPIO_IO_pin<25>
xps_gpio_1_GPIO_IO_pin<18>
xps_gpio_1_GPIO_IO_pin<26>
xps_gpio_1_GPIO_IO_pin<19>
xps_gpio_1_GPIO_IO_pin<27>
xps_gpio_1_GPIO_IO_pin<28>
xps_gpio_1_GPIO_IO_pin<29>
xps_gpio_3_GPIO_IO_pin<10>
xps_gpio_3_GPIO_IO_pin<11>
xps_gpio_3_GPIO_IO_pin<12>
xps_gpio_3_GPIO_IO_pin<20>
xps_gpio_3_GPIO_IO_pin<13>
xps_gpio_3_GPIO_IO_pin<21>
xps_gpio_3_GPIO_IO_pin<14>
xps_gpio_3_GPIO_IO_pin<22>
xps_gpio_3_GPIO_IO_pin<30>
xps_gpio_3_GPIO_IO_pin<15>
xps_gpio_3_GPIO_IO_pin<23>
xps_gpio_3_GPIO_IO_pin<31>
xps_gpio_3_GPIO_IO_pin<16>
xps_gpio_3_GPIO_IO_pin<24>
xps_gpio_3_GPIO_IO_pin<17>
xps_gpio_3_GPIO_IO_pin<25>
xps_gpio_3_GPIO_IO_pin<18>
xps_gpio_3_GPIO_IO_pin<26>
xps_gpio_3_GPIO_IO_pin<19>
xps_gpio_3_GPIO_IO_pin<27>
xps_gpio_3_GPIO_IO_pin<28>
xps_gpio_3_GPIO_IO_pin<29>
xps_gpio_2_GPIO_IO_pin<0>
xps_gpio_2_GPIO_IO_pin<1>
xps_gpio_2_GPIO_IO_pin<2>
xps_gpio_2_GPIO_IO_pin<3>
xps_gpio_2_GPIO_IO_pin<4>
xps_gpio_2_GPIO_IO_pin<5>
xps_gpio_2_GPIO_IO_pin<6>
xps_gpio_2_GPIO_IO_pin<7>
xps_gpio_2_GPIO_IO_pin<8>
xps_gpio_2_GPIO_IO_pin<9>
xps_gpio_0_GPIO_IO_pin<10>
xps_gpio_0_GPIO_IO_pin<11>
xps_gpio_0_GPIO_IO_pin<12>
xps_gpio_0_GPIO_IO_pin<20>
xps_gpio_0_GPIO_IO_pin<13>
xps_gpio_0_GPIO_IO_pin<21>
xps_gpio_0_GPIO_IO_pin<14>
xps_gpio_0_GPIO_IO_pin<22>
xps_gpio_0_GPIO_IO_pin<30>
xps_gpio_0_GPIO_IO_pin<15>
xps_gpio_0_GPIO_IO_pin<23>
xps_gpio_0_GPIO_IO_pin<31>
xps_gpio_0_GPIO_IO_pin<16>
xps_gpio_0_GPIO_IO_pin<24>
xps_gpio_0_GPIO_IO_pin<17>
xps_gpio_0_GPIO_IO_pin<25>
xps_gpio_0_GPIO_IO_pin<18>
xps_gpio_0_GPIO_IO_pin<26>
xps_gpio_0_GPIO_IO_pin<19>
xps_gpio_0_GPIO_IO_pin<27>
xps_gpio_0_GPIO_IO_pin<28>
xps_gpio_0_GPIO_IO_pin<29>
xps_gpio_3_GPIO_IO_pin<0>
xps_gpio_3_GPIO_IO_pin<1>
xps_gpio_3_GPIO_IO_pin<2>
xps_gpio_3_GPIO_IO_pin<3>
xps_gpio_3_GPIO_IO_pin<4>
xps_gpio_3_GPIO_IO_pin<5>
xps_gpio_3_GPIO_IO_pin<6>
xps_gpio_3_GPIO_IO_pin<7>
xps_gpio_3_GPIO_IO_pin<8>
xps_gpio_3_GPIO_IO_pin<9>
xps_gpio_2_GPIO_IO_pin<10>
xps_gpio_2_GPIO_IO_pin<11>
xps_gpio_2_GPIO_IO_pin<12>
xps_gpio_2_GPIO_IO_pin<20>
xps_gpio_2_GPIO_IO_pin<13>
xps_gpio_2_GPIO_IO_pin<21>
xps_gpio_2_GPIO_IO_pin<14>
xps_gpio_2_GPIO_IO_pin<22>
xps_gpio_2_GPIO_IO_pin<30>
xps_gpio_2_GPIO_IO_pin<15>
xps_gpio_2_GPIO_IO_pin<23>
xps_gpio_2_GPIO_IO_pin<31>
xps_gpio_2_GPIO_IO_pin<16>
xps_gpio_2_GPIO_IO_pin<24>
xps_gpio_2_GPIO_IO_pin<17>
xps_gpio_2_GPIO_IO_pin<25>
xps_gpio_2_GPIO_IO_pin<18>
xps_gpio_2_GPIO_IO_pin<26>
xps_gpio_2_GPIO_IO_pin<19>
xps_gpio_2_GPIO_IO_pin<27>
xps_gpio_2_GPIO_IO_pin<28>
xps_gpio_2_GPIO_IO_pin<29>
this is a comment, because i am not yet allowed to make comments :/
I am not sure, if the error is a failure. I would rather say that not not print an error message before is a failure. If you are handling some inputs, you should be always aware of shortcuts. Try to set those as open, so they aren't connected at all to your FPGA.
I'm trying to implement a VHDL project but I'm having problems connecting the different components correctly. I just want to make sure that I did this correctly. The code below is just the wrapper (which, to this point, is where the problem lies). Please let me know if I'm connecting the input and outputs to each component correctly.
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity SodaWrapper is
Port ( PB1 : in STD_LOGIC;
PB2 : in STD_LOGIC;
PB3 : in STD_LOGIC;
PB4 : in STD_LOGIC;
clk_50m : in STD_LOGIC;
LED1 : out STD_LOGIC;
LED2 : out STD_LOGIC;
LED3 : out STD_LOGIC;
LED4 : out STD_LOGIC;
seven_seg1 : out STD_LOGIC_VECTOR(7 downto 0);
seven_seg2 : out STD_LOGIC_VECTOR(7 downto 0));
end SodaWrapper;
architecture Behavioral of SodaWrapper is
--Define debounce components
component debounce
port (clk : in STD_LOGIC;
reset : in STD_LOGIC;
sw : in STD_LOGIC;
db_level: out STD_LOGIC;
db_tick: out STD_LOGIC);
end component;
for all : debounce use entity work.debounce(debounce);
--define clock
component Clock_Divider
port(
clk : in STD_LOGIC;
clockbus : out STD_LOGIC_VECTOR(26 downto 0)
);
end component;
for all : Clock_Divider use entity work.Clock_Divider(Clock_Divider);
COMPONENT SodaMachine_Moore
PORT(
CLK : IN std_logic;
Reset : IN std_logic;
Nickel : IN std_logic;
Dime : IN std_logic;
Quarter : IN std_logic;
Dispense : OUT std_logic;
ReturnNickel : OUT std_logic;
ReturnDime : OUT std_logic;
ReturnTwoDimes : OUT std_logic;
change1 : OUT std_logic_vector(3 downto 0);
change2 : OUT std_logic_vector(3 downto 0)
);
END COMPONENT;
--Define sseg_converter components
component hex_to_sseg
port( dp : in STD_LOGIC;
hex : in STD_LOGIC_VECTOR(3 downto 0);
sseg : out STD_LOGIC_VECTOR(7 downto 0));
end component;
--create wire for FSM to sseg converter
signal hexconvertones : STD_LOGIC_VECTOR(3 downto 0);
signal hexconverttens : STD_LOGIC_VECTOR(3 downto 0);
--create wires for output of debouncers
signal db_tick_n : STD_LOGIC;
signal db_tick_d : STD_LOGIC;
signal db_tick_q : STD_LOGIC;
signal IQ_n : STD_LOGIC;
signal IQ_d : STD_LOGIC;
signal IQ_q : STD_LOGIC;
--wire up clock
signal clockingbus : STD_LOGIC_VECTOR(26 downto 0);
begin
-- Setup the clock
clock1 : Clock_divider port map (
clk => clk_50m,
clockbus => clockingbus
);
-- Link debounce to FSM
debounce_n : debounce port map (
clk => clockingbus(0),
reset => PB4,
sw => PB1,
db_tick => db_tick_n
);
debounce_d : debounce port map (
clk => clockingbus(0),
reset => PB4,
sw => PB2,
db_tick => db_tick_d
);
debounce_q : debounce port map (
clk => clockingbus(0),
reset => PB4,
sw => PB3,
db_tick => db_tick_q
);
--invert values of db_tick since logic value of button pressed is 0 and vice versa
IQ_n <= not(db_tick_n);
IQ_d <= not(db_tick_d);
IQ_q <= not(db_tick_q);
-- Link components to main FSM
main : SodaMachine_Moore PORT MAP (
CLK => clockingbus(0),
Reset => PB4,
Nickel => IQ_n,
Dime => IQ_d,
Quarter => IQ_q,
Dispense => LED1,
ReturnNickel => LED2,
ReturnDime => LED3,
ReturnTwoDimes => LED4,
change1 => hexconvertones,
change2 => hexconverttens
);
--Link seven segment display to FSM
change_ones : hex_to_sseg port map('0', hexconvertones, seven_seg1);
change_tens : hex_to_sseg port map('0', hexconverttens, seven_seg2);
end Behavioral;