etherbus.cc (11263:8dcc6b40f164) | etherbus.cc (11701:5e7599457b97) |
---|---|
1/* 2 * Copyright (c) 2002-2005 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; --- 84 unchanged lines hidden (view full) --- 93 return false; 94 } 95 96 DPRINTF(Ethernet, "ethernet packet sent: length=%d\n", pkt->length); 97 DDUMP(EthernetData, pkt->data, pkt->length); 98 99 packet = pkt; 100 sender = sndr; | 1/* 2 * Copyright (c) 2002-2005 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; --- 84 unchanged lines hidden (view full) --- 93 return false; 94 } 95 96 DPRINTF(Ethernet, "ethernet packet sent: length=%d\n", pkt->length); 97 DDUMP(EthernetData, pkt->data, pkt->length); 98 99 packet = pkt; 100 sender = sndr; |
101 int delay = (int)ceil(((double)pkt->length * ticksPerByte) + 1.0); | 101 int delay = (int)ceil(((double)pkt->simLength * ticksPerByte) + 1.0); |
102 DPRINTF(Ethernet, "scheduling packet: delay=%d, (rate=%f)\n", 103 delay, ticksPerByte); 104 schedule(event, curTick() + delay); 105 106 return true; 107} 108 109EtherBus * 110EtherBusParams::create() 111{ 112 return new EtherBus(this); 113} | 102 DPRINTF(Ethernet, "scheduling packet: delay=%d, (rate=%f)\n", 103 delay, ticksPerByte); 104 schedule(event, curTick() + delay); 105 106 return true; 107} 108 109EtherBus * 110EtherBusParams::create() 111{ 112 return new EtherBus(this); 113} |