Skip to content

Comments

Max instruction counting / verifying#72

Merged
dihm merged 14 commits intoQTC-UMD:mainfrom
Json-To-String:instruction_counting
Apr 9, 2025
Merged

Max instruction counting / verifying#72
dihm merged 14 commits intoQTC-UMD:mainfrom
Json-To-String:instruction_counting

Conversation

@Json-To-String
Copy link
Collaborator

@Json-To-String Json-To-String commented Mar 31, 2025

Attempting to tackle #71

When trying to lower the MAX_SIZE variable to deal with the differences between the amount of instructions that would fit in memory vs the amount that would actually trigger, I think I got lucky on that fixing things for one mode in particular. I suspect that the disagreement comes from byte (mis)alignment since some of our instructions aren't even lengths. Although I suppose that wouldn't necessarily explain single stepping, since each instruction is 14 bytes (but still not a power of 2).

uint SIZE_EACH_INS[] = {14, 28, 29, 27, 36, 36, 36};

If this is the reason why, we could maybe fix this with adding padding bytes to the instructions? But this seems pretty cumbersome and maybe not worth the hassle.

Regardless, the instruction-counting.ipynb notebook shows at least why each instruction count ballparks to a particular value, and instruction-tests.ipynb allows us to search for the exact number. I started to write a semi-automated test for that but that also seemed like a rabbit hole. If necessary, I can generalize that.

Copy link
Contributor

@dihm dihm left a comment

Choose a reason for hiding this comment

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

Little bit of tidying up, but otherwise this looks good.

@dihm dihm linked an issue Apr 9, 2025 that may be closed by this pull request
Copy link
Contributor

@dihm dihm left a comment

Choose a reason for hiding this comment

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

LGTM

@dihm dihm merged commit e168bf5 into QTC-UMD:main Apr 9, 2025
2 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.

Confirm max instruction counts for the modes

2 participants