booksim / booksim2

BookSim 2.0
http://nocs.stanford.edu/booksim.html
Other
255 stars 158 forks source link

Assertion for non-negative time fails for certain router delay parameters #34

Open kartiklakhotia opened 1 year ago

kartiklakhotia commented 1 year ago

Setting vc_alloc_delay to 10 in the examples/dragonflyconfig file results in failed assertion:

booksim: routers/iq_router.cpp:783: void IQRouter::_VCAllocEvaluate(): Assertion `time >= 0' failed. Aborted

This assertion is in VCAllocEvaluate() function in iq_router.cpp. The loop that checks this assertion iterates over all entries in vc_alloc_vcs dequeue. Lets call this loop L1. There is another loop before L1 that iterates over vc_alloc_vcs and sets this timestamp. However, if the timestamp for first entry is non-negative, this loop breaks. Thus, when we enter L1, the first entry in vc_alloc_vcs is guaranteed to have non-negative time but others are not, resulting in this assertion fail.