]> jspc29.x-matter.uni-frankfurt.de Git - trbnet.git/commitdiff
Moving MAC generation to top level gbe_wrapper
authorJan Michel <j.michel@gsi.de>
Fri, 27 Nov 2015 10:25:03 +0000 (11:25 +0100)
committerJan Michel <j.michel@gsi.de>
Fri, 27 Nov 2015 10:25:03 +0000 (11:25 +0100)
gbe_trb/base/gbe_logic_wrapper.vhd
gbe_trb/base/gbe_wrapper.vhd
gbe_trb/base/trb_net16_gbe_main_control.vhd
gbe_trb/base/trb_net_gbe_components.vhd

index 55a9ec4754f8c9abdd3754fb54509b9e3c985a4a..e87da72450d0cf2878e37912dbc4972bcab64dab 100644 (file)
@@ -42,7 +42,7 @@ entity gbe_logic_wrapper is
                RESET                    : in  std_logic;
                GSR_N                    : in  std_logic;
 
-               MY_MAC_OUT               : out std_logic_vector(47 downto 0);
+--             MY_MAC_OUT               : out std_logic_vector(47 downto 0);
                MY_MAC_IN                : in  std_logic_vector(47 downto 0);
                DHCP_DONE_OUT            : out std_logic;
 
@@ -90,7 +90,7 @@ entity gbe_logic_wrapper is
                FEE_STATUS_BITS_IN       : in  std_logic_vector(31 downto 0);
                FEE_BUSY_IN              : in  std_logic;
                -- SlowControl
-               MC_UNIQUE_ID_IN          : in  std_logic_vector(63 downto 0);
+--             MC_UNIQUE_ID_IN          : in  std_logic_vector(63 downto 0);
                GSC_CLK_IN               : in  std_logic;
                GSC_INIT_DATAREADY_OUT   : out std_logic;
                GSC_INIT_DATA_OUT        : out std_logic_vector(15 downto 0);
@@ -273,7 +273,7 @@ begin
        fc_tos         <= x"10";
        fc_ttl         <= x"ff";
 
-       MY_MAC_OUT    <= my_mac;
+--     MY_MAC_OUT    <= my_mac;
        DHCP_DONE_OUT <= dhcp_done;
 
        main_gen : if USE_INTERNAL_TRBNET_DUMMY = 0 generate
@@ -297,7 +297,7 @@ begin
                                MC_RESET_LINK_IN              => global_reset,
                                MC_IDLE_TOO_LONG_OUT          => open,
                                MC_DHCP_DONE_OUT              => dhcp_done,
-                               MC_MY_MAC_OUT                 => my_mac,
+--                             MC_MY_MAC_OUT                 => my_mac,
                                MC_MY_MAC_IN                  => MY_MAC_IN,
 
                                -- signals to/from receive controller
@@ -334,7 +334,7 @@ begin
                                PCS_AN_COMPLETE_IN            => MAC_AN_READY_IN,
 
                                -- signals to/from hub
-                               MC_UNIQUE_ID_IN               => MC_UNIQUE_ID_IN,
+--                             MC_UNIQUE_ID_IN               => MC_UNIQUE_ID_IN,
                                GSC_CLK_IN                    => GSC_CLK_IN,
                                GSC_INIT_DATAREADY_OUT        => GSC_INIT_DATAREADY_OUT,
                                GSC_INIT_DATA_OUT             => GSC_INIT_DATA_OUT,
@@ -436,7 +436,7 @@ begin
                                MC_RESET_LINK_IN              => global_reset,
                                MC_IDLE_TOO_LONG_OUT          => open,
                                MC_DHCP_DONE_OUT              => dhcp_done,
-                               MC_MY_MAC_OUT                 => my_mac,
+--                             MC_MY_MAC_OUT                 => my_mac,
                                MC_MY_MAC_IN                  => MY_MAC_IN,
 
                                -- signals to/from receive controller
@@ -474,7 +474,7 @@ begin
                                PCS_AN_COMPLETE_IN            => MAC_AN_READY_IN,
 
                                -- signals to/from hub
-                               MC_UNIQUE_ID_IN               => MC_UNIQUE_ID_IN,
+--                             MC_UNIQUE_ID_IN               => MC_UNIQUE_ID_IN,
                                GSC_CLK_IN                    => GSC_CLK_IN,
                                GSC_INIT_DATAREADY_OUT        => GSC_INIT_DATAREADY_OUT,
                                GSC_INIT_DATA_OUT             => GSC_INIT_DATA_OUT,
index cbcf39136897c3c6a8261ec73f6dce2ca8cbd680..20a78a45a40f7549fc17c62ff2c0da760b1d496a 100644 (file)
@@ -138,7 +138,7 @@ architecture RTL of gbe_wrapper is
 
        signal dbg_hist, dbg_hist2 : hist_array;
 
-       signal master_mac, mac_0, mac_1, mac_2, mac_3 : std_logic_vector(47 downto 0);
+       signal mac_0, mac_1, mac_2, mac_3 : std_logic_vector(47 downto 0);
        signal cfg_max_reply                          : std_logic_vector(31 downto 0);
 
        signal mlt_cts_number           : std_logic_vector(16 * NUMBER_OF_GBE_LINKS - 1 downto 0);
@@ -200,10 +200,10 @@ architecture RTL of gbe_wrapper is
 begin
        
        mac_impl_gen : if DO_SIMULATION = 0 generate
-               mac_0 <= master_mac(31 downto 8) & x"f50002";
-               mac_1 <= master_mac(31 downto 8) & x"f60002";
-               mac_2 <= master_mac(31 downto 8) & x"f70002";
-               mac_3 <= master_mac(31 downto 8) & x"f80002";
+               mac_0 <= MC_UNIQUE_ID_IN(15 downto 8) &  MC_UNIQUE_ID_IN(23 downto 16) & MC_UNIQUE_ID_IN(31 downto 24) & x"0" & MC_UNIQUE_ID_IN(35 downto 32) & x"7ada";
+    mac_1 <= MC_UNIQUE_ID_IN(15 downto 8) &  MC_UNIQUE_ID_IN(23 downto 16) & MC_UNIQUE_ID_IN(31 downto 24) & x"1" & MC_UNIQUE_ID_IN(35 downto 32) & x"7ada";
+    mac_2 <= MC_UNIQUE_ID_IN(15 downto 8) &  MC_UNIQUE_ID_IN(23 downto 16) & MC_UNIQUE_ID_IN(31 downto 24) & x"2" & MC_UNIQUE_ID_IN(35 downto 32) & x"7ada";
+    mac_3 <= MC_UNIQUE_ID_IN(15 downto 8) &  MC_UNIQUE_ID_IN(23 downto 16) & MC_UNIQUE_ID_IN(31 downto 24) & x"3" & MC_UNIQUE_ID_IN(35 downto 32) & x"7ada";
        end generate mac_impl_gen;
        
        mac_sim_gen : if DO_SIMULATION = 1 generate
@@ -288,7 +288,7 @@ begin
                                CLK_RX_125_IN            => clk_125_rx_from_pcs(3),
                                RESET                    => RESET,
                                GSR_N                    => GSR_N,
-                               MY_MAC_OUT               => master_mac,
+--                             MY_MAC_OUT               => open,
                                MY_MAC_IN                => mac_3,
                                DHCP_DONE_OUT            => dhcp_done(3),
                                MAC_READY_CONF_IN        => mac_ready_conf(3),
@@ -327,7 +327,7 @@ begin
                                FEE_READ_OUT             => mlt_fee_read(3),
                                FEE_STATUS_BITS_IN       => mlt_fee_status(4 * 32 - 1 downto 3 * 32),
                                FEE_BUSY_IN              => mlt_fee_busy(3),
-                               MC_UNIQUE_ID_IN          => MC_UNIQUE_ID_IN,
+--                             MC_UNIQUE_ID_IN          => MC_UNIQUE_ID_IN,
                                GSC_CLK_IN               => mlt_gsc_clk(3),
                                GSC_INIT_DATAREADY_OUT   => mlt_gsc_init_dataready(3),
                                GSC_INIT_DATA_OUT        => mlt_gsc_init_data(4 * 16 - 1 downto 3 * 16),
@@ -409,7 +409,7 @@ begin
                                CLK_RX_125_IN            => clk_125_rx_from_pcs(2),
                                RESET                    => RESET,
                                GSR_N                    => GSR_N,
-                               MY_MAC_OUT               => open,
+--                             MY_MAC_OUT               => open,
                                MY_MAC_IN                => mac_2,
                                DHCP_DONE_OUT            => dhcp_done(2),
                                MAC_READY_CONF_IN        => mac_ready_conf(2),
@@ -448,7 +448,7 @@ begin
                                FEE_READ_OUT             => mlt_fee_read(2),
                                FEE_STATUS_BITS_IN       => mlt_fee_status(3 * 32 - 1 downto 2 * 32),
                                FEE_BUSY_IN              => mlt_fee_busy(2),
-                               MC_UNIQUE_ID_IN          => MC_UNIQUE_ID_IN,
+--                             MC_UNIQUE_ID_IN          => MC_UNIQUE_ID_IN,
                                GSC_CLK_IN               => mlt_gsc_clk(2),
                                GSC_INIT_DATAREADY_OUT   => mlt_gsc_init_dataready(2),
                                GSC_INIT_DATA_OUT        => mlt_gsc_init_data(3 * 16 - 1 downto 2 * 16),
@@ -459,14 +459,6 @@ begin
                                GSC_REPLY_PACKET_NUM_IN  => mlt_gsc_reply_packet(3 * 3 - 1 downto 2 * 3),
                                GSC_REPLY_READ_OUT       => mlt_gsc_reply_read(2),
                                GSC_BUSY_IN              => mlt_gsc_busy(2),
-
-                               --                   SLV_ADDR_IN              => (others => '0'), --SLV_ADDR_IN,
-                               --                   SLV_READ_IN              => '0', --SLV_READ_IN,
-                               --                   SLV_WRITE_IN             => '0', --SLV_WRITE_IN,
-                               --                   SLV_BUSY_OUT             => open, --SLV_BUSY_OUT,
-                               --                   SLV_ACK_OUT              => open, --SLV_ACK_OUT,
-                               --                   SLV_DATA_IN              => (others => '0'), --SLV_DATA_IN,
-                               --                   SLV_DATA_OUT             => open, --SLV_DATA_OUT,
         SLV_ADDR_IN              => BUS_IP_RX.addr(7 downto 0),
         SLV_READ_IN              => BUS_IP_RX.read,
         SLV_WRITE_IN             => BUS_IP_RX.write,
@@ -538,7 +530,7 @@ begin
                                CLK_RX_125_IN            => clk_125_rx_from_pcs(1),
                                RESET                    => RESET,
                                GSR_N                    => GSR_N,
-                               MY_MAC_OUT               => open,
+--                             MY_MAC_OUT               => open,
                                MY_MAC_IN                => mac_1,
                                DHCP_DONE_OUT            => dhcp_done(1),
                                MAC_READY_CONF_IN        => mac_ready_conf(1),
@@ -577,7 +569,7 @@ begin
                                FEE_READ_OUT             => mlt_fee_read(1),
                                FEE_STATUS_BITS_IN       => mlt_fee_status(2 * 32 - 1 downto 1 * 32),
                                FEE_BUSY_IN              => mlt_fee_busy(1),
-                               MC_UNIQUE_ID_IN          => MC_UNIQUE_ID_IN,
+--                             MC_UNIQUE_ID_IN          => MC_UNIQUE_ID_IN,
                                GSC_CLK_IN               => mlt_gsc_clk(1),
                                GSC_INIT_DATAREADY_OUT   => mlt_gsc_init_dataready(1),
                                GSC_INIT_DATA_OUT        => mlt_gsc_init_data(2 * 16 - 1 downto 1 * 16),
