Skip to content

Commit

Permalink
Deleted outdated images
Browse files Browse the repository at this point in the history
  • Loading branch information
Shuchita Khare committed Feb 3, 2025
1 parent 6f20ebf commit b6384fb
Show file tree
Hide file tree
Showing 10 changed files with 2 additions and 46 deletions.
10 changes: 1 addition & 9 deletions examples/app_rmii_100Mbit_icmp/doc/rst/AN00120.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,7 @@ between the Ethernet PHY (Physical Layer Device or transceiver) and
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. :numref:`block_diagram` shows the application block diagram.

.. _block_diagram:


.. figure:: images/block_diag.pdf
:width: 80%

Application block diagram
the xCORE device.

The application communicates with the Ethernet MAC that drives the RMII
data interface to the PHY. A separate PHY driver configures the PHY
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
38 changes: 1 addition & 37 deletions examples/app_rmii_100Mbit_icmp/src/main.xc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "xk_eth_xu316_dual_100m/board.h"
#include "debug_print.h"

rmii_data_port_t p_eth_rxd = {{PHY_0_RXD_4B, USE_LOWER_2B}};
rmii_data_port_t p_eth_rxd = {{PHY_0_RXD_4B, USE_UPPER_2B}};
rmii_data_port_t p_eth_txd = {{PHY_0_TXD_4B, USE_LOWER_2B}};

port p_eth_clk = CLK_50M;
Expand Down Expand Up @@ -41,42 +41,6 @@ enum cfg_clients {
NUM_CFG_CLIENTS
};

[[combinable]]
void lan8710a_phy_driver(client interface smi_if smi,
client interface ethernet_cfg_if eth) {
ethernet_link_state_t link_state = ETHERNET_LINK_DOWN;
ethernet_speed_t link_speed = LINK_100_MBPS_FULL_DUPLEX;
const int link_poll_period_ms = 1000;
const int phy_address = 0x0;
timer tmr;
int t;
tmr :> t;

while (smi_phy_is_powered_down(smi, phy_address));
smi_configure(smi, phy_address, LINK_100_MBPS_FULL_DUPLEX, SMI_ENABLE_AUTONEG);

while (1) {
select {
case tmr when timerafter(t) :> t:
ethernet_link_state_t new_state = smi_get_link_state(smi, phy_address);
// Read LAN8710A status register bit 2 to get the current link speed
if ((new_state == ETHERNET_LINK_UP) &&
((smi.read_reg(phy_address, 0x1F) >> 2) & 1)) {
link_speed = LINK_10_MBPS_FULL_DUPLEX;
}
else {
link_speed = LINK_100_MBPS_FULL_DUPLEX;
}
if (new_state != link_state) {
link_state = new_state;
eth.set_link_state(0, new_state, link_speed);
}
t += link_poll_period_ms * XS1_TIMER_KHZ;
break;
}
}
}

#define ETH_RX_BUFFER_SIZE_WORDS 1600
const int phy_address = 0x0;
int main()
Expand Down

0 comments on commit b6384fb

Please sign in to comment.