booksim / booksim2

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

Logics here in the code seems wired? #33

Open ziyuezzy opened 1 year ago

ziyuezzy commented 1 year ago

Hi, I am using (modifying) booksim2 for my own research. The logic here in this code block seems to be a bit wired? In file 'trafficmanager.cpp', line 777:

    } else { //normal mode
        result = _injection_process[cl]->test(source) ? 1 : 0;
        _requestsOutstanding[source]++;    ========================> this line!
    } 
    if(result != 0) {

When "_use_read_write!=0" , "_requestsOutstanding" is increased every injection test, this seems wired. I reckon the developer means this:

    } else { //normal mode
        result = _injection_process[cl]->test(source) ? 1 : 0;
        if(result)
             _requestsOutstanding[source]++;    
    } 
    if(result != 0) {

?

hanskasan commented 1 year ago

Hi, I am not the developer but have been using BookSim for a while. I think you are correct - it should not be incremented when no packets are issued. Thanks.