@@ -588,14 +580,6 @@ begin
                                GSC_REPLY_PACKET_NUM_IN  => mlt_gsc_reply_packet(2 * 3 - 1 downto 1 * 3),
                                GSC_REPLY_READ_OUT       => mlt_gsc_reply_read(1),
                                GSC_BUSY_IN              => mlt_gsc_busy(1),
-
-                               --                   SLV_ADDR_IN              => (others => '0'), --SLV_ADDR_IN,
-                               --                   SLV_READ_IN              => '0', --SLV_READ_IN,
-                               --                   SLV_WRITE_IN             => '0', --SLV_WRITE_IN,
-                               --                   SLV_BUSY_OUT             => open, --SLV_BUSY_OUT,
-                               --                   SLV_ACK_OUT              => open, --SLV_ACK_OUT,
-                               --                   SLV_DATA_IN              => (others => '0'), --SLV_DATA_IN,
-                               --                   SLV_DATA_OUT             => open, --SLV_DATA_OUT,
         SLV_ADDR_IN              => BUS_IP_RX.addr(7 downto 0),
         SLV_READ_IN              => BUS_IP_RX.read,
         SLV_WRITE_IN             => BUS_IP_RX.write,
@@ -667,7 +651,7 @@ begin
                                CLK_RX_125_IN            => clk_125_rx_from_pcs(0),
                                RESET                    => RESET,
                                GSR_N                    => GSR_N,
-                               MY_MAC_OUT               => open,
+--                             MY_MAC_OUT               => open,
                                MY_MAC_IN                => mac_0,
                                DHCP_DONE_OUT            => dhcp_done(0),
                                MAC_READY_CONF_IN        => mac_ready_conf(0),
@@ -706,7 +690,7 @@ begin
                                FEE_READ_OUT             => mlt_fee_read(0),
                                FEE_STATUS_BITS_IN       => mlt_fee_status(1 * 32 - 1 downto 0 * 32),
                                FEE_BUSY_IN              => mlt_fee_busy(0),
-                               MC_UNIQUE_ID_IN          => MC_UNIQUE_ID_IN,
+--                             MC_UNIQUE_ID_IN          => MC_UNIQUE_ID_IN,
                                GSC_CLK_IN               => mlt_gsc_clk(0),
                                GSC_INIT_DATAREADY_OUT   => mlt_gsc_init_dataready(0),
                                GSC_INIT_DATA_OUT        => mlt_gsc_init_data(1 * 16 - 1 downto 0 * 16),
@@ -717,14 +701,6 @@ begin
                                GSC_REPLY_PACKET_NUM_IN  => mlt_gsc_reply_packet(1 * 3 - 1 downto 0* 3),
                                GSC_REPLY_READ_OUT       => mlt_gsc_reply_read(0),
                                GSC_BUSY_IN              => mlt_gsc_busy(0),
-
-                               --                   SLV_ADDR_IN              => (others => '0'), --SLV_ADDR_IN,
-                               --                   SLV_READ_IN              => '0', --SLV_READ_IN,
-                               --                   SLV_WRITE_IN             => '0', --SLV_WRITE_IN,
-                               --                   SLV_BUSY_OUT             => open, --SLV_BUSY_OUT,
-                               --                   SLV_ACK_OUT              => open, --SLV_ACK_OUT,
-                               --                   SLV_DATA_IN              => (others => '0'), --SLV_DATA_IN,
-                               --                   SLV_DATA_OUT             => open, --SLV_DATA_OUT,
         SLV_ADDR_IN              => BUS_IP_RX.addr(7 downto 0),
         SLV_READ_IN              => BUS_IP_RX.read,
         SLV_WRITE_IN             => BUS_IP_RX.write,
index 0db36d58aa0c1e837c8cda2d29ce76c2a9a1b2ba..208a7d3815a33fdd80555466754c8fec2c3c1ff4 100644 (file)
@@ -41,7 +41,7 @@ entity trb_net16_gbe_main_control is
                MC_RESET_LINK_IN              : in  std_logic;
                MC_IDLE_TOO_LONG_OUT          : out std_logic;
                MC_DHCP_DONE_OUT              : out std_logic;
