Professional Documents
Culture Documents
Rev 1.0
2016/2/13
特性
完全硬件实现,延迟低。
简单的 FIFO 接口。
包括了 MAC 层。
可配置的 IP 地址和端口号。
支持巨型帧。
支持服务器模式。
结构
mac_config
eth_fsm
Simple MAC
Rx Path
88E1111
Tx Path
User Module
操作流程
第一步: 修改 “tcpip_hw_defines.sv”.
1.如果 phy 接口是 RGMII, 去掉注释:“//`define RGMII_IF”, otherwise, the core use GMII.
第二步: 修改 “typedefs.pkg.sv”
在 “parameter PKG_SIZE = 2048;”, 如果值大于 1450, 你必须在 PC 端打开巨型帧。
1. 打开设备管理器。
2. 右击所用网卡,选择属性。
3. 在 高 级 标 签 页 里 的 巨 型 数 据 包 , 修 改 值 为 需 要 的 值 。
第四步,运行时的操作
接口如下:
input [7:0] wr_data,
input wr_clk,
input wr_en,
output wr_full,
input rd_clk,
input rd_en,
output rd_empty,
这个 IP 核的用户接口是相当简单的。
这个 IP 核可以看作 2 个 fifo,写 fifo 用于发送数据,读 fifo 用于接收数据。
另外 3 个端口用于配置 ip 地址和端口。
PC 端 TCP 示例程序
1. 把 IP 核的接口配置成如下
2. 设置 PC 的 ip 为上面的 remote_ipaddr.
3. 可以 ping 上面的 local_ipaddr.
4. 打开 net_clinet.exe.
5. 点击 start 开始捕获一次数据。
6. 可以用鼠标左右键缩放。
如果放大到一定程度,可以看到捕获的数据。
This IP Core has 2 versions, UDP version is open source IP Core, and TCP version is not open
source.
Rev 1.0
2016/2/13
Features
Core architecture
mac_config
eth_fsm
Simple MAC
Rx Path
88E1111
Tx Path
User Module
Operation
1.If the phy interface is RGMII, uncomment “//`define RGMII_IF”, otherwise, the core use GMII.
2.If user module and the data_gen module is not on the same FPGA, uncomment”//`define
DATA_GEN_OUTSIDE”, otherwise, the core use data_gen module inside.
Add the FPGA vendor specific IP cores to the project and compile.
The ip core file is sync_fifo.v.
The interface between the core and user module are quite simple.
The core can be treated as two fifos, write fifo for tx data and rx fifo for rx data.
The other three ports configure the operating parameters.