Skip Nav
Home » Forums » SystemC Forum

Icon - KMLM List KMLM List

View email archives for the history of this mailing list.

List Home All Archives Dates Threads Authors Subjects
systemc-forum - [Systemc-forum] tlm_fifo :: shrink -- Unexpected Results? Message Thread: Previous | Next
  • To: <systemc-forum@xxxxxxxxxxx>
  • From: "Refice, Justin A" <Justin.Refice@xxxxxxxxxx>
  • Date: Tue, 17 May 2005 11:23:11 -0400
Send Email to systemc-forum@osci.kavi.com:
Send new message
Reply to this message
I've built a model which consists of a 16-deep fifo of sc_biguint<X>.

Depending on a few things, I can create a "packet" from 1-6 of these
biguints.  So, in order to try and make this particular piece of our
Abstract Model close to RTL functionality, I used a while loop like so:

// Psuedo code

int ctr = 0;
while (last_big) {
  fifo.get(big[ctr], tlm::SHRINK);
}
fifo.nb_notify_got(tlm::UNSHRINK);

It was my impression that, since a SHRINK consumes, but doesn't notify,
basically the code would work like this:

1)  biguint generator generates a 5 biguint packet, but only loads in 3
biguints, and holds on the last two.

2) My model goes through the while loop above, and once the 3 biguints
are taken, the get() should wait until more data is available.

However, in reality, this happens:

1)  Identical to the previous

2) My model goes through the while loop above, and once the 3 biguints
are taken, the get() starts returning the empty data from the other 13
spots in the fifo.

Now, looking at the source code to tlm_fifo (and tlm_fifo_shrink, etc)
it's obvious as to WHY this is happening.  What I want to know is,
SHOULD it be happening?

And one more little question, why was there no blocking tlm::UNSHRINK
implemented?  

Thanks in advance,

-Justin R.



By Date: Previous | Next Current Thread By Thread: Previous | Next


  Mail converted by the most-excellent MHonArc 2.6.10