-               MC_MY_MAC_OUT                 : out std_logic_vector(47 downto 0);
+--             MC_MY_MAC_OUT                 : out std_logic_vector(47 downto 0);
                MC_MY_MAC_IN                  : in  std_logic_vector(47 downto 0);
 
                -- signals to/from receive controller
@@ -80,7 +80,7 @@ entity trb_net16_gbe_main_control is
                PCS_AN_COMPLETE_IN            : in  std_logic;
 
                -- signals to/from hub
-               MC_UNIQUE_ID_IN               : in  std_logic_vector(63 downto 0);
+--             MC_UNIQUE_ID_IN               : in  std_logic_vector(63 downto 0);
 
                GSC_CLK_IN                    : in  std_logic;
                GSC_INIT_DATAREADY_OUT        : out std_logic;
@@ -245,7 +245,7 @@ architecture trb_net16_gbe_main_control of trb_net16_gbe_main_control is
        signal stat_data : std_logic_vector(31 downto 0);
        signal stat_addr : std_logic_vector(7 downto 0);
 
-       signal unique_id : std_logic_vector(63 downto 0);
+--     signal unique_id : std_logic_vector(63 downto 0);
 
        signal nothing_sent     : std_logic;
        signal nothing_sent_ctr : std_logic_vector(31 downto 0);
@@ -256,8 +256,8 @@ architecture trb_net16_gbe_main_control of trb_net16_gbe_main_control is
 
        attribute syn_preserve : boolean;
        attribute syn_keep : boolean;
-       attribute syn_keep of unique_id, nothing_sent, link_state, state, redirect_state, dhcp_done : signal is true;
-       attribute syn_preserve of unique_id, nothing_sent, link_state, state, redirect_state, dhcp_done : signal is true;
+       attribute syn_keep of nothing_sent, link_state, state, redirect_state, dhcp_done : signal is true;
+       attribute syn_preserve of nothing_sent, link_state, state, redirect_state, dhcp_done : signal is true;
 
        signal mc_busy    : std_logic;
        signal incl_dhcp  : std_logic;
@@ -265,7 +265,7 @@ architecture trb_net16_gbe_main_control of trb_net16_gbe_main_control is
        signal selector_debug : std_logic_vector(63 downto 0);
 
 begin
-       unique_id <= MC_UNIQUE_ID_IN;
+--     unique_id <= MC_UNIQUE_ID_IN;
 
        protocol_selector : entity work.trb_net16_gbe_protocol_selector
                generic map(
@@ -809,7 +809,7 @@ begin
        --*************
        -- GENERATE MAC_ADDRESS
        --g_MY_MAC <= unique_id(31 downto 8) & x"be0002";
-       MC_MY_MAC_OUT <= unique_id(31 downto 8) & x"be0002";
+--     MC_MY_MAC_OUT <= unique_id(31 downto 8) & x"be0002";
 
        --*************
 
index 2508d4e2a1a013ba38cf972b0601e0929f51d621..8a67ec0961dfba7f452c4afd3822a59739438a02 100644 (file)
@@ -485,7 +485,7 @@ port (
        MC_RESET_LINK_IN        : in    std_logic;
        MC_IDLE_TOO_LONG_OUT : out std_logic;
        MC_DHCP_DONE_OUT : out std_logic;
-       MC_MY_MAC_OUT : out std_logic_vector(47 downto 0);
+--     MC_MY_MAC_OUT : out std_logic_vector(47 downto 0);
        MC_MY_MAC_IN : in std_logic_vector(47 downto 0);
 
 -- signals to/from receive controller
@@ -523,7 +523,7 @@ port (
        PCS_AN_COMPLETE_IN      : in    std_logic;
 
 -- signals to/from hub
-       MC_UNIQUE_ID_IN         : in    std_logic_vector(63 downto 0);
+--     MC_UNIQUE_ID_IN         : in    std_logic_vector(63 downto 0);
        
        GSC_CLK_IN               : in std_logic;
        GSC_INIT_DATAREADY_OUT   : out std_logic;