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

Updated cycle counts in the pipeline chapter. #942

Conversation

silabs-oysteink
Copy link
Contributor

No description provided.

Signed-off-by: Oystein Knauserud <Oystein.Knauserud@silabs.com>
@silabs-oysteink silabs-oysteink added the Component:Doc For issues in the Documentation (e.g. for User Manual, README.md files) label Sep 8, 2023
@@ -87,11 +83,25 @@ and zero stall on the data-side memory interface.
| | 4 (target is a non-word-aligned | EX stage and will cause a flush of the IF stage (including |
| | non-RVC instruction) | prefetch buffer) and ID stage. |
+-----------------------+--------------------------------------+-------------------------------------------------------------+
| Instruction Fence | 5 | The FENCE.I instruction as defined in 'Zifencei' of the |
| Instruction Fence | 5 | The FENCE[.I] instructions are defined in 'Zifencei' of the |
Copy link
Contributor

Choose a reason for hiding this comment

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

I assume that FENCE[.I] in the right most column is supposed to cover both fence and fence.i. If so, just add a separate row for the fence instruction as it is not part of Zifencei as implied now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

+-----------------------+--------------------------------------+-------------------------------------------------------------+
| Zba, Zbb, Zbc, Zbs | 1 | All instructions from Zba, Zbb, Zbc, Zbs take 1 cycle. |
+-----------------------+--------------------------------------+-------------------------------------------------------------+
| Zcmt | 2 | Tablejumps take 2 cycles. |
Copy link
Contributor

Choose a reason for hiding this comment

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

Tablejumps -> Table jumps

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

+-----------------------+--------------------------------------+-------------------------------------------------------------+
| Zcmt | 2 | Tablejumps take 2 cycles. |
+-----------------------+--------------------------------------+-------------------------------------------------------------+
| Zcmp | 2 - 18 | The number of cycles depend on the number of registers |
Copy link
Contributor

Choose a reason for hiding this comment

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

depend -> depends

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

| Zcmp | 2 - 18 | The number of cycles depend on the number of registers |
| | | saved or restored by the instructions. |
+-----------------------+--------------------------------------+-------------------------------------------------------------+
| Zca, Zcb | 1 | Instructions from Zca and Zcv take 1 cycle. |
Copy link
Contributor

Choose a reason for hiding this comment

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

Zcv -> Zcb

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

+-----------------------+--------------------------------------+-------------------------------------------------------------+
| Zca, Zcb | 1 | Instructions from Zca and Zcv take 1 cycle. |
+-----------------------+--------------------------------------+-------------------------------------------------------------+
| WFI, WFE | 1 - | Instructions causing sleep will not retire until wakeup. |
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it really 1 - or is it for example 2 - ? Under what scenario can '1' happen?

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 should indeed be 2 -, unless we also specify behavior under debug mode which would simply be '1'. Not including debug mode for now.

@@ -100,7 +110,16 @@ The |corev| experiences a 1 cycle penalty on the following hazards.

* Load data hazard (in case the instruction immediately following a load uses the result of that load)
* Jump register (jalr) data hazard (in case that a jalr depends on the result of an immediately preceding non-load instruction)
* Any implicit CSR read in ID (mret or table jump) while any implicit or explicit CSR access is in the WB stage
Copy link
Contributor

Choose a reason for hiding this comment

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

Any implicit CSR read -> An instruction causing an implicit CSR read
any implicit or explicit CSR access -> a CSR access instruction or an instruction causing an implicit CSR access

Same type of conversion for following lines

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated

@@ -100,7 +110,16 @@ The |corev| experiences a 1 cycle penalty on the following hazards.

* Load data hazard (in case the instruction immediately following a load uses the result of that load)
* Jump register (jalr) data hazard (in case that a jalr depends on the result of an immediately preceding non-load instruction)
* Any implicit CSR read in ID (mret or table jump) while any implicit or explicit CSR access is in the WB stage
Copy link
Contributor

Choose a reason for hiding this comment

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

I know we don't do it consistently, but try to highlight instruction like jalr by quoting them as jalr now that you are editing this file anyway

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

* Any implicit CSR read in ID (mret or table jump) while any implicit or explicit CSR access is in the EX stage

.. note::
Implicit CSR reads are reads performed by non-CSR instructions or CSR instructions reading multiple CSR values.
Copy link
Contributor

Choose a reason for hiding this comment

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

multiple CSR values -> reading CSR values from another CSR

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

Signed-off-by: Oystein Knauserud <Oystein.Knauserud@silabs.com>
@Silabs-ArjanB Silabs-ArjanB merged commit dc275be into openhwgroup:master Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component:Doc For issues in the Documentation (e.g. for User Manual, README.md files)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants