1/* 2 * Copyright (c) 2014 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 186 unchanged lines hidden (view full) --- 195 parent->schedule(txEvent, curTick() + switchingDelay()); 196 } 197 } 198} 199 200Tick 201EtherSwitch::Interface::switchingDelay() 202{ |
203 Tick delay = (Tick)ceil(((double)outputFifo.front()->simLength |
204 * ticksPerByte) + 1.0); 205 if (delayVar != 0) 206 delay += random_mt.random<Tick>(0, delayVar); 207 delay += switchDelay; 208 return delay; 209} 210 211EtherSwitch::Interface* --- 143 unchanged lines hidden --- |