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

Add ability to reconstruct the instruction from mapped json file #14

Open
Kuree opened this issue Apr 14, 2019 · 8 comments
Open

Add ability to reconstruct the instruction from mapped json file #14

Kuree opened this issue Apr 14, 2019 · 8 comments

Comments

@Kuree
Copy link

Kuree commented Apr 14, 2019

Once the application is mapped, there is no way to reconstruct the peak instruction from the mapped json file.

It would be great to add the ability to reconstruct the instruction since consumers other than the the one that generated the json can infer the application data. However, if this kind of behavior is intentional for some reasons, feel free to close the issue. I think I can do some hacks with the debug string.

@rdaly525
Copy link
Owner

The flow that we agreed upon was that the instructions would remain in memory and would not be given to PnR. PnR should not care about the instruction. The debug string is for debug purposes and should not be reconstructed. There is an in-memory map from PE names to peak instruction objects that is passed to garnet.

Perhaps if we want in the future, we can have a direct instruction input to the PE where each PE instance will have a constant value input representing the instruction, but again this should not matter to PnR.

@Kuree
Copy link
Author

Kuree commented Apr 14, 2019 via email

@rdaly525
Copy link
Owner

If we want everything in the mapped json, we should go the other route I proposed which was to basically include the assembled instruction as a constant input to the PE. Then you can disassemble it to recreate the peak instruction.

@rdaly525
Copy link
Owner

PnR will need to know that it should ignore the instruction constant though.

@Kuree
Copy link
Author

Kuree commented Apr 14, 2019

Build on top of your proposal, can we include some "magic" constant in the mapped json? This constant can be read and feed into peak to construct instruction for the simulator. As a result, neither does the simulator nor PnR know what's the functionality of a particular PE instance.

@rdaly525
Copy link
Owner

I think what you are asking for is a disassembler. A disassembler should be able to take in an assembled instruction and return the peak instruction associated with it. Is this correct or are you asking for something else?

@Kuree
Copy link
Author

Kuree commented Apr 14, 2019

I believe so. Is there any support for disassembler in peak/mapper now?

@rdaly525
Copy link
Owner

I know that @cdonovick created a simple disassembler. Not sure exactly what the capabilities are.

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

2 participants