|
The Sparta Modeling Framework
|
A ScoreboardView is a view into the master Scoreboard for operand readiness. More...
#include <Scoreboard.hpp>
Public Types | |
| using | ReadinessCallback = std::function<void(const Scoreboard::RegisterBitMask&)> |
| Typedef for the callbacks. | |
Public Member Functions | |
| ScoreboardView (const std::string &unit_name, const std::string &scoreboard_type, sparta::TreeNode *node) | |
| Create a ScoreboardView. | |
| void | registerReadyCallback (const Scoreboard::RegisterBitMask &bits, const Scoreboard::InstID inst_id, const ReadinessCallback &callback) |
| Register a ready callback to be called when the bits are ready. | |
| void | clearCallbacks (const Scoreboard::InstID inst_id) |
| On a flush any registered callback needs to be "forgotten". | |
| bool | isSet (const Scoreboard::RegisterBitMask &bits) const |
| See if the given bits are set. | |
| void | setReady (const Scoreboard::RegisterBitMask &bits) |
| Set the given bits as ready in the Scoreboard. | |
| std::string | getType () const |
| Get the scoreboard type identifier. | |
| std::string | getName () const |
| Get the name of this view. | |
A ScoreboardView is a view into the master Scoreboard for operand readiness.
Used by the Schedulers/Execution units, the view represents that Scheduler/Execution unit's view into readiness of a rename in the machine.
Definition at line 193 of file Scoreboard.hpp.
| using sparta::ScoreboardView::ReadinessCallback = std::function<void(const Scoreboard::RegisterBitMask&)> |
Typedef for the callbacks.
Definition at line 197 of file Scoreboard.hpp.
| sparta::ScoreboardView::ScoreboardView | ( | const std::string & | unit_name, |
| const std::string & | scoreboard_type, | ||
| sparta::TreeNode * | node ) |
Create a ScoreboardView.
| unit_name | The unit name that's creating/receiving SB updates |
| scoreboard_type | The type of master Scoreboard to connect to |
| The | sparta::TreeNode to search for the scoreboard_type |
| void sparta::ScoreboardView::clearCallbacks | ( | const Scoreboard::InstID | inst_id | ) |
On a flush any registered callback needs to be "forgotten".
| unique_id | The unique ID to find and flush |
Clears ready callbacks
|
inline |
|
inline |
Get the scoreboard type identifier.
Definition at line 257 of file Scoreboard.hpp.
|
inline |
See if the given bits are set.
| bits | Bits to check |
Definition at line 242 of file Scoreboard.hpp.
| void sparta::ScoreboardView::registerReadyCallback | ( | const Scoreboard::RegisterBitMask & | bits, |
| const Scoreboard::InstID | inst_id, | ||
| const ReadinessCallback & | callback ) |
Register a ready callback to be called when the bits are ready.
| bits | RegisterBitMask of bits to masked to determine ready |
| callback | The handler to call; boolean argument + bits being set |
Expected callback signature:
void func(const Scoreboard::RegisterBitMask & bits);
After a scoreboard update and the new bits are a match for the registered bits, the callback will be called and cleared from the Scoreboard.
| void sparta::ScoreboardView::setReady | ( | const Scoreboard::RegisterBitMask & | bits | ) |
Set the given bits as ready in the Scoreboard.
| bits | Bits to propagate |