Module ip_mac_top_g

TX_MEM_ADDRRX_MEM_ADDRpi_emac_resetlogicpi_emac_sw_resetlogicpi_emac_ref_clocklogicpi_emac_gate_enlogicpi_emac_power_offlogicpi_emac_tx_clocklogicpi_emac_tx_collogicpi_emac_tx_crslogicpi_emac_rx_clocklogicpi_emac_rx_dvlogicpi_emac_rx_errlogicpi_emac_rx_data[7:0]logicpi_host_clocklogicpi_host_stat_readlogicpi_host_enable_wrlogicpi_host_data_wr[31:0]logicpi_host_byte_wr[1:0]logicpi_host_start_wrlogicpi_host_end_wrlogicpi_host_error_wrlogicpi_host_pad_wrlogicpi_host_crc_wrlogicpi_host_wakeuplogicpi_host_wr_data[31:0]logicpi_host_wr_setuplogicpi_host_enable_rdlogicpi_host_stop_xmitlogicpi_host_stop_rcvlogicpi_emac_gigabitlogicpi_emac_half_dplxlogicpi_emac_xoff_value[15:0]logicpi_emac_xon_value[15:0]logicpi_emac_col_limit[4:0]logicpi_emac_tx_fc_enlogicpi_emac_burst_lim[15:0]logicpi_emac_burst_enlogicpi_emac_ifg_cfg_1[7:0]logicpi_emac_ifg_cfg_2[7:0]logicpi_emac_store_fwdlogicpi_emac_threshold[TX_MEM_ADDR-1:0]logicpi_emac_rx_fc_enlogicpi_emac_hash_nfixlogicpi_emac_inverselogicpi_emac_multicastlogicpi_emac_pass_multilogicpi_emac_promisclogicpi_emac_pass_alllogicpi_emac_high_thrs[RX_MEM_ADDR:0]logicpi_emac_low_thrs[RX_MEM_ADDR:0]logicpi_emac_loopbacklogicpi_emac_littlelogicpi_mdio_clocklogicpi_master_mdiologicpi_emac_mdc_wdata[15:0]logicpi_host_mdc_startlogicpi_emac_mdc_rnwlogicpi_emac_mdc_daddr[4:0]logicpi_emac_mdc_raddr[4:0]logicpi_test_enlogicpi_bistmode_enlogicpo_host_tx_idonelogicpo_host_rx_idonelogicpo_emac_gtx_clocklogicpo_emac_tx_enlogicpo_emac_tx_errlogicpo_emac_tx_datalogic[7:0]po_host_stat_emptylogicpo_host_stat_lastlogicpo_host_stat_datalogic[9:0]po_host_full_wrlogicpo_host_last_wrlogicpo_host_empty_rdlogicpo_host_last_rdlogicpo_host_data_rdlogic[31:0]po_host_byte_rdlogic[1:0]po_host_start_rdlogicpo_host_end_rdlogicpo_host_error_rdlogicpo_host_stop_xmitlogicpo_host_stop_rcvlogicpo_master_mdclogicpo_master_mdiologicpo_master_onilogicpo_emac_mdc_errlogicpo_emac_mdc_rdatalogic[15:0]po_emac_mdc_donelogic

Block Diagram of ip_mac_top_g

Parameters

Name

Default value

Description

TX_MEM_ADDR

9

Transmit memory address width (9 -> 512 locations, 10->1024)

RX_MEM_ADDR

6

Receive memory address width (9 -> 512 locations, 10->1024)

Ports

Name

Direction

Type

Description

pi_emac_reset

input

wire logic

Global Hardware reset (active low)

pi_emac_sw_reset

input

wire logic

