-
Notifications
You must be signed in to change notification settings - Fork 11
proposals: Add Errata the Machine Reference #21
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
Open
ChenMiaoi
wants to merge
2
commits into
openrisc:master
Choose a base branch
from
ChenMiaoi:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,157 @@ | ||
--- | ||
layout: proposal | ||
title: Errata for the l.nop instruction in the Machine Reference (P362) | ||
category: r1.4 | ||
date: 2025-05-14 16:00 | ||
author: Chen Miao | ||
--- | ||
|
||
Section `18. Machine Reference` displays the format of all instructions, | ||
but there is an error in the presentation of the instruction: | ||
|
||
1. *the OPC for l.nop should be 0x15 instead of 0x05*. | ||
2. *the OPC for l.sys should be 0x2000 instead of 0x08*. | ||
3. *the OPC for l.trap should be 0x2100 instead of 0x08*. | ||
3. *the OPC for l.msync should be 0x22000000 instead of 0x08*. | ||
3. *the OPC for l.psync should be 0x22800000 instead of 0x08*. | ||
3. *the OPC for l.csync should be 0x23000000 instead of 0x08*. | ||
3. *the OPC for l.sfeqi should be 0x5e0 instead of 0x2F*. | ||
3. *the OPC for l.sfnei should be 0x5e1 instead of 0x2F*. | ||
3. *the OPC for l.sfgtui should be 0x5e2 instead of 0x2F*. | ||
3. *the OPC for l.sfgeui should be 0x5e3 instead of 0x2F*. | ||
3. *the OPC for l.sfltui should be 0x5e4 instead of 0x2F*. | ||
3. *the OPC for l.sfleui should be 0x5e5 instead of 0x2F*. | ||
3. *the OPC for l.sfgtsi should be 0x5ea instead of 0x2F*. | ||
3. *the OPC for l.sfgesi should be 0x5eb instead of 0x2F*. | ||
3. *the OPC for l.sfltsi should be 0x5ec instead of 0x2F*. | ||
3. *the OPC for l.sflesi should be 0x5ed instead of 0x2F*. | ||
3. *the OPC for l.sfeq should be 0x720 instead of 0x39*. | ||
3. *the OPC for l.sfne should be 0x721 instead of 0x39*. | ||
3. *the OPC for l.sfgtu should be 0x722 instead of 0x39*. | ||
3. *the OPC for l.sfgeu should be 0x723 instead of 0x39*. | ||
3. *the OPC for l.sfltu should be 0x724 instead of 0x39*. | ||
3. *the OPC for l.sfleu should be 0x725 instead of 0x39*. | ||
3. *the OPC for l.sfgts should be 0x72a instead of 0x39*. | ||
3. *the OPC for l.sfges should be 0x72b instead of 0x39*. | ||
3. *the OPC for l.sflts should be 0x72c instead of 0x39*. | ||
3. *the OPC for l.sfles should be 0x72d instead of 0x39*. | ||
|
||
## Changes | ||
|
||
``` | ||
+-------------------------------------------------------+ | ||
| OPC | Instruction | Mnemonic | | ||
+-------------------------------------------------------+ | ||
| 0x05 | 00010101--------KKKKKKKKKKKKKKKK | l.nop | | ||
+-------------------------------------------------------+ | ||
| 0x08 | 0010000000000000KKKKKKKKKKKKKKKK | l.sys | | ||
+-------------------------------------------------------+ | ||
| 0x08 | 0010000100000000KKKKKKKKKKKKKKKK | l.trap | | ||
+-------------------------------------------------------+ | ||
| 0x08 | 00100010000000000000000000000000 | l.msync | | ||
+-------------------------------------------------------+ | ||
| 0x08 | 00100010100000000000000000000000 | l.psync | | ||
+-------------------------------------------------------+ | ||
| 0x08 | 00100011000000000000000000000000 | l.csync | | ||
+-------------------------------------------------------+ | ||
| 0x2F | 10111100000AAAAAIIIIIIIIIIIIIIII | l.sfeqi | | ||
+-------------------------------------------------------+ | ||
| 0x2F | 10111100001AAAAAIIIIIIIIIIIIIIII | l.sfnei | | ||
+-------------------------------------------------------+ | ||
| 0x2F | 10111100010AAAAAIIIIIIIIIIIIIIII | l.sfgtui | | ||
+-------------------------------------------------------+ | ||
| 0x2F | 10111100011AAAAAIIIIIIIIIIIIIIII | l.sfgeui | | ||
+-------------------------------------------------------+ | ||
| 0x2F | 10111100100AAAAAIIIIIIIIIIIIIIII | l.sfltui | | ||
+-------------------------------------------------------+ | ||
| 0x2F | 10111100101AAAAAIIIIIIIIIIIIIIII | l.sfleui | | ||
+-------------------------------------------------------+ | ||
| 0x2F | 10111101010AAAAAIIIIIIIIIIIIIIII | l.sfgtsi | | ||
+-------------------------------------------------------+ | ||
| 0x2F | 10111101011AAAAAIIIIIIIIIIIIIIII | l.sfgesi | | ||
+-------------------------------------------------------+ | ||
| 0x2F | 10111101100AAAAAIIIIIIIIIIIIIIII | l.sfltsi | | ||
+-------------------------------------------------------+ | ||
| 0x2F | 10111101101AAAAAIIIIIIIIIIIIIIII | l.sflesi | | ||
+-------------------------------------------------------+ | ||
| 0x39 | 11100100000AAAAABBBBB----------- | l.sfeq | | ||
+-------------------------------------------------------+ | ||
| 0x39 | 11100100001AAAAABBBBB----------- | l.sfne | | ||
+-------------------------------------------------------+ | ||
| 0x39 | 11100100010AAAAABBBBB----------- | l.sfgtu | | ||
+-------------------------------------------------------+ | ||
| 0x39 | 11100100011AAAAABBBBB----------- | l.sfgeu | | ||
+-------------------------------------------------------+ | ||
| 0x39 | 11100100100AAAAABBBBB----------- | l.sfltu | | ||
+-------------------------------------------------------+ | ||
| 0x39 | 11100100101AAAAABBBBB----------- | l.sfleu | | ||
+-------------------------------------------------------+ | ||
| 0x39 | 11100101010AAAAABBBBB----------- | l.sfgts | | ||
+-------------------------------------------------------+ | ||
| 0x39 | 11100101011AAAAABBBBB----------- | l.sfges | | ||
+-------------------------------------------------------+ | ||
| 0x39 | 11100101100AAAAABBBBB----------- | l.sflts | | ||
+-------------------------------------------------------+ | ||
| 0x39 | 11100101101AAAAABBBBB----------- | l.sfles | | ||
+-------------------------------------------------------+ | ||
``` | ||
|
||
## To | ||
|
||
``` | ||
+-------------------------------------------------------------+ | ||
| OPC | Instruction | Mnemonic | | ||
+-------------------------------------------------------------+ | ||
| 0x15 | 00010101--------KKKKKKKKKKKKKKKK | l.nop | | ||
+-------------------------------------------------------------+ | ||
| 0x2000 | 0010000000000000KKKKKKKKKKKKKKKK | l.sys | | ||
+-------------------------------------------------------------+ | ||
| 0x2100 | 0010000100000000KKKKKKKKKKKKKKKK | l.trap | | ||
+-------------------------------------------------------------+ | ||
| 0x22000000 | 00100010000000000000000000000000 | l.msync | | ||
+-------------------------------------------------------------+ | ||
| 0x22800000 | 00100010100000000000000000000000 | l.psync | | ||
+-------------------------------------------------------------+ | ||
| 0x23000000 | 00100011000000000000000000000000 | l.csync | | ||
+-------------------------------------------------------------+ | ||
| 0x5e0 | 10111100000AAAAAIIIIIIIIIIIIIIII | l.sfeqi | | ||
+-------------------------------------------------------------+ | ||
| 0x5e1 | 10111100001AAAAAIIIIIIIIIIIIIIII | l.sfnei | | ||
+-------------------------------------------------------------+ | ||
| 0x5e2 | 10111100010AAAAAIIIIIIIIIIIIIIII | l.sfgtui | | ||
+-------------------------------------------------------------+ | ||
| 0x5e3 | 10111100011AAAAAIIIIIIIIIIIIIIII | l.sfgeui | | ||
+-------------------------------------------------------------+ | ||
| 0x5e4 | 10111100100AAAAAIIIIIIIIIIIIIIII | l.sfltui | | ||
+-------------------------------------------------------------+ | ||
| 0x5e5 | 10111100101AAAAAIIIIIIIIIIIIIIII | l.sfleui | | ||
+-------------------------------------------------------------+ | ||
| 0x5ea | 10111101010AAAAAIIIIIIIIIIIIIIII | l.sfgtsi | | ||
+-------------------------------------------------------------+ | ||
| 0x5eb | 10111101011AAAAAIIIIIIIIIIIIIIII | l.sfgesi | | ||
+-------------------------------------------------------------+ | ||
| 0x5ec | 10111101100AAAAAIIIIIIIIIIIIIIII | l.sfltsi | | ||
+-------------------------------------------------------------+ | ||
| 0x5ed | 10111101101AAAAAIIIIIIIIIIIIIIII | l.sflesi | | ||
+-------------------------------------------------------------+ | ||
| 0x720 | 11100100000AAAAABBBBB----------- | l.sfeq | | ||
+-------------------------------------------------------------+ | ||
| 0x721 | 11100100001AAAAABBBBB----------- | l.sfne | | ||
+-------------------------------------------------------------+ | ||
| 0x722 | 11100100010AAAAABBBBB----------- | l.sfgtu | | ||
+-------------------------------------------------------------+ | ||
| 0x723 | 11100100011AAAAABBBBB----------- | l.sfgeu | | ||
+-------------------------------------------------------------+ | ||
| 0x724 | 11100100100AAAAABBBBB----------- | l.sfltu | | ||
+-------------------------------------------------------------+ | ||
| 0x725 | 11100100101AAAAABBBBB----------- | l.sfleu | | ||
+-------------------------------------------------------------+ | ||
| 0x72a | 11100101010AAAAABBBBB----------- | l.sfgts | | ||
+-------------------------------------------------------------+ | ||
| 0x72b | 11100101011AAAAABBBBB----------- | l.sfges | | ||
+-------------------------------------------------------------+ | ||
| 0x72c | 11100101100AAAAABBBBB----------- | l.sflts | | ||
+-------------------------------------------------------------+ | ||
| 0x72d | 11100101101AAAAABBBBB----------- | l.sfles | | ||
+-------------------------------------------------------------+ | ||
``` |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I think this and the rest are right, the OPC in the machine code reference is just considering the first 5 bits of the machine instruction.
So for l.nop first 6-bits is 0b000101. which is 0x05. This is the same for all others.
In the instruction definitions section the l.nop opcode mentioned is 8-bits. But for other instructions iit may be more.
Perhaps for this errata we can just add a code to the "Machine Code Reference" that the OPC column only represents the first 6-bits of the opcode.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, if you add the code to represent the first 6-bits of opcode, there are no more questions.