diff --git a/Jenkinsfile b/Jenkinsfile index 666cfd11..49b20f26 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -77,6 +77,9 @@ pipeline { dir("${REPO}") { warnError("Docs") { buildDocs() + dir("examples/app_rmii_100Mbit_icmp") { + buildDocs() + } } } } diff --git a/examples/app_rmii_100Mbit_icmp/README.rst b/examples/app_rmii_100Mbit_icmp/README.rst index 456f9c1a..327ac49f 100644 --- a/examples/app_rmii_100Mbit_icmp/README.rst +++ b/examples/app_rmii_100Mbit_icmp/README.rst @@ -1,8 +1,12 @@ -XMOS 100Mbit Ethernet application note -====================================== +:orphan +############################# +100Mbit Ethernet RMII example +############################# + +******* Summary -------- +******* Ethernet connectivity is an essential part of the explosion of connected devices known collectively as the Internet of Things (IoT). XMOS technology is @@ -10,52 +14,60 @@ perfectly suited to these applications - offering future proof and reliable ethernet connectivity whilst offering the flexibility to interface to a huge variety of "Things". -This application note shows a simple example that demonstrates the use +This example that demonstrates the use of the XMOS Ethernet library to create a layer 2 ethernet MAC interface on an XMOS multicore microcontroller. The code associated with this application note provides an example of using the Ethernet Library to provide a framework for the creation of an -ethernet Media Independent Interface (MII) and MAC interface for +ethernet Reduced Media Independent Interface (RMII) and MAC interface for 100Mbps. The applcation note uses XMOS libraries to provide a simple IP stack capable of responding to an ICMP ping message. The code used in the -application note provides both MII communication to the PHY and a MAC +application note provides both RMII communication to the PHY and a MAC transport layer for ethernet packets and enables a client to connect to it and send/receive packets. -Required tools and libraries -............................ +***************** +Required hardware +***************** + +The example code provided with this application has been implemented and tested +on the xk_eth_xu316_dual_100m board. -For a list of direct dependencies, look for USED_MODULES in the Makefile. +************** +Required tools +************** -Required hardware -................. + * XMOS XTC Tools: 15.3.0 -This application note is designed to run on an XMOS xCORE-200 -series device. -The example code provided with the application has been implemented -and tested on the X200 sliceKIT 1V0 (XK-SK-X200-ST) core board using -ethernet sliceCARD 1V1 (XA-SK-E100). There is no dependancy on this -core board - it can be modified to run on any (XMOS) development board -which has the option to connect to the ethernet sliceCARD. +********************************* +Required libraries (dependencies) +********************************* + * `lib_ethernet `_ + * `lib_xua `_ + * `lib_board_support `_ + * `lib_otpinfo `_ + + +************* Prerequisites -.............. +************* * This document assumes familarity with the XMOS xCORE architecture, - the Ethernet standards IEEE 802.3u (MII), the XMOS tool chain and - the xC language. Documentation related to these aspects which are + the Ethernet standards IEEE 802.3u (RMII), the XMOS tool chain and + the XC language. Documentation related to these aspects which are not specific to this application note are linked to in the references appendix. - * For a description of XMOS related terms found in this document - please see the XMOS Glossary [#]_. - * For an overview of the Ethernet library, please see the Ethernet library user guide. -.. [#] http://www.xmos.com/published/glossary +******* +Support +******* +This package is supported by XMOS Ltd. Issues can be raised against the software at: http://www.xmos.com/support diff --git a/examples/app_rmii_100Mbit_icmp/doc/exclude_patterns.inc b/examples/app_rmii_100Mbit_icmp/doc/exclude_patterns.inc new file mode 100644 index 00000000..ff3d88c3 --- /dev/null +++ b/examples/app_rmii_100Mbit_icmp/doc/exclude_patterns.inc @@ -0,0 +1,6 @@ +# The following patterns are to be excluded from the documentation build +examples +tests +.pytest_cache +CHANGELOG.rst +LICENSE.rst diff --git a/examples/app_rmii_100Mbit_icmp/doc/rst/AN00120.rst b/examples/app_rmii_100Mbit_icmp/doc/rst/AN00120.rst index 26bf2f9b..d6c69970 100644 --- a/examples/app_rmii_100Mbit_icmp/doc/rst/AN00120.rst +++ b/examples/app_rmii_100Mbit_icmp/doc/rst/AN00120.rst @@ -1,177 +1,209 @@ -.. include:: ../../README.rst |newpage| -Overview --------- +############################# +100Mbit Ethernet RMII example +############################# -Introduction -............ +******** +Overview +******** The application note shows the use of the XMOS Ethernet library. The -library allows multiple clients to access the Ethernet hardware. This -application note uses the standard Ethernet MAC which uses two logical -cores. The Ethernet library also provides a real-time MAC which uses -more cores but provides high performance streaming data, accurate +library allows multiple clients to access the Ethernet hardware. +This application note uses the real-time RMII MAC which uses +four cores and provides high performance streaming data, accurate packet timestamping, priority queuing and 802.1Qav traffic shaping. -MII provides the data transfer signals +RMII provides the data transfer signals between the Ethernet PHY (Physical Layer Device or transceiver) and -the xCORE device. The MII layer receives packets of data which are +the xCORE device. The RMII layer receives packets of data which are then routed by an Ethernet MAC layer to multiple processes running on the xCORE. SMI provides the management interface between the PHY and -the xCORE device. +the xCORE device. :numref:`block_diagram` shows the application block diagram. + +.. _block_diagram: -Block Diagram -............. -.. figure:: images/block_diag.* +.. figure:: images/block_diag.pdf :width: 80% Application block diagram -The application communicates with the Ethernet MAC that drives the MII +The application communicates with the Ethernet MAC that drives the RMII data interface to the PHY. A separate PHY driver configures the PHY -via the SMI serial interface. +via the SMI serial interface. The application is tested on the ``xk_eth_xu316_dual_100m`` +board which is an xcore.ai based board. It also has two `TI DP83826E `_ PHYs +connected to it and can run applications requiring up to two ethernet ports. +This application instantiates one RMII MAC port that connects to one of the two +DP83826E PHYs on the board. + + +************************* +100Mbit RMII ICMP example +************************* + +Building the Application +======================== -100Mbit Ethernet library demo ------------------------------ +The following section assumes you have downloaded and installed the `XMOS XTC tools `_ +(see `README` for required version). Installation instructions can be found `here `_. +Be sure to pay attention to the section `Installation of required third-party tools +`_. +The application uses the `xcommon-cmake `_ +build system as bundled with the XTC tools. -The Makefile -............ +The file `CMakeLists.txt` contains the application build configuration. -The demo in this note uses the XMOS Ethernet library and shows a -simple program communicating with the Ethernet library. +To configure the build run the following from an XTC command prompt:: -To start using the Ethernet library, you need to add ``lib_ethernet`` -to you Makefile:: + cd app_rmii_100Mbit_icmp + cmake -G "Unix Makefiles" -B build - USED_MODULES = .. lib_ethernet ... +Any missing dependencies will be downloaded by the build system as part of this configure step. -This demo also gets the MAC address out of the xCORE OTP rom and is -for the sliceKIT. So the Makefile also includes the OTP reading library -(``lib_otpinfo``) and the sliceKIT support library -(``lib_slicekit_support``):: +Finally, the application binaries can be built using ``xmake``:: - USED_MODULES = .. lib_otpinfo lib_slicekit_support + xmake -C build +This will build the application binary ``app_rmii_100Mbit_icmp.xe`` in the ``app_rmii_100Mbit_icmp/bin`` directory. + +The example uses the MAC layer implementation in the ``lib_ethernet`` library. It depends on +``lib_board_support`` for the PHY configuration on the ``xk_eth_xu316_dual_100m`` board. +It also gets the MAC address out of the xCORE OTP ROM, and depends on ``lib_otpinfo`` for that. + +These dependencies are specified in the ``deps.cmake`` file, which is included in the application ``CMakeLists.txt`` Allocating hardware resources -............................. +============================= The Ethernet library requires several ports to communicate with the Ethernet PHY. These ports are declared in the main program file -(``main.xc``). In this demo the ports are set up for the Ethernet -slice connected to tile 1 triangle slot of the sliceKIT. Actual port -names such as ``XS1_PORT_1J`` are specified in XN file and source refers -to them with symbolic names such as ``PORT_ETH_RXCLK``: +(``main.xc``). In this examples the ports are set up for the PHY 1 on the ``xk_eth_xu316_dual_100m`` +board. + +Actual port names such as ``XS1_PORT_1A`` are specified in XN file and source refers +to them with symbolic names such as ``PHY_0_TX_EN``, with the actual to symbolic name mapping +specified in the xn file: -.. literalinclude:: main.xc - :start-on: PORT_ETH_RXCLK - :end-on: PORT_SMI_MDC +.. literalinclude:: ../../src/main.xc + :start-at: rmii_data_port_t + :end-at: PHY_0_TX_EN -Note that the port ``p_eth_dummy`` does not need to be connected to -external hardware - it is just used internally by the Ethernet -library. +In addition to the ports, two clock blocks are required, one each for the ethernet TX and RX clocks. + +.. literalinclude:: ../../src/main.xc + :start-at: eth_rxclk + :end-at: eth_txclk -You will find three additional PHY signals on the sliceCARD: RST_N, -CLK_IN and INT_N. INT_N will be left unused and we will poll SMI registers -to get link state instead. CLK_N receives 25MHz clock from the sliceKIT -and RST_N receives the sliceKITs system reset. The MDIO Serial Management Interface (SMI) is used to transfer management information between MAC and PHY. This interface consists of two signals which are connected to two ports: -.. literalinclude:: main.xc - :start-on: p_smi_mdio - :end-on: p_smi_mdc +.. literalinclude:: ../../src/main.xc + :start-at: p_smi_mdio + :end-at: p_smi_mdc -The final ports used in the application -are the ones to access the internal OTP +The final ports used in the application are the ones to access the internal OTP memory on the xCORE. These ports are fixed and can be intialized with the ``OTP_PORTS_INITIALIZER`` macro supplied by the ``lib_otpinfo`` OTP reading library. -.. literalinclude:: main.xc - :start-on: // These ports are for accessing the OTP memory - :end-on: otp_ports +.. literalinclude:: ../../src/main.xc + :start-at: // These ports are for accessing the OTP memory + :end-at: otp_ports The application main() function -............................... +=============================== The main function in the program sets up the tasks in the application. -.. literalinclude:: main.xc - :start-on: int main +.. literalinclude:: ../../src/main.xc + :start-at: int main + :end-before: return 0; + +The ``rmii_ethernet_rt_mac`` creates a 100M RMII MAC instance that connects to the PHY on board. +It internally starts the four tasks, ``rmii_master_rx_pins_4b``, ``rmii_master_tx_pins``, ``mii_ethernet_filter`` +and ``mii_ethernet_server``, that make up the MAC implementation. +These tasks handle communicating with the PHY at the pin level (``rmii_master_rx_pins_4b``, ``rmii_master_tx_pins``), +filtering received packets based on a MAC address lookup table based filtering, moving them +into the receive queues ((``mii_ethernet_filter``) and communicating with the client processes, +facilitating packet transfer between the clients and the network (``mii_ethernet_server``). -The ``mii_ethernet_mac`` communicates with the PHY and connects to the -application via the three interfaces. It takes the previously declared -ports as arguments as well as the required buffer size for the packet +The ``rmii_ethernet_rt_mac`` tasks takes the previously declared ports as arguments as well as the required buffer size for the packet buffer within the MAC. -The ``smi`` task is part of the Ethernet library and controls the SMI -protocol to configure the PHY. It connects to the -``lan8710a_phy_driver`` task which connects configuration of the PHY +The ``smi`` task is part of the Ethernet library and controls the SMI protocol to configure the PHY. +It connects to the ``dp83826e_phy_driver`` task which connects configuration of the PHY. + +The ``dp83826e_phy_driver`` function is implemented in ``lib_board_support`` and it configures the PHY +over the SMI interface. + +The IP address that the ICMP code uses is declared as an array in ``main.xc``:: + + static unsigned char ip_address[4] = {192, 168, 1, 178}; + +This value can be altered to something that works on a given network. |newpage| The PHY driver -.............. +============== -The PHY drive task connects to both the Ethernet MAC (via the +The PHY drive task ``dp83826e_phy_driver`` connects to both the Ethernet MAC (via the ``ethernet_cfg_if`` interface for configuration) and the SMI driver (via the ``smi_if`` interface): -.. literalinclude:: main.xc - :start-on: [[combinable]] - :end-before: ETH_RX_BUFFER +.. literalinclude:: ../../src/main.xc + :start-at: on tile[1]: dp83826e_phy_driver + :end-at: p_smi_mdc); The first action the drive does is wait for the PHY to power up and then configure the PHY. This is done via library functions provided by the Ethernet library. The main body of the drive is an infinite loop that periodically -reacts to a timer event in an xC ``select`` statement. A a set period +reacts to a timer event in an xC ``select`` statement. After a set period it checks the state of the PHY over SMI and then informs the MAC of -this state via the ``eth.set_link_state`` call. This way the MAC can +this state via the ``i_eth.set_link_state`` call. This way the MAC can know about link up/down events or change of link speed. -ICMP Packet Processing -...................... +ICMP packet processing +======================= The packet processing in the application is handled by the ``icmp_server`` task which is defined in the file ``icmp.xc``. This function connects to the ethernet MAC via a transmit, receive and configuration interface: -.. literalinclude:: icmp.xc - :start-on: [[combinable]] - :end-on: { +.. literalinclude:: ../../src/icmp.xc + :start-at: [[combinable]] + :end-at: { The first thing the task performs is configuring its connection to the MAC. The MAC address is configured by reading a MAC address out of OTP (using the ``otp_board_info_get_mac`` function from the OTP reading library) and then calling the ``set_macaddr`` interface function: -.. literalinclude:: icmp.xc - :start-on: unsigned char mac_address[MACADDR_NUM_BYTES]; - :end-on: cfg.set_macaddr +.. literalinclude:: ../../src/icmp.xc + :start-at: unsigned char mac_address[MACADDR_NUM_BYTES]; + :end-at: cfg.set_macaddr After this, the task configures filters to determine which type of packets is will receive from the MAC: -.. literalinclude:: icmp.xc - :start-on: memcpy(macaddr_filter.addr +.. literalinclude:: ../../src/icmp.xc + :start-at: memcpy(macaddr_filter.addr :end-before: debug_printf The task then proceeds into an infinite loop that waits for a packet from the MAC and then processes it: -.. literalinclude:: icmp.xc - :start-on: while (1) +.. literalinclude:: ../../src/icmp.xc + :start-at: while (1) The xC ``select`` statement will wait for the event ``rx.packet_ready()`` which is a receive notification from the MAC @@ -188,165 +220,76 @@ Details of the packet processing functions ``is_valid_arp_packet``, functions implement the ICMP protocol. |newpage| -|appendix| Demo Hardware Setup --------------------- - - * To run the demo, connect the XTAG USB debug adapter to the sliceKIT via the supplied adaptor board - * Connect the XTAG to the host PC (using USB extension cable if desired) - * Connect the ethernet sliceCARD to the **TILE 1 TRIANGLE** slot of the sliceKIT. Then, connect the slice to the host PC or to the network switch using an ethernet cable. - * On the xCORE-200 series sliceKIT ensure that the xCONNECT LINK (xSCOPE) switch is set to ON, as per the image, to allow xSCOPE to function. - -.. figure:: images/hardware_setup.* - :scale: 100% - :align: center - - Hardware Setup for XMOS MAC library demo - -|newpage| - -Launching the demo device -------------------------- - - - -Once the application source code is imported into the tools you can -edit the demo to configure the IP address the ICMP code uses. This is -declared as a data structure in ``main.xc`` (which is then passed to -the ``icmp_server`` function):: +=================== - static unsigned char ip_address[4] = {192, 168, 1, 178}; +TODO -Alter this value to an IP address that works on your network. -You can now build the project which will generate the binary file required to run the demo application. -Once the application has been built you need to download the application code onto the xCORE-L sliceKIT. Here you use the tools to load the application over JTAG onto the xCORE device. +Running the application +======================= - * Select **Run Configuration**. - * In **Main** menu, enable **xSCOPE** in Target I/O options. - * In **XScope** menu, enable **Offline [XScope] Mode**. - * Click **Apply** and then **Run**. +Once the ``app_rmii_100Mbit_icmp.xe`` application binary is compiled, it can be +executed on the ``xk_eth_xu316_dual_100m`` board. -When the processor has finished booting you will see the following text in the xTIMEcomposer console window when **ping**-ed from the host. +The ``xrun`` tool is used from the command line to download and run the code on the xCore device. +In a terminal with XTC tools sourced, from the ``app_rmii_100Mbit_icmp`` directory, run:: -.. _fig_ping_response: + xrun bin/app_rmii_100Mbit_icmp.xe -.. figure:: images/ping_response.* - :scale: 85% - :align: center +Once this command has executed hte application will be running on the xCore device. - Response on xTIMEcomposer console for **Ping** - -|newpage| - -.. figure:: images/host_ping_response.* - :scale: 85% - :align: center - - Response on Host PC for **Ping** - -On the above `ping` response on host, out of 40 packets transmitted to device first 15 packet couldn't able to reach the device. During this period, device will respond as **ARP packet received**. -After that device (remaining 35 packets) responds as **ICMP packet received**. (:ref:`fig_ping_response`) |newpage| +**** FAQs ------ - -1. What do I do if I need to change the ethernet sliceCARD slot? +**** -The ports in the application are configured to connect to ethernet -sliceCARD in the CIRCLE slot but this can be changed by changing the -port declarations in ``main.xc``. +TODO -2. How can the demo be altered to use the real-time MAC? - - The call to ``mii_ethernet_mac`` needs to be replaces with a call - to ``mii_ethernet_rt_mac``. See the Ethernet library user guide for - more details. - -3. What are Buffers and Queues? Why are they needed? - - The MAC maintains two sets of buffers: one for the incoming packets - and the other for outgoing packets. - - For the incoming packets: +|newpage| - - Empty buffers are in the incoming queue awaiting a packet coming from the MII interfaces. - - Buffers received from the MII interface are filtered and moved into a forwarding queue if appropriate. - - Buffers in the forwarding queue are moved into a client queue depending on which client registered for that type of packet. - - Once the data from a buffer has been sent to a client, the buffer is moved back into the incoming queue. +*************** +Further reading +*************** - For the outgoing packets: +* XMOS XTC Tools Installation Guide - - Empty buffers are stored in an empty queue awaiting a packet from the client. - - Once the data is received the buffer is moved into a transmit queue awaiting output on the MII interface. - - Once the data is transmitted, the buffer is released back to the empty queue. + https://xmos.com/xtc-install-guide -|newpage| + * XMOS XTC Tools User Guide -References ----------- + https://www.xmos.com/view/Tools-15-Documentation -.. nopoints:: + * XMOS application build and dependency management system; xcommon-cmake - * XMOS Tools User Guide - - http://www.xmos.com/published/xtimecomposer-user-guide + https://www.xmos.com/file/xcommon-cmake-documentation/?version=latest - * XMOS xCORE Programming Guide - - http://www.xmos.com/published/xmos-programming-guide * XMOS Layer 2 Ethernet MAC Component https://www.xmos.com/published/xmos-layer-2-ethernet-mac-component - * IEEE 802.3 Ethernet Standards - - http://standards.ieee.org/about/get/802/802.3.html - - * Ethernet Basics - - http://homepage.smc.edu/morgan_david/linux/n-protocol-09-ethernet.pdf * Ethernet Frame - + http://en.wikipedia.org/wiki/Ethernet_frame - - * Ethernet Timestamps - http://m.eetindia.co.in/STATIC/PDF/200906/EEIOL_2009JUN03_NETD_TA_01.pdf?SOURCES=DOWNLOAD * MAC address http://en.wikipedia.org/wiki/MAC_address * Ethernet Type - + http://en.wikipedia.org/wiki/EtherType * Internet Control Message Protocol - - http://en.wikipedia.org/wiki/Internet_Control_Message_Protocol - -|newpage| -Full Source code listing -------------------------- - -Source code for main.xc -....................... - -.. literalinclude:: main.xc - :largelisting: - -Source code for icmp.xc -........................... - -.. literalinclude:: icmp.xc - :largelisting: + http://en.wikipedia.org/wiki/Internet_Control_Message_Protocol |newpage| + diff --git a/examples/app_rmii_100Mbit_icmp/doc/rst/images/Makefile b/examples/app_rmii_100Mbit_icmp/doc/rst/images/Makefile deleted file mode 100644 index fddcef82..00000000 --- a/examples/app_rmii_100Mbit_icmp/doc/rst/images/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -ODGS = $(wildcard *.odg) -PDFS = $(ODGS:.odg=.pdf) - -all: $(PDFS) - @echo PDFs created - -_uncropped: - mkdir _uncropped - -_uncropped/%.pdf: %.odg | _uncropped - soffice -env:UserInstallation=file:///home/$(USER)/.libreoffice-alt --headless --convert-to pdf $< --outdir _uncropped - -%.pdf: _uncropped/%.pdf - pdfcrop $< $@ - -clean: - -rm $(PDFS) - -rm _uncropped/*.pdf - -rmdir _uncropped diff --git a/examples/app_rmii_100Mbit_icmp/doc/rst/xdoc.conf b/examples/app_rmii_100Mbit_icmp/doc/rst/xdoc.conf deleted file mode 100644 index cb5aab68..00000000 --- a/examples/app_rmii_100Mbit_icmp/doc/rst/xdoc.conf +++ /dev/null @@ -1,2 +0,0 @@ -XMOSNEWSTYLE=1 -SOURCE_INCLUDE_DIRS=../../src diff --git a/examples/app_rmii_100Mbit_icmp/doc/substitutions.inc b/examples/app_rmii_100Mbit_icmp/doc/substitutions.inc new file mode 100644 index 00000000..e69de29b diff --git a/examples/app_rmii_100Mbit_icmp/settings.yml b/examples/app_rmii_100Mbit_icmp/settings.yml new file mode 100644 index 00000000..10197321 --- /dev/null +++ b/examples/app_rmii_100Mbit_icmp/settings.yml @@ -0,0 +1,21 @@ +# This file relates to internal XMOS infrastructure and should be ignored by external users +--- +an_number: AN00120 +project: '{{an_number}}' +title: '{{an_number}}: 100Mbit RMII ping example' +version: 1.0.0 + +documentation: + substitutions_path: doc/substitutions.inc + exclude_patterns_path: doc/exclude_patterns.inc + root_doc: doc/rst/AN00120.rst + linkcheck_ignore_regex: ['.*xmos\.com\/file.*'] + pdfs: + doc/rst/AN00120.rst: + pdf_title: '{{title}}' + pdf_filename: '{{an_number}}_v{{version}}' + pdf_short: yes + README.rst: + pdf_title: '{{title}} (README)' + pdf_filename: '{{an_number}}_v{{version}}_readme' + pdf_short: yes diff --git a/examples/app_rmii_100Mbit_icmp/src/icmp.h b/examples/app_rmii_100Mbit_icmp/src/icmp.h index afa69f1d..c11b413a 100644 --- a/examples/app_rmii_100Mbit_icmp/src/icmp.h +++ b/examples/app_rmii_100Mbit_icmp/src/icmp.h @@ -1,4 +1,4 @@ -// Copyright 2013-2021 XMOS LIMITED. +// Copyright 2013-2025 XMOS LIMITED. // This Software is subject to the terms of the XMOS Public Licence: Version 1. #ifndef __icmp_h__ #define __icmp_h__ diff --git a/examples/app_rmii_100Mbit_icmp/src/icmp.xc b/examples/app_rmii_100Mbit_icmp/src/icmp.xc index ab727060..87b82dac 100644 --- a/examples/app_rmii_100Mbit_icmp/src/icmp.xc +++ b/examples/app_rmii_100Mbit_icmp/src/icmp.xc @@ -1,4 +1,4 @@ -// Copyright 2013-2021 XMOS LIMITED. +// Copyright 2013-2025 XMOS LIMITED. // This Software is subject to the terms of the XMOS Public Licence: Version 1. #include #include diff --git a/examples/app_rmii_100Mbit_icmp/src/main.xc b/examples/app_rmii_100Mbit_icmp/src/main.xc index 81416916..26370b3d 100644 --- a/examples/app_rmii_100Mbit_icmp/src/main.xc +++ b/examples/app_rmii_100Mbit_icmp/src/main.xc @@ -1,4 +1,4 @@ -// Copyright 2014-2021 XMOS LIMITED. +// Copyright 2014-2025 XMOS LIMITED. // This Software is subject to the terms of the XMOS Public Licence: Version 1. #include #include @@ -9,8 +9,6 @@ #include "xk_eth_xu316_dual_100m/board.h" #include "debug_print.h" -//#include "ports_rmii.h" - rmii_data_port_t p_eth_rxd = {{PHY_0_RXD_4B, USE_LOWER_2B}}; rmii_data_port_t p_eth_txd = {{PHY_0_TXD_4B, USE_LOWER_2B}};