A virtual counter for dynamically calculating memory addresses at a digital switch
that receives data streams of different data rates. The switch has a memory that
is divisible into partitions with each partition being divisible into multiple
locations. A virtual counter is implemented for each data stream in a rate conversion
architecture at the switch to optimize usage of the switch memory. An input virtual
counter is used to calculate a data memory address and an output virtual counter
is used to calculate a connection memory address.