From 5f6328d9c63e44dd16be54a6fbab4fbdb3b78d7e Mon Sep 17 00:00:00 2001 From: Nathan Binkert Date: Wed, 17 Nov 2004 01:27:08 -0500 Subject: properly implement the fifo _reserved stuff. dev/pktfifo.cc: need to checkpoint _reserved dev/pktfifo.hh: When clearing, clear _reserved size() is used for determining how many bytes are in the fifo ready to be pulled, so we don't want to add _reserved avail() on the other hand is used for determining how much free space is in the fifo for adding packets. adjust the implementation of empty() and full() to reflect this. --HG-- extra : convert_revision : 3281972b4b70ea5833d39ae7ce1e73648b3573b0 --- dev/pktfifo.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'dev/pktfifo.cc') diff --git a/dev/pktfifo.cc b/dev/pktfifo.cc index cf09ae910..00c12ce68 100644 --- a/dev/pktfifo.cc +++ b/dev/pktfifo.cc @@ -36,6 +36,7 @@ PacketFifo::serialize(const string &base, ostream &os) { paramOut(os, base + ".size", _size); paramOut(os, base + ".maxsize", _maxsize); + paramOut(os, base + ".reserved", _reserved); paramOut(os, base + ".packets", fifo.size()); int i = 0; @@ -54,6 +55,7 @@ PacketFifo::unserialize(const string &base, Checkpoint *cp, { paramIn(cp, section, base + ".size", _size); paramIn(cp, section, base + ".maxsize", _maxsize); + paramIn(cp, section, base + ".reserved", _reserved); int fifosize; paramIn(cp, section, base + ".packets", fifosize); -- cgit v1.2.3