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

Check remaining credits when fencing in Dromajo #742

Open
drichmond opened this issue Jul 27, 2021 · 4 comments
Open

Check remaining credits when fencing in Dromajo #742

drichmond opened this issue Jul 27, 2021 · 4 comments
Assignees

Comments

@drichmond
Copy link
Collaborator

Issue for tracking completion of #721

At the moment, fence just checks if the BP/Dromajo TX fifos are empty and does not check credits. Both checks are required, neither is sufficient for a true fencing.

@sripathi-muralitharan
Copy link
Contributor

I am not sure if this already solves the issue but I do check for credits here -

https://github.com/sripathi-muralitharan/bsg_replicant/blob/3c0ac03e9b9f768eaae98676c791ad0fba98c4de/libraries/platforms/dromajo-vcs/bsg_manycore_platform.cpp#L368-L385

Although, in simulator.cpp, I will have to move the location of the call to update the credits in the Dromajo FIFOs. Basically, move this piece of code to outside the do-while loop -

https://github.com/sripathi-muralitharan/bsg_replicant/blob/3c0ac03e9b9f768eaae98676c791ad0fba98c4de/libraries/platforms/dromajo-vcs/bsg_manycore_simulator.cpp#L409-L411

@drichmond
Copy link
Collaborator Author

Maybe, but I'm still a little confused. I left comments that I think will clear the fence method up.

Can you explain why you need to move that code?

@sripathi-muralitharan
Copy link
Contributor

Because it updates the credits for Dromajo only on packets transmitted to the manycore hardware. In the case of fence, no packets are transmitted to the hardware but the DPI FIFOs are also draining as packets are accepted into the manycore hardware. Therefore, the credits should be updated regardless even of a packet transmission to the manycore hardware or not to get accurate estimates of the credits used by the hardware.

But I think instead of making a call to the function that updates credits in the transmit function, doing it in the eval function makes more sense.

@drichmond
Copy link
Collaborator Author

Ah. Yes, doing it in the eval function sounds like a good idea.

The credits in hardware are updated independently of sending a packet, right?

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

No branches or pull requests

3 participants