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.
This commit basically implement pipeline follower for PC.
This commit also refactors the original data field in "pipeline_info_t". The previous definition was:
The updated structure is:
typedef struct packed { inst_pc_t inst_pc; // {inst, pc} logic bubble; } pipeline_info_t;
Here,
inst_pc_t
is a new packed type defined as:Following best coding practices, separating modified code from unchanged logic helps maximize code reusability. The PC's follower logic is identical to that for the instruction, while it differs from the bubble field. Therefore, we can reuse the original logic for handling the instruction and apply it to the PC. The only modification required is changing:
xx.inst <= pre_xx_stage.inst
to
xx.inst_pc <= pre_xx_stage.inst_pc
For the instruction follower assertion, we just need to update it from 'xx.inst' to 'xx.inst_pc.inst'.
This can be easily done using the find-and-replace function provided by editors.
close #4