Global Software reset (active high) (should be applied whenever

pi_emac_ref_clock

input

wire logic

GMII 125 MHz reference clock

pi_emac_gate_en

input

wire logic

Auto Gating Clock Enable (power saving)

pi_emac_power_off

input

wire logic

Power off (all internal clocks are disabled, except for the HOST clock)

po_host_tx_idone

output

wire logic

Transmit/Receive reset (initialization) done Transmit initialization done (host clock domain)

po_host_rx_idone

output

wire logic

Receive initialization done (host clock domain)

pi_emac_tx_clock

input

wire logic

Transmit GMII/MII interface Transmit MII 25/2.5 MHz clock (from PHY)

po_emac_gtx_clock

output

wire logic

Transmit GMII 125 MHz clock (to PHY)

po_emac_tx_en

output

wire logic

Transmit MII/GMII enable indication (to PHY)

po_emac_tx_err

output

wire logic

Transmit MII/GMII error indication (to PHY)

po_emac_tx_data

output

wire logic[7:0]

Transmit MII/GMII data (MII data is po_emac_tx_data[3:0]) (to PHY)

pi_emac_tx_col

input

wire logic

Collision indication (from PHY)

pi_emac_tx_crs

input

wire logic

Carrier Sense indication (from PHY)

pi_emac_rx_clock

input

wire logic

Receive GMII/MII interface Receive GMII/MII 125/25/2.5 MHz clock (from PHY)

pi_emac_rx_dv

input

wire logic

Receive MII/GMII data valid indication (from PHY)

pi_emac_rx_err

input

wire logic

Receive MII/GMII error indication (from PHY)

pi_emac_rx_data

input

wire logic[7:0]

Receive MII/GMII data (MII data is pi_emac_rx_data[3:0]) (from PHY)

pi_host_clock

input

wire logic

HOST interface (common) HOST interface clock signal

pi_host_stat_read

input

wire logic

Transmit statistic HOST interface Statistic TDES0 word
[8] = jabber,[7] = late collision, [6] = excess collision,[5:2] = collision counter [1] = underrun,[0] = deferred Read statistic word command

po_host_stat_empty

output

wire logic

Statistic FIFO not empty

po_host_stat_last

output

wire logic

Last statistic word indication

po_host_stat_data

output

wire logic[9:0]

Statistic TDES0 word data

pi_host_enable_wr

input

wire logic

Tramsmit data path HOST interface Transmit MAC data path, HOST enable command

po_host_full_wr

output

wire logic

Transmit MAC data path, HOST FIFO full indication

po_host_last_wr

output

wire logic

Transmit MAC data path, HOST FIFO last location indication

pi_host_data_wr

input

wire logic[31:0]

Transmit MAC data path, HOST data (transmit data)

pi_host_byte_wr

input

wire logic[1:0]

Transmit MAC data path, HOST byte enable (transmit data byte enable)

pi_host_start_wr

input

wire logic

Transmit MAC data path, HOST start of frame indication

pi_host_end_wr

input

wire logic

Transmit MAC data path, HOST start of frame indication

pi_host_error_wr

input

wire logic

Unused please check if useful (if not remove)

pi_host_pad_wr

input

wire logic

Transmit MAC data path, HOST padding enable (valid only when pi_host_end_wr)

pi_host_crc_wr

input

wire logic

Transmit MAC data path, HOST crc enable (valid only when pi_host_end_wr)

pi_host_wakeup

input

wire logic

Receive setup frame interface (not affected by software reset, setup frame is written during software reset) Wake-up internal clock used by the Setup Frame FSM,

pi_host_wr_data

input

wire logic[31:0]

should be asserted at least 2 clock cycles (HOST clock) before asserting the pi_host_wr_setup (write enable) and can be deasserted 2 clock cycles after Setup Frame completition Setup Frame data (HOST clock synchronous)

pi_host_wr_setup

input

wire logic

Setup Frame write enable (HOST clock synchronous)

pi_host_enable_rd

input

wire logic

Receive data path HOST interface Receive MAC data path, HOST enable command

po_host_empty_rd

output

wire logic

Receive MAC data path, HOST FIFO empty indication

po_host_last_rd

output

wire logic

Receive MAC data path, HOST FIFO last location indication

po_host_data_rd

output

wire logic[31:0]

Receive MAC data path, HOST data (transmit data)

po_host_byte_rd

output

wire logic[1:0]

Receive MAC data path, HOST byte enable (transmit data byte enable)

po_host_start_rd

output

wire logic

Receive MAC data path, HOST start of frame indication

po_host_end_rd

output

wire logic

Receive MAC data path, HOST start of frame indication

po_host_error_rd

output

wire logic

Receive MAC data path, HOST frame error indication (asserted when

po_host_stop_xmit

output

wire logic

frame is bigger than 64 bytes and receive MAC cannot drop the frame or pass bad frames mode is selected by asserting pi_emac_pass_all) Start/Stop transmit and receive process Transmit MAC, transmit stopped indication (HOST clock synchronous)

pi_host_stop_xmit

input

wire logic

Transmit MAC, transmit stop command (HOST clock synchronous)

po_host_stop_rcv

output

wire logic

Receive MAC, receive stopped indication (HOST clock synchronous)

pi_host_stop_rcv

input

wire logic

Receive MAC, receive stop command (HOST clock synchronous)

pi_emac_gigabit

input

wire logic

Operating 1000 Mbps (Gigabit) mode

pi_emac_half_dplx

input

wire logic

Operating Half Duplex mode

pi_emac_xoff_value

input

wire logic[15:0]

Transmit configuration inputs (require software reset to be active during change)
XOFF flow control pause value

pi_emac_xon_value

input

wire logic[15:0]

XON flow control pause value

pi_emac_col_limit

input

wire logic[4:0]

Half Duplex back pressure collision limit

pi_emac_tx_fc_en

input

wire logic

(maximum collision number during back pressure algorithm) Transmit flow control enable

pi_emac_burst_lim

input

wire logic[15:0]

Burst limit (valid only when operating mode is 1000 Mbps)

pi_emac_burst_en

input

wire logic

Burst enable (valid only when operating mode is 1000 Mbps)

pi_emac_ifg_cfg_1

input

wire logic[7:0]

Interframe gap part 1 (usually 2/3 from IFG)

pi_emac_ifg_cfg_2

input

wire logic[7:0]

Interframe gap part 2 (usually 1/3 from IFG)

pi_emac_store_fwd

input

wire logic

Store and Forward transmit FIFO operating mode

pi_emac_threshold

input

wire logic[TX_MEM_ADDR-1:0]

Cut Trough (pi_emac_store_fwd not asserted) FIFO threshold

pi_emac_rx_fc_en

input

wire logic

Receive configuration inputs (require software reset to be active during change)
Receive flow control enable (flow control decoding enable)

pi_emac_hash_nfix

input

wire logic

Hash filtering + 1 Address match / 16 Address match

pi_emac_inverse

input

wire logic

Inverse match filtering mode

pi_emac_multicast

input

wire logic

When asserted the imperfect filtering refers only for multicast addressees

pi_emac_pass_multi

input

wire logic

Pass all multicast addresses

pi_emac_promisc

input

wire logic

Promiscuous Mode (no DA filter)

pi_emac_pass_all

input

wire logic

pass all bad frames (including FC frames)

pi_emac_high_thrs

input

wire logic[RX_MEM_ADDR:0]

from configuration FC high threshold

pi_emac_low_thrs

input

wire logic[RX_MEM_ADDR:0]

from configuration FC low threshold

pi_emac_loopback

input

wire logic

Miscelanous configuration inputs (require software reset to be active during change)
Loopback mode select

pi_emac_little

input

wire logic

Little endian (data path organization)

pi_mdio_clock

input

wire logic

Management Data Input/Output interface (MDIO) Master MDIO reference clock

po_master_mdc

output

wire logic

Master MDIO output 2.5 MHz clock

pi_master_mdio

input

wire logic

Master MDIO data input line (tri-state buffer outside of the module)

po_master_mdio

output

wire logic

Master MDIO data output line (tri-state buffer outside of the module)

po_master_oni

output

wire logic

Master MDIO direction tri-state buffer control (1 - Output, 0 - Input)

po_emac_mdc_err

output

wire logic

Indicates that a read from MDIO interface is invalid and the

pi_emac_mdc_wdata

input

wire logic[15:0]

operation should be retried. This is indicated during a read turn-around cycle when the MDIO slave does not drive the MDIO signal to the low state. MDIO transaction complete. (MDIO clock domain, remain asserted till pi_host_mdc_start is deasserted) MDIO write data (not synchronized, false path, needs to be stable durring pi_host_mdc_start)

po_emac_mdc_rdata

output

wire logic[15:0]

MDIO read data (not synchronized, false path, needs to be stable durring pi_host_mdc_start)

pi_host_mdc_start

input

wire logic

(MDIO clock domain, remain stable till pi_host_mdc_start is deasserted) Setting this bit initiates an MDIO read/write operation (asynchronous,

po_emac_mdc_done

output

wire logic

internally synchronized to MDC clock). Remain asserted till the transaction complete. MDIO transaction complete.

pi_emac_mdc_rnw

input

wire logic

(MDIO clock domain, remain asserted till pi_host_mdc_start is deasserted) This bit indicates the direction of the MDIO operation type:

pi_emac_mdc_daddr

input

wire logic[4:0]

0 - MDIO Write operation, 1 - MDIO read operation (not synchronized, false path, needs to be stable during pi_host_mdc_start) This field is used to specify the device address to be accessed.

pi_emac_mdc_raddr

input

wire logic[4:0]

(not synchronized, false path, needs to be stable during pi_host_mdc_start) This field is used to specify the register address to be accessed.

pi_test_en

input

wire logic

(not synchronized, false path, needs to be stable during pi_host_mdc_start) Test and Scan interface signals
Test mode enable

pi_bistmode_en

input

wire logic

Instances

  • ip_emac_topip_emac_top
    • mac_top : ip_mac_top_g#(.TX_MEM_ADDR(10), .RX_MEM_ADDR(10))

Submodules

mac_clk_mng (ip_mac_clk_mng_g) pi_reset pi_sw_reset pi_gate_en po_host_reset po_host_hw_rst po_mdio_hw_rst po_tx_reset po_rx_reset pi_power_off pi_mdio_clock pi_host_clock pi_host_clock_en pi_ref_clock po_gtx_clock pi_tx_clock pi_tx_clock_en pi_rx_clock pi_rx_clock_en pi_loopback pi_gigabit po_mdio_clock_f po_host_clock_f po_host_clock_g po_tx_clock_f po_tx_clock_g po_rx_clock_f po_rx_clock_g pi_test_en pi_bistmode_en mac_mdio (ip_mac_mdio_g) pi_reset pi_clock pi_master_mdio po_master_mdio po_master_oni po_mdio_err pi_mdio_wdata po_mdio_rdata pi_mdio_start po_mdio_done pi_mdio_rnw pi_mdio_daddr pi_mdio_raddr mac_rx_top (ip_mac_rx_top_g) pi_rx_reset pi_host_reset pi_host_hw_rst pi_rx_f_clock pi_rx_g_clock po_rx_en_clock po_host_init_done pi_tx_gmii_val pi_tx_gmii_err pi_tx_gmii_data pi_tx_xmit_nfc pi_rx_gmii_sel pi_gmii_val pi_gmii_data pi_gmii_err pi_rx_gigabit pi_rx_half_duplex pi_rx_loopback pi_rx_fc_enable po_rx_fc_tx_off po_rx_fc_xoff_tgl po_rx_fc_xon_tgl pi_host_hash_nfix pi_host_little pi_rx_hash_nfix pi_rx_inverse pi_rx_multicast pi_rx_pass_multi pi_rx_promisc pi_rx_pass_all pi_rx_high_thrs pi_rx_low_thrs pi_host_wakeup pi_host_wr_data pi_host_wr_setup pi_host_f_clock pi_host_g_clock po_host_en_clock pi_host_enable_rd po_host_empty_rd po_host_last_rd po_host_data_rd po_host_byte_rd po_host_start_rd po_host_end_rd po_host_error_rd pi_host_stop_rcv po_host_stop_rcv mac_tx_top (ip_mac_tx_top_g) pi_tx_reset pi_host_reset pi_tx_f_clock pi_tx_g_clock po_tx_en_clock po_host_init_done pi_host_stop_xmit po_host_stop_xmit pi_rx_fc_xoff_tgl pi_rx_fc_xon_tgl pi_tx_xoff_value pi_tx_xon_value pi_tx_col_limit pi_tx_fc_enable pi_rx_fc_tx_off pi_tx_gigabit pi_tx_burst_lim pi_tx_burst_en pi_tx_half_duplex pi_tx_ifg_cfg_1 pi_tx_ifg_cfg_2 pi_tx_store_fwd pi_tx_threshold po_tx_xmit_nfc po_gmii_en po_gmii_err po_gmii_data pi_gmii_col pi_gmii_crs pi_host_stat_read po_host_stat_empty po_host_stat_last po_host_stat_data pi_host_clock pi_host_little pi_host_enable_wr po_host_full_wr po_host_last_wr pi_host_data_wr pi_host_byte_wr pi_host_start_wr pi_host_end_wr pi_host_error_wr pi_host_pad_wr pi_host_crc_wr mac_top (ip_mac_top_g) pi_emac_reset pi_emac_sw_reset pi_emac_ref_clock pi_emac_gate_en pi_emac_power_off po_host_tx_idone po_host_rx_idone pi_emac_tx_clock po_emac_gtx_clock po_emac_tx_en po_emac_tx_err po_emac_tx_data pi_emac_tx_col pi_emac_tx_crs pi_emac_rx_clock pi_emac_rx_dv pi_emac_rx_err pi_emac_rx_data pi_host_clock pi_host_stat_read po_host_stat_empty po_host_stat_last po_host_stat_data pi_host_enable_wr po_host_full_wr po_host_last_wr pi_host_data_wr pi_host_byte_wr pi_host_start_wr pi_host_end_wr pi_host_error_wr pi_host_pad_wr pi_host_crc_wr pi_host_wakeup pi_host_wr_data pi_host_wr_setup pi_host_enable_rd po_host_empty_rd po_host_last_rd po_host_data_rd po_host_byte_rd po_host_start_rd po_host_end_rd po_host_error_rd po_host_stop_xmit pi_host_stop_xmit po_host_stop_rcv pi_host_stop_rcv pi_emac_gigabit pi_emac_half_dplx pi_emac_xoff_value pi_emac_xon_value pi_emac_col_limit pi_emac_tx_fc_en pi_emac_burst_lim pi_emac_burst_en pi_emac_ifg_cfg_1 pi_emac_ifg_cfg_2 pi_emac_store_fwd pi_emac_threshold pi_emac_rx_fc_en pi_emac_hash_nfix pi_emac_inverse pi_emac_multicast pi_emac_pass_multi pi_emac_promisc pi_emac_pass_all pi_emac_high_thrs pi_emac_low_thrs pi_emac_loopback pi_emac_little pi_mdio_clock po_master_mdc pi_master_mdio po_master_mdio po_master_oni po_emac_mdc_err pi_emac_mdc_wdata po_emac_mdc_rdata pi_host_mdc_start po_emac_mdc_done pi_emac_mdc_rnw pi_emac_mdc_daddr pi_emac_mdc_raddr pi_test_en pi_bistmode_en

Schematic Diagram of ip_mac_top_g