Skip to content

Reduced Media Independent Interface

Package name: jsl/protocols/ethernet/MII/RMII

The RMII bus is a variant of MII introduced to reduce the total number of pins required for the interface. The RMII bus runs from a 50MHz clock in contrast to the 25MHz clock typical in an MII interface. It retains the same MDC/MDIO management interface as of RMII v1.2.

Summary

RMII-Constraint

RMII SI Constraint

Constructors

Function Description
RMII-Constraint (+ 1) Constructor for defstruct RMII-Constraint

Methods

Function Description
constrain Constrain the RMII bus

Functions

Function Description
RMII-Constraint Construct RMII constraint with default skew/loss

General Definitions

Function Description
has-rxer Check for the rx-er pin on a passed port, bundle, etc
rmii-bus-skew RMII Databus Skew Specification
rmii-get-trace-impedance
reverse-rmii-bus Reverse the RMII bus
rmii Reduced Medium Independent Interface (RMII) Bundle Generator
rmii-max-loss RMII Databus Max Loss Specification
Variable Description
RMII_BUS_WIDTH

Definitions

RMII-Constraint

RMII SI Constraint

public defstruct RMII-Constraint <: SI-Constraint :
    bus-skew: Toleranced
    loss: Double
    route-struct: RoutingStructure

  • bus-skew: Toleranced - Timing Skew Range for all data bus lines to the clock.

  • loss: Double - Max Loss Limit in dB

  • route-struct: RoutingStructure - Single-ended routing structure for all signals.

This type can be used with the constrain-topology interface to provide default bus constraints for this interface while allowing the user to tailor the specific topology.

Note: By default - this constraint assumes that the clock is delivered from Source -> Destination. In other words, it assumes there is no external 50MHz clock that is driving both the source and destination.

Constructors

RMII-Constraint

Constructor for defstruct RMII-Constraint

public defn RMII-Constraint (bus-skew:Toleranced, loss:Double, route-struct:RoutingStructure)

RMII-Constraint

Constructor for defstruct RMII-Constraint

public defn RMII-Constraint ( -- bus-skew:Toleranced, loss:Double, route-struct:RoutingStructure)

Methods

constrain

Constrain the RMII bus

defmethod constrain (cst:RMII-Constraint, src:JITXObject, dst:JITXObject) -> False

  • Returns False

This function implements the SI-Constraints interface for the RMII bus.

This provides the following constraints: 1. A clock -> data/ctl timing skew const 2. Max Loss Limits on all signals 3. Single-ended Routing Structure on all signals.

Functions

RMII-Constraint

Construct RMII constraint with default skew/loss

public defn RMII-Constraint (route-struct:RoutingStructure) -> RMII-Constraint

  • route-struct: RoutingStructure - Describes the geometric constraints for the bus signals.
  • Returns RMII-Constraint

General Definitions

has-rxer

Check for the rx-er pin on a passed port, bundle, etc

public defn has-rxer (b:JITXObject) -> True|False

  • Returns True|False

rmii-bus-skew

RMII Databus Skew Specification

public defn rmii-bus-skew () -> Toleranced

  • Returns Toleranced - Bus Skew range in seconds

This is a guideline specification. RMII v1.2 does not specify guidance because the 50MHz clock rate and TTL levels don't typically have issues meeting clock setup and hold times (See section 7.2).

The default value provided by this function is 2nS which should be well within in the setup (4ns) and hold (2ns) expectation for a 20nS (50MHz) period. See section 7.4.

rmii-get-trace-impedance

public defn rmii-get-trace-impedance () -> Toleranced

  • Returns Toleranced

reverse-rmii-bus

Reverse the RMII bus

public defn reverse-rmii-bus (p:JITXObject)

This is a helper routine when working with RMII bundles using the constrain-topology methodology:

within [src, dst] = constrain-topology(MCU.rmii => reverse-rmii-bus(PHY.rmii)):
   ...

The idea is that it can be used to cross connect the TXD => RXD and vice versa. The following connections are crossed:

  1. rmii.txd => rmii.rxd
  2. rmii.rxd => rmii.txd
  3. rmii.tx-en => rmii.crs-dv
  4. rmii.crs-dv => rmii.tx-en

The rest of the signals are straight through.

rmii

Reduced Medium Independent Interface (RMII) Bundle Generator

public defn rmii ( -- add-rx-error:True|False = ?)

  • add-rx-error: True|False - This flag will add the optional rx-er pin to the bundle
  • txd - Transmit Data Bus

  • rxd - Receive Data Bus

  • ref-clk - Ref Clock (50MHz)

  • tx-en - Transmit Enable

  • crs-dv - Multiplexed Carrier Sense and Data Valid Line

  • rx-er - Receive Error Line

References

  • https://en.wikipedia.org/wiki/Media-independent_interface#Reduced_media-independent_interface

rmii-max-loss

RMII Databus Max Loss Specification

public defn rmii-max-loss () -> Double

  • Returns Double - Max Signal Loss in dB

This a guideline specification. The RMII v1.2 does not specify any guidance for the max loss of the signals in the bus.

RMII_BUS_WIDTH

public val RMII_BUS_WIDTH

Related Packages

Forwarded by packages: jsl/protocols/ethernet, jsl/protocols