Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added NoC flit traffic trace support #20

Merged
merged 1 commit into from
Nov 17, 2023

Conversation

ueqri
Copy link
Contributor

@ueqri ueqri commented Nov 16, 2023

The flits on the fly (i.e., traversing router-to-router links) are traced for visualization and further analysis.

The MLP example at commit 285822f works fine, and the traced data looks as expected.

But more work is still needed in this PR to enable automation (e.g., the newly uploaded rad-sim/sim/sanitize_flit_traces.py should be more general).


protected:
int _delay;
T * _input;
T * _output;
queue<pair<int, T *> > _wait_queue;
deque<pair<int, T *> > _wait_queue;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We changed queue to deque in order to iterate the _wait_queue for tracing the on-the-fly flits, given that queue is not iterable. And there will be no performance effects resulting from this change, since deque is the underlying container used by the queue by default.

int src_router_id = (src_router != nullptr) ? src_router->GetID() : -1;
int sink_router_id = (sink_router != nullptr) ? sink_router->GetID() : -1;
for (const auto & d : _wait_queue) {
os << sim_time << ", " << src_router_id << ", " << sink_router_id << ", "
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is a little tricky here. There may be a better solution for capturing the data inside the BookSim codebase.

@andrewboutros andrewboutros merged commit 156bcb4 into andrewboutros:main Nov 17, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants