Functional Description
14.3 Functional Description
The 3 port switch (3PSW) Ethernet Subsystem peripheral are compliant to the IEEE Std 802.3
Specification. The 3PSW Ethernet Subsystem contains two RGMII/RMII interfaces, one CPPI 3.0
interface, Interrupt Controller, MDIO and CPSW_3G which contains two GMII interfaces as shown in
The subsystem modules are discussed in detail in the following sections.
14.3.1 CPSW_3G Subsystem
14.3.1.1 Interrupt Pacing
The receive and transmit pulse interrupts can be paced. The receive threshold and miscellaneous
interrupts are not paced. The Interrupt pacing feature limits the number of interrupts that occur during a
given period of time. For heavily loaded systems in which interrupts can occur at a very high rate (e.g.
148,800 packets per second for Ethernet), the performance benefit is significant due to minimizing the
overhead associated with servicing each interrupt. Interrupt pacing increases the CPU cache hit ratio by
minimizing the number of times that large interrupt service routines are moved to and from the CPU
instruction cache.
Each CPU receive and transmit pulse interrupt contains an interrupt pacing sub-block (six total). Each
sub-block is disabled by default allowing the selected interrupt inputs to pass through unaffected. The
interrupt pacing module counts the number of interrupts that occur over a 1ms interval of time. At the end
of each 1ms interval, the current number of interrupts is compared with a target number of interrupts
(specified by the associated maximum number of interrupts register).
Based on the results of the comparison, the length of time during which interrupts are blocked is
dynamically adjusted. The 1ms interval is derived from a 4us pulse that is created from a prescale counter
whose value is set in the int_prescale value in the Int_Control register. The int_prescale value should be
written with the number of VBUSP_CLK periods in 4us. The pacing timer determines the interval during
which interrupts are blocked and decrements every 4us. It is reloaded each time a zero count is reached.
The value loaded into the pacing timer is calculated by hardware every 1ms according to the following
algorithm:
if (intr_count > 2*intr_max)
pace_timer = 255;
else if (intr_count > 1.5*intr_max)
pace_timer = last_pace_timer*2 + 1;
else if (intr_count > 1.0*intr_max)
pace_timer = last_pace 1;
else if (intr_count > 0.5*intr_max)
pace_timer = last_pace_timer - 1;
else if (intr_count != 0)
pace_timer = last_pace_timer/2;
else
pace_timer = 0;
If the rate of interrupt inputs is much less than the target interrupt rate specified in the associated
maximum interrupts register, then the interrupt is not blocked. If the interrupt rate is greater than the target
rate, the interrupt will be “paced” at the rate specified in the interrupt maximum register. The interrupt
maximum register should be written with a value between 2 and 63 inclusive indicating the target number
of interrupts per milli-second.
14.3.1.2 Reset Isolation
Reset isolation for the Ethernet switch on Device is that the switch function of the ethernet IP remains
active even in case of all device resets except for POR pin reset and ICEPICK COLD reset. Packet traffic
to/from the 3PSW host will be flushed/dropped, but the ethernet switch will remain operational for all traffic
between external devices on the switch even though the device is under-going a device reset.Pin mux
configuration for ethernet related IO and reference clocks needed by the Ethernet switch IP to be active is
controlled by a protected control module bit. If reset isolation is enabled, then only a POR pin or ICEPICK
COLD reset event should fully reset the Ethernet switch IP including the actual switch and also the
reference clocks and pin mux control specifically associated with the Ethernet IP.
1176
Ethernet Subsystem
SPRUH73H – October 2011 – Revised April 2013
Copyright © 2011–2013, Texas Instruments Incorporated