vhdl code wrapper - vhdl

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;

Related

HDMI Pass Through with RGB Switch Filter

I'm very new to VHDL and FPGAs, and have hit a rock. Im currently working on video filters on the zybo z7-10, and started off using this guide to create a HDMI passthrough on the board:
https://github.com/dpaul24/hdmi_pass_through_ZyboZ7-10?_ga=2.34188391.796043983.1579510279-2100398226.1578999679
So after getting that working all i want to do is be able to effect the video output. To do this, I tried to set the rgb 24 bit vectors last 8 bits to 0, removing all blue from the output. If i try the following code (with or without the process block) i get a syntax error on the "if" statement line
process is
begin
if sw ='0' then
vid_pData(7 downto 0) <= sw
end if;
end process;
The issue is I don't seem to be able to put this anywhere in the code without causing an error. Can someone explain what's happening here?
Full code below:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
library UNISIM;
use UNISIM.VComponents.all;
entity hdmi_pass_top is
Port (
sysclk_i : in std_logic; -- 125MH System Clock Input
async_reset_i : in std_logic; -- Reset switch on board
-- HDMI In/Rx
tmds_rx_clk_p_i : in std_logic;
tmds_rx_clk_n_i : in std_logic;
tmds_rx_data_p_i : in std_logic_vector(2 downto 0);
tmds_rx_data_n_i : in std_logic_vector(2 downto 0);
hdmi_rx_hpd_o : out std_logic := '1'; -- HPD must be driven
-- I2C
sda_io : inout std_logic;
scl_io : inout std_logic;
-- HDMI Out/Tx
tmds_tx_clk_p_o : out std_logic;
tmds_tx_clk_n_o : out std_logic;
tmds_tx_data_p_o : out std_logic_vector(2 downto 0);
tmds_tx_data_n_o : out std_logic_vector(2 downto 0);
sw : in std_logic
);
end hdmi_pass_top;
architecture hdmi_pass_top_arc of hdmi_pass_top is
component dvi2rgb_0
port (
TMDS_Clk_p : in std_logic;
TMDS_Clk_n : in std_logic;
TMDS_Data_p : in std_logic_vector(2 downto 0);
TMDS_Data_n : in std_logic_vector(2 downto 0);
RefClk : in std_logic;
aRst : in std_logic;
vid_pData : out std_logic_vector(23 downto 0);
vid_pVDE : out std_logic;
vid_pHSync : out std_logic;
vid_pVSync : out std_logic;
PixelClk : out std_logic;
aPixelClkLckd : out std_logic;
SDA_I : in std_logic;
SDA_O : out std_logic;
SDA_T : out std_logic;
SCL_I : in std_logic;
SCL_O : out std_logic;
SCL_T : out std_logic;
pRst : in std_logic
);
end component;
component rgb2dvi_0
PORT (
TMDS_Clk_p : out std_logic;
TMDS_Clk_n : out std_logic;
TMDS_Data_p : out std_logic_vector(2 downto 0);
TMDS_Data_n : out std_logic_vector(2 downto 0);
aRst : in std_logic;
vid_pData : in std_logic_vector(23 downto 0);
vid_pVDE : in std_logic;
vid_pHSync : in std_logic;
vid_pVSync : in std_logic;
PixelClk : in std_logic
);
end component;
component clk_wiz_0
port
(-- Clock in ports
-- Clock out ports
clk_out1 : out std_logic;
-- Status and control signals
reset : in std_logic;
locked : out std_logic;
clk_in1 : in std_logic
);
end component;
signal vid_pData : std_logic_vector(23 downto 0);
signal vid_pVDE : std_logic;
signal vid_pHSync : std_logic;
signal vid_pVSync : std_logic;
signal pixelclk : std_logic;
signal locked : std_logic;
signal clk_200M : std_logic;
signal pixel_clk_sync_rst : std_logic;
signal sda_i : std_logic;
signal sda_o : std_logic;
signal sda_t : std_logic;
signal scl_i : std_logic;
signal scl_o : std_logic;
signal scl_t : std_logic;
begin
clkwiz_inst : clk_wiz_0
port map (
-- Clock out ports
clk_out1 => clk_200M,
-- Status and control signals
reset => async_reset_i,
locked => locked,
-- Clock in ports
clk_in1 => sysclk_i
);
dvi2rgb_inst : dvi2rgb_0
port map (
TMDS_Clk_p => tmds_rx_clk_p_i,
TMDS_Clk_n => tmds_rx_clk_n_i,
TMDS_Data_p => tmds_rx_data_p_i,
TMDS_Data_n => tmds_rx_data_n_i,
RefClk => clk_200M,
aRst => async_reset_i, --Active high asynchronous RefClk reset
vid_pData => vid_pData,
vid_pVDE => vid_pVDE,
vid_pHSync => vid_pHSync,
vid_pVSync => vid_pVSync,
PixelClk => pixelclk,
aPixelClkLckd => open, --
SDA_I => sda_i,
SDA_O => sda_o,
SDA_T => sda_t,
SCL_I => scl_i,
SCL_O => scl_o,
SCL_T => scl_t,
pRst => '0' -- Active high PixelClk synchronous reset
);
SDA_IOBUF_inst: IOBUF
generic map(
DRIVE => 12,
IOSTANDARD => "DEFAULT",
SLEW => "SLOW"
)
port map(
O => sda_i, -- Buffer output
IO => sda_io, -- Buffer inout port(connect directly to top-level port)
I => sda_o, -- Bufferinput
T => sda_t -- 3-state enable input,high=input,low=output
);
SCL_IOBUF_inst: IOBUF
generic map(
DRIVE => 12,
IOSTANDARD => "DEFAULT",
SLEW => "SLOW"
)
port map(
O => scl_i, -- Buffer output
IO => scl_io, -- Buffer inout port(connect directly to top-level port)
I => scl_o, -- Buffer input
T => scl_t -- 3-state enable input,high=input,low=output
);
rgb2dvi_inst : rgb2dvi_0
port map (
TMDS_Clk_p => tmds_tx_clk_p_o,
TMDS_Clk_n => tmds_tx_clk_n_o,
TMDS_Data_p => tmds_tx_data_p_o,
TMDS_Data_n => tmds_tx_data_n_o,
aRst => async_reset_i,
vid_pData => vid_pData,
vid_pVDE => vid_pVDE,
vid_pHSync => vid_pHSync,
vid_pVSync => vid_pVSync,
PixelClk => pixelclk
);
end hdmi_pass_top_arc;
EDIT: changed my if statement to
vid_pData(7 downto 0) <= "00000000" when sw = '0';
and it got rid of the error but the implementation failed. The failure is:
[DRC MDRV-1] Multiple Driver Nets: Net
dvi2rgb_inst/U0/GenerateBUFG.ResyncToBUFG_X/vid_pData[0] has multiple
drivers: vid_pData_reg[0]/Q, and
dvi2rgb_inst/U0/GenerateBUFG.ResyncToBUFG_X/poData_reg[0]/Q.
You're not writing software, you're designing hardware. Your extra code drives signal vid_pData. So, does component dvi2rgb_0. So you have two drivers on that signal. A short circuit in other words.
Also, you do not say what value vid_pData should take if sw is not equal to '0'. Therefore, you will get latches in your hardware. (Google "inferring a latch".)
You need a new signal, eg:
signal vid_pData_new : std_logic_vector(23 downto 0);
then you need to assign a value for both sw equals '0' and '1', otherwise you will get a latch:
vid_pData_new(7 downto 0) <= vid_pData(23 downto 8) & "00000000" when sw = '0' else vid_pData;
The & operator is the concatenation operator. Finally, you need to drive component rgb2dvi_0 with your new signal:
rgb2dvi_inst : rgb2dvi_0
port map (
TMDS_Clk_p => tmds_tx_clk_p_o,
TMDS_Clk_n => tmds_tx_clk_n_o,
TMDS_Data_p => tmds_tx_data_p_o,
TMDS_Data_n => tmds_tx_data_n_o,
aRst => async_reset_i,
vid_pData => vid_pData_new, -- <-----------------
vid_pVDE => vid_pVDE,
vid_pHSync => vid_pHSync,
vid_pVSync => vid_pVSync,
PixelClk => pixelclk
);
Can you see what has been done here? We have inserted a new piece of hardware that drives the new signal vid_pData_new and have specified its value for both possible values of sw. We must do this, otherwise we will get latches. We are designing hardware, not writing software.

