| gem5
    v21.1.0.2
    | 
#include <token_port.hh>
| Public Member Functions | |
| TokenManager (int init_tokens) | |
| ~TokenManager () | |
| int | getMaxTokenCount () const | 
| Return the maximum possible tokens.  More... | |
| void | recvTokens (int num_tokens) | 
| Increment the number of available tokens by num_tokens.  More... | |
| bool | haveTokens (int num_tokens) | 
| Query is num_tokens tokens are available.  More... | |
| void | acquireTokens (int num_tokens) | 
| Decrement the number of available tokens by num_tokens.  More... | |
| Protected Attributes | |
| int | maxTokens | 
| int | availableTokens | 
Definition at line 132 of file token_port.hh.
| gem5::TokenManager::TokenManager | ( | int | init_tokens | ) | 
Definition at line 144 of file token_port.cc.
References availableTokens, and maxTokens.
| 
 | inline | 
Definition at line 143 of file token_port.hh.
| void gem5::TokenManager::acquireTokens | ( | int | num_tokens | ) | 
Decrement the number of available tokens by num_tokens.
Definition at line 175 of file token_port.cc.
References availableTokens, DPRINTF, haveTokens(), and panic_if.
Referenced by gem5::TokenRequestPort::acquireTokens().
| int gem5::TokenManager::getMaxTokenCount | ( | ) | const | 
Return the maximum possible tokens.
Definition at line 151 of file token_port.cc.
References maxTokens.
| bool gem5::TokenManager::haveTokens | ( | int | num_tokens | ) | 
Query is num_tokens tokens are available.
Definition at line 169 of file token_port.cc.
References availableTokens.
Referenced by acquireTokens(), and gem5::TokenRequestPort::haveTokens().
| void gem5::TokenManager::recvTokens | ( | int | num_tokens | ) | 
Increment the number of available tokens by num_tokens.
Definition at line 157 of file token_port.cc.
References availableTokens, DPRINTF, maxTokens, and panic_if.
Referenced by gem5::LocalMemPipeline::exec(), gem5::GlobalMemPipeline::exec(), gem5::Wavefront::exec(), and gem5::TokenRequestPort::recvTokens().
| 
 | protected | 
Definition at line 139 of file token_port.hh.
Referenced by acquireTokens(), haveTokens(), recvTokens(), and TokenManager().
| 
 | protected | 
Definition at line 136 of file token_port.hh.
Referenced by getMaxTokenCount(), recvTokens(), and TokenManager().