beginner_EDA
Full Member level 4
- Joined
- Aug 14, 2013
- Messages
- 191
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,296
- Activity points
- 3,854
Hi, I am trying to generate logic to send Packet(IGMP) over 10Gig Interface(bold) shown in attachment.
10 Gig Interface is already working in a design in RX mode(bold).
Wanted to ask if I am proceeding in a right way or not?
Code VHDL - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 type lut is array (0 to 5) of std_logic_vector(63 downto 0); signal IGMP_packet :lut:=(x"01005e0000fe90e2", x"bab66c1508004600", x"00200c5b00000102", x"9ae5a9fef29fe000", x"00f9940400001600", x"0904e00000f90000"); signal IGMP_packet_1 : std_logic_vector(63 downto 0):=(others=>'0'); signal pack_ct : integer range 0 to 6:=0; signal kc705_tx_axis_aresetn : std_logic; signal kc705_tx_axis_tdata : std_logic_vector(63 downto 0); signal kc705_tx_axis_tvalid : std_logic; signal kc705_tx_axis_tlast : std_logic; signal kc705_tx_axis_tkeep : std_logic_vector(7 downto 0); signal kc705_tx_axis_tready : std_logic; signal Query_Response_Interval : integer range 0 to 781250000:=0; signal Query_Response : std_logic:='0'; begin igmp_pac:process(eth_clk) begin if rising_edge(eth_clk) then if eth_rst_pri = '1' then IGMP_packet_1 <= (others=>'0'); else if kc705_tx_axis_tready = '1' then Query_Response_Interval <= Query_Response_Interval + 1; if Query_Response_Interval = 781250000 then -- 156250000 * 5 = 5 Seconds Query_Response <= '1'; Query_Response_Interval <= 0; else Query_Response <= '0'; end if; if Query_Response = '1' then kc705_tx_axis_tvalid <= '1'; end if; if kc705_tx_axis_tvalid = '1' then pack_ct <= pack_ct + 1; if pack_ct = 4 then kc705_tx_axis_tlast <= '1'; end if; if pack_ct = 5 then kc705_tx_axis_tvalid <= '0'; kc705_tx_axis_tlast <= '0'; pack_ct <= 0; end if; end if; if kc705_tx_axis_tvalid = '1' then IGMP_packet(4)<= IGMP_packet(5); IGMP_packet(3)<= IGMP_packet(4); IGMP_packet(2)<= IGMP_packet(3); IGMP_packet(1)<= IGMP_packet(2); IGMP_packet(0)<= IGMP_packet(1); IGMP_packet_1 <= IGMP_packet(0); kc705_tx_axis_tkeep <= 0x"FF"; else IGMP_packet_1 <= (others=>'0'); kc705_tx_axis_tkeep <= (others=>'0'); end if; end if; end if; end if; end process;
10 Gig Interface is already working in a design in RX mode(bold).
Code VHDL - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 ten_gig_block_kc705 : entity work.ten_gig_wrapper generic map( C_10G_SHARED_LOGIC => 1 ) port map( reset => main_rst, [B] tx_axis_aresetn => kc705_tx_axis_aresetn, tx_axis_tdata => IGMP_packet_1, tx_axis_tvalid => kc705_tx_axis_tvalid, tx_axis_tlast => kc705_tx_axis_tlast, tx_axis_tkeep => kc705_tx_axis_tkeep, tx_axis_tready => kc705_tx_axis_tready, tx_statistics_vector => open, tx_statistics_valid => open, [/B] [B] rx_axis_aresetn => not (eth_rst_pri), rx_axis_tdata => kc705_rx_axis_tdata, rx_axis_tvalid => kc705_rx_axis_tvalid, rx_axis_tuser => kc705_rx_axis_tuser, rx_axis_tlast => kc705_rx_axis_tlast, rx_axis_tkeep => kc705_rx_axis_tkeep, [/B] rx_statistics_vector => kc705_rx_statistics_vector, rx_statistics_valid => kc705_rx_statistics_valid, s_axi_aclk => ten_gig_eth_mac1_s_axi_aclk, s_axi_aresetn => ten_gig_eth_mac1_s_axi_aresetn, s_axi_awaddr => ten_gig_eth_mac1_s_axi_awaddr, s_axi_awvalid => ten_gig_eth_mac1_s_axi_awvalid, s_axi_awready => ten_gig_eth_mac1_s_axi_awready, s_axi_wdata => ten_gig_eth_mac1_s_axi_wdata, s_axi_wvalid => ten_gig_eth_mac1_s_axi_wvalid, s_axi_wready => ten_gig_eth_mac1_s_axi_wready, s_axi_bresp => ten_gig_eth_mac1_s_axi_bresp, s_axi_bvalid => ten_gig_eth_mac1_s_axi_bvalid, s_axi_bready => ten_gig_eth_mac1_s_axi_bready, s_axi_araddr => ten_gig_eth_mac1_s_axi_araddr, s_axi_arvalid => ten_gig_eth_mac1_s_axi_arvalid, s_axi_arready => ten_gig_eth_mac1_s_axi_arready, s_axi_rdata => ten_gig_eth_mac1_s_axi_rdata, s_axi_rresp => ten_gig_eth_mac1_s_axi_rresp, s_axi_rvalid => ten_gig_eth_mac1_s_axi_rvalid, s_axi_rready => ten_gig_eth_mac1_s_axi_rready, --PCS/PMA Shared Ports Only refclk_p => eth_refclk_p, refclk_n => eth_refclk_n, refclklol => eth_refclk_lol, clk156_out => eth_clk, txusrclk_out => txusrclk, txusrclk2_out => txusrclk2, areset_clk156_out => areset_clk156, gttxreset_out => gttxreset, gtrxreset_out => gtrxreset, txuserrdy_out => txuserrdy, qplllock_out => qplllock, qplloutclk_out => qplloutclk, qplloutrefclk_out => qplloutrefclk, reset_counter_done_out => reset_counter_done, clk156_in => eth_clk, dclk_in => eth_clk, txusrclk_in => txusrclk, txusrclk2_in => txusrclk2, areset_clk156_in => areset_clk156, gttxreset_in => gttxreset, gtrxreset_in => gtrxreset, txuserrdy_in => txuserrdy, qplllock_in => qplllock, qplloutclk_in => qplloutclk, qplloutrefclk_in => qplloutrefclk, reset_counter_done_in => reset_counter_done, tx_fault => kc705_tx_fault, signal_detect => kc705_signal_detect, xphy_status => kc705_xphy_status, resetdone => eth_gtx0rstdone, ge_txp => kc705_ge_txp, ge_txn => kc705_ge_txn, ge_rxp => kc705_ge_rxp, ge_rxn => kc705_ge_rxn );
Wanted to ask if I am proceeding in a right way or not?