Module ip_mac_rx_fifo_g
Overview
Name |
Default value |
Description |
---|---|---|
MEM_ADDR |
6 |
Transmit memory address width (9 -> 512 locations, 10->1024) |
Name |
Direction |
Type |
Description |
---|---|---|---|
pi_reset |
input |
wire logic |
Global Hardware/Software reset (active low) |
pi_f_clock |
input |
wire logic |
Receive GMII/MII 125/25/2.5 MHz clock (from Clock Manager) |
pi_full_wr |
input |
wire logic |
Signals from/to Asynchronous FIFO Asynchronous FIFO full (no write can be performed) |
pi_last_wr |
input |
wire logic |
Asynchronous FIFO last valid location |
po_enable_wr |
output |
var reg |
Asynchronous FIFO write enable |
pi_wr_ptr |
input |
wire logic[MEM_ADDR:0] |
Signals from MAC State Machine |
pi_wr_addr |
input |
wire logic[MEM_ADDR:0] |
Write address (memory write address) |
po_rd_addr |
output |
var reg[MEM_ADDR:0] |
Used by EMAC Receive State to see the momory state (full/empty/ready) |
pi_wr_sof |
input |
wire logic |
Memory SOF and write enable (use for fc toggle function) Start of frame indication (resend a new FC packet since |
pi_wr_en |
input |
wire logic |
a new frame was received during pause period, a previously FC was send) FIFO write enable (valid start of frame) |
pi_high_thrs |
input |
wire logic[MEM_ADDR:0] |
Flow control From configuration FC high threshold |
pi_low_thrs |
input |
wire logic[MEM_ADDR:0] |
From configuration FC low threshold |
po_fc_xoff_tgl |
output |
var reg |
(to TX EMAC) insert XOFF flow control information |
po_fc_xon_tgl |
output |
var reg |
(to TX EMAC) insert XON flow control information |
Always Blocks
- always @ ( posedge pi_f_clock or negedge pi_reset )
Low/High Threshold Assignment
# |
Current State |
Next State |
Condition |
---|---|---|---|
1 |
1’b1 |
1’b0 |
[(!(~ pi_reset) && !(pi_high_thrs < fifo_level && pi_wr_en == 1’b1 && pi_wr_sof == 1’b1))] |
- always @ ( posedge pi_f_clock or negedge pi_reset )
Write Enable & Address/Pointer Update Process
# |
Current State |
Next State |
Condition |
---|---|---|---|
1 |
1’b1 |
1’b0 |
[(!(~ pi_reset) && !(valid_data == 1’b0) && !(pi_full_wr == 1’b1))] |
Instances
- ip_emac_topip_emac_top
- mac_topip_mac_top_g
- mac_rx_topip_mac_rx_top_g
rx_fifo : ip_mac_rx_fifo_g#(.MEM_ADDR(10))
The EMAC Receive FIFO Control module is responsible to generate all the control signals necessary to transfer the data form the EMAC Receive Memory module to the EMAC Asynchronous FIFO module. The EMAC Receive FIFO Control module provides the memory write memory pointer and the write address, used by the EMAC Receive module in order to calculate if the memory is ready (actual frame transmission begins after the internal Receive memory had reached either a programmable threshold or after a full frame is contained in the memory). The write address is updated (takes the write pointer value) whenever the memory contains enough data for Receive. The pointer update is made when the number of words of the frame exceeds a programmed threshold value or the entire frame is in the memory.