7 Series Transceiver synthesis issue

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;

VHDL input is not a globally static

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.

Connect carry out to carry in for adder/subtractor in structural VHDL

So I have the following VHDL code to implement an Nbit adder/subtractor using only a 2:1 mux, an inverter (flips bit), and a full adder. I am having issues connecting the carry out of an adder to the next ones carry in while having the first adder have a carry in of i_Control. Any help would be greatly appreciated :).
library IEEE;
use IEEE.std_logic_1164.all;
use work.all;
entity add_subtract is
generic(N : integer := 16);
port(i_M : in std_logic_vector(N-1 downto 0);
i_N : in std_logic_vector(N-1 downto 0);
i_Control : in std_logic_vector(N-1 downto 0);
o_S : out std_logic_vector(N-1 downto 0));
end add_subtract;
architecture structure of add_subtract is
component bit_adder
port(i_X : in std_logic;
i_Y : in std_logic;
i_Cin : in std_logic;
o_Ss : out std_logic;
o_Couts : out std_logic);
end component;
component inverter
port(i_A : in std_logic;
o_F : out std_logic);
end component;
component bit_mux
port(i_X : in std_logic;
i_Y : in std_logic;
i_S : in std_logic;
o_N : out std_logic);
end component;
signal compvalue, muxvalue, addervalue : std_logic_vector(N-1 downto 0);
signal sel, carry : std_logic_vector(N-1 downto 0);
signal k : integer := 0;
begin
carry(0) <= i_Control(0);
G1: for i in 0 to N-1 generate
one_comp: inverter
port map(i_A => i_N(i),
o_F => compvalue(i));
mux: bit_mux
port map(i_X => i_N(i),
i_Y => compvalue(i),
i_S => i_Control(i),
o_N => muxvalue(i));
struct_adder: bit_adder
port map(i_X => i_M(i),
i_Y => muxvalue(i),
i_Cin => carry(i),
o_Ss => o_S(i),
o_Couts => carry(i));
end generate;
end structure;
Make the carry array one longer:
signal carry : std_logic_vector(N downto 0); -- was N-1
and change this:
o_Couts => carry(i));
to this:
o_Couts => carry(i+1));
in your generate statement while leaving the i_Cin carry input association as is.
If the last carry out isn't conveyed through an output port the net will get eaten during synthesis.

Problems with .ucf file for my microblaze system in ISE

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.

Resources