Module ip_mac_tx_fifo_g

MEM_ADDRpi_resetlogicpi_f_clocklogicpi_empty_rdlogicpi_last_rdlogicpi_rd_addr[MEM_ADDR:0]logicpi_store_fwdlogicpi_threshold[MEM_ADDR-1:0]logicpi_end_of_pktlogicpo_enable_rdregpo_wr_addrreg[MEM_ADDR:0]po_wr_enlogicpo_wr_ptrreg[MEM_ADDR:0]

Block Diagram of ip_mac_tx_fifo_g

The EMAC Transmit FIFO Control module is responsible to generate all the control signals necessary to transfer the data form the EMAC Asynchronous FIFO module to the EMAC Transmit Memory module. The EMAC Transmit FIFO Control module provides the memory write pointer and the write address, used by the EMAC Transmit module in order to calculate if the memory is ready (actual frame transmission begins after the internal transmit 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 transmit. 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.

Parameters

Name

Default

Description

MEM_ADDR

6

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

Ports

Name

Type

Direction

Description

pi_reset

wire logic

input

Global Hardware/Software reset (active low)

pi_f_clock

wire logic

input

Transmit GMII/MII 125/25/2.5 MHz clock (from Clock Manager, free clock)

pi_empty_rd

wire logic

input

Signals from/to Asynchronous FIFO Asynchronous FIFO empty (no read can be performed)

pi_last_rd

wire logic

input

Asynchronous FIFO last valid location

po_enable_rd

reg

output

Asynchronous FIFO read enable

pi_rd_addr

wire logic [MEM_ADDR : 0]

input

Signals from MAC State Machine
Used by TX FIFO to compute the memory state (full/empty/ready)

po_wr_addr

reg [MEM_ADDR : 0]

output

Used by EMAC Transmit State to compute the memory state (full/empty/ready)

po_wr_en

wire logic

output

Signals to memory (synchronous FIFO block) Write memory enable

po_wr_ptr

reg [MEM_ADDR : 0]

output

Write pointer used by the memory to store data

pi_store_fwd

wire logic

input

Configuration Interface Store and forward / Cut trught

pi_threshold

wire logic [MEM_ADDR - 1 : 0]

input

Cut trught threshold

pi_end_of_pkt

wire logic

input

The end of packet/frame is stored into memory

Always Blocks

always @ ( posedge pi_f_clock or negedge pi_reset )

Threshold Counter Process

always @ ( posedge pi_f_clock or negedge pi_reset )

Write Address/Pointer Update Process

always @ ( posedge pi_f_clock or negedge pi_reset )

Assign Read async FIFO/Write sync FIFO enable

1'b0 1'b0 1'b1 1'b1 1 [(!(~ pi_reset) && !(po_wr_ptr[MEM_ADDR] != pi_rd_addr[MEM_ADDR] && po_wr_ptr[MEM_ADDR - 1 : 0] == pi_rd_addr[MEM_ADDR - 1 : 0]) && !(wr_inc[MEM_ADDR] != pi_rd_addr[MEM_ADDR] && wr_inc[MEM_ADDR - 1 : 0] == pi_rd_addr[MEM_ADDR - 1 : 0] && po_wr_en == 1'b1) && !(pi_empty_rd == 1'b1))]
FSM Transitions for po_enable_rd

#

Current State

Next State

Condition

Comment

1

1'b1

1'b0

[(!(~ pi_reset) && !(po_wr_ptr[MEM_ADDR] != pi_rd_addr[MEM_ADDR] && po_wr_ptr[MEM_ADDR - 1 : 0] == pi_rd_addr[MEM_ADDR - 1 : 0]) && !(wr_inc[MEM_ADDR] != pi_rd_addr[MEM_ADDR] && wr_inc[MEM_ADDR - 1 : 0] == pi_rd_addr[MEM_ADDR - 1 : 0] && po_wr_en == 1'b1) && !(pi_empty_rd == 1'b1))]

Instances