GithubHelp home page GithubHelp logo

276921237 / xge_mac Goto Github PK

View Code? Open in Web Editor NEW

This project forked from freecores/xge_mac

0.0 0.0 2.0 976 KB

Ethernet 10GE MAC

Shell 0.77% Emacs Lisp 0.16% Coq 8.50% Verilog 53.32% Makefile 0.24% Batchfile 0.05% Stata 0.73% C++ 36.06% Objective-C 0.18%

xge_mac's Introduction

========================
10GE MAC Core
========================


------------------------
1. Directory Structure
------------------------

The directory structure for this project is shown below.

.
|-- doc                 - Documentation files
|
|-- rtl
|   |-- include         - Verilog defines and utils
|   `-- verilog         - Verilog source files for xge_mac
|
|-- sim
|   |-- systemc         - SystemC simulation directory
|   `-- verilog         - Verilog simulation directory
|
`-- tbench
    |-- systemc         - SystemC test-bench source files
    `-- verilog         - Verilog test-bench source files



------------------------
2. Simulation
------------------------

There are two simulation environments that can be used to validate the code.
The verilog simulation is very basic and meant for those who want to look
at how the MAC operates without going through the effort of setting up SystemC.
The SystemC environment is more sophisticated and covers all features of the MAC.



------------------------
2.1 Verilog Simulation
------------------------

To run the verilog simulation, compile all project files under rtl/verilog along with
top level testbench file:

  - tbench/verilog/tb_xge_mac.v

There is a Modelsim "do" file called "sim.do" under sim/verilog for those using Modelsim.
Once all the files are compiled, start simulation using entity "tb".


The verilog simulation reads packets from "packet_tx.txt" and writes them to the MAC
transmit fifo using the packet transmit interface (pkt_tx_data). As frames become
available in the transmit fifo, the MAC calulates the CRC and sends them out on xgmii_tx.
The xgmii_tx interface is looped-back to xgmii_rx in the testbench. The frames are thus
processed by the MAC receive engine and stored in the receive fifo. The testbench reads
frames from the receive interface (pkt_rx_data) and prints out the results.



------------------------
2.2 SystemC Simulation
------------------------

In order to use the SystemC environment it is required to first install SystemC from
www.systemc.org. Free membership may be required to download the core SystemC files.

The testbench was developed and tested with Verilator, a free HDL simulator that
compiles verilog into C++ or SystemC code. You can download Verilator from
www.veripool.org. You also need to install SystemPerl and Verilog-Perl for waveform
traces.


Once all the required tools are installed:

  - Move to directory sim/systemc

  - Type "./compile.sh"

  - Type "./run.sh"


If the simulation is running correctly you should see messages from the scoreboard
as packets are transmited and received on the various interfaces.

Simulation output:

    -----------------------
    Packet size 
    -----------------------
    SCOREBOARD XGMII INTERFACE TX (60)
    SCOREBOARD XGMII INTERFACE TX (60)
    SCOREBOARD PACKET INTERFACE TX (50)
    SCOREBOARD XGMII INTERFACE TX (60)
    SCOREBOARD PACKET INTERFACE TX (51)
    SCOREBOARD XGMII INTERFACE TX (60)
    SCOREBOARD PACKET INTERFACE RX (TX SIZE=60  RX SIZE=60)
    ...





xge_mac's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.