@@ -79,6 +79,67 @@ module eth_mac_1g_gmii #
7979 input wire [7 :0 ] gmii_rxd,
8080 input wire gmii_rx_dv,
8181 input wire gmii_rx_er,
82+ // debug output
83+ output wire [7 :0 ] gmii_rxd_out,
84+ output wire gmii_rx_dv_out,
85+ output wire gmii_rx_er_out,
86+ output [7 :0 ] mac_gmii_rxd_out,
87+ output mac_gmii_rx_dv_out,
88+ output mac_gmii_rx_er_out,
89+
90+
91+ output [2 :0 ] state_reg_out,
92+ output [2 :0 ] state_next_out,
93+ output reset_crc_out,
94+ output update_crc_out,
95+
96+ output mii_odd_out,
97+ output in_frame_out,
98+
99+ output [DATA_WIDTH- 1 :0 ] gmii_rxd_d0_out,
100+ output [DATA_WIDTH- 1 :0 ] gmii_rxd_d1_out,
101+ output [DATA_WIDTH- 1 :0 ] gmii_rxd_d2_out,
102+ output [DATA_WIDTH- 1 :0 ] gmii_rxd_d3_out,
103+ output [DATA_WIDTH- 1 :0 ] gmii_rxd_d4_out,
104+
105+ output gmii_rx_dv_d0_out,
106+ output gmii_rx_dv_d1_out,
107+ output gmii_rx_dv_d2_out,
108+ output gmii_rx_dv_d3_out,
109+ output gmii_rx_dv_d4_out,
110+
111+ output gmii_rx_er_d0_out,
112+ output gmii_rx_er_d1_out,
113+ output gmii_rx_er_d2_out,
114+ output gmii_rx_er_d3_out,
115+ output gmii_rx_er_d4_out,
116+
117+ output [DATA_WIDTH- 1 :0 ] m_axis_tdata_reg_out,
118+ output [DATA_WIDTH- 1 :0 ] m_axis_tdata_next_out,
119+ output m_axis_tvalid_reg_out,
120+ output m_axis_tvalid_next_out,
121+ output m_axis_tlast_reg_out,
122+ output m_axis_tlast_next_out,
123+ output m_axis_tuser_reg_out,
124+ output m_axis_tuser_next_out,
125+
126+ output start_packet_int_reg_out,
127+ output start_packet_reg_out,
128+ output error_bad_frame_reg_out,
129+ output error_bad_frame_next_out,
130+ output error_bad_fcs_reg_out,
131+ output error_bad_fcs_next_out,
132+
133+ output [PTP_TS_WIDTH- 1 :0 ] ptp_ts_reg_out,
134+
135+ output [31 :0 ] crc_state_out,
136+ output [31 :0 ] crc_next_out,
137+
138+ output clk_enable_out,
139+ output mii_select_out,
140+
141+ output cfg_rx_enable_out,
142+
82143 input wire mii_tx_clk,
83144 output wire gmii_tx_clk,
84145 output wire [7 :0 ] gmii_txd,
@@ -108,6 +169,13 @@ wire [7:0] mac_gmii_txd;
108169wire mac_gmii_tx_en;
109170wire mac_gmii_tx_er;
110171
172+
173+ assign gmii_rxd_out = gmii_rxd;
174+ assign gmii_rx_dv_out= gmii_rx_dv;
175+ assign gmii_rx_er_out= gmii_rx_er;
176+ assign mac_gmii_rxd_out = mac_gmii_rxd;
177+ assign mac_gmii_rx_dv_out = mac_gmii_rx_dv;
178+ assign mac_gmii_rx_er_out = mac_gmii_rx_er;
111179reg [1 :0 ] speed_reg = 2'b10 ;
112180reg mii_select_reg = 1'b0 ;
113181
@@ -212,7 +280,8 @@ gmii_phy_if_inst (
212280 .phy_gmii_tx_en(gmii_tx_en),
213281 .phy_gmii_tx_er(gmii_tx_er),
214282
215- .mii_select(mii_select_reg)
283+ .mii_select(mii_select_reg),
284+
216285);
217286
218287eth_mac_1g #(
@@ -248,7 +317,54 @@ eth_mac_1g_inst (
248317 .rx_error_bad_fcs(rx_error_bad_fcs),
249318 .cfg_ifg(cfg_ifg),
250319 .cfg_tx_enable(cfg_tx_enable),
251- .cfg_rx_enable(cfg_rx_enable)
320+ .cfg_rx_enable(cfg_rx_enable),
321+ .state_reg_out(state_reg_out),
322+ .state_next_out(state_next_out),
323+ .reset_crc_out(reset_crc_out),
324+ .update_crc_out(update_crc_out),
325+
326+ .mii_odd_out(mii_odd_out),
327+ .in_frame_out(in_frame_out),
328+
329+ .gmii_rxd_d0_out(gmii_rxd_d0_out),
330+ .gmii_rxd_d1_out(gmii_rxd_d1_out),
331+ .gmii_rxd_d2_out(gmii_rxd_d2_out),
332+ .gmii_rxd_d3_out(gmii_rxd_d3_out),
333+ .gmii_rxd_d4_out(gmii_rxd_d4_out),
334+
335+ .gmii_rx_dv_d0_out(gmii_rx_dv_d0_out),
336+ .gmii_rx_dv_d1_out(gmii_rx_dv_d1_out),
337+ .gmii_rx_dv_d2_out(gmii_rx_dv_d2_out),
338+ .gmii_rx_dv_d3_out(gmii_rx_dv_d3_out),
339+ .gmii_rx_dv_d4_out(gmii_rx_dv_d4_out),
340+
341+ .gmii_rx_er_d0_out(gmii_rx_er_d0_out),
342+ .gmii_rx_er_d1_out(gmii_rx_er_d1_out),
343+ .gmii_rx_er_d2_out(gmii_rx_er_d2_out),
344+ .gmii_rx_er_d3_out(gmii_rx_er_d3_out),
345+ .gmii_rx_er_d4_out(gmii_rx_er_d4_out),
346+
347+ .m_axis_tdata_reg_out(m_axis_tdata_reg_out),
348+ .m_axis_tdata_next_out(m_axis_tdata_next_out),
349+ .m_axis_tvalid_reg_out(m_axis_tvalid_reg_out),
350+ .m_axis_tvalid_next_out(m_axis_tvalid_next_out),
351+ .m_axis_tlast_reg_out(m_axis_tlast_reg_out),
352+ .m_axis_tlast_next_out(m_axis_tlast_next_out),
353+ .m_axis_tuser_reg_out(m_axis_tuser_reg_out),
354+ .m_axis_tuser_next_out(m_axis_tuser_next_out),
355+
356+ .start_packet_int_reg_out(start_packet_int_reg_out),
357+ .start_packet_reg_out(start_packet_reg_out),
358+ .error_bad_frame_reg_out(error_bad_frame_reg_out),
359+ .error_bad_frame_next_out(error_bad_frame_next_out),
360+ .error_bad_fcs_reg_out(error_bad_fcs_reg_out),
361+ .error_bad_fcs_next_out(error_bad_fcs_next_out),
362+ .ptp_ts_reg_out(ptp_ts_reg_out),
363+ .crc_state_out(crc_state_out),
364+ .crc_next_out(crc_next_out),
365+ .clk_enable_out(clk_enable_out),
366+ .mii_select_out(mii_select_out),
367+ .cfg_rx_enable_out(cfg_rx_enable_out)
252368);
253369
254370endmodule
0 commit comments