Skip to content

[rtl] Minor tweak to decoder to avoid dead code#2269

Merged
andreaskurth merged 1 commit intolowRISC:masterfrom
rswarbrick:decoder-dead-code
Apr 25, 2025
Merged

[rtl] Minor tweak to decoder to avoid dead code#2269
andreaskurth merged 1 commit intolowRISC:masterfrom
rswarbrick:decoder-dead-code

Conversation

@rswarbrick
Copy link
Contributor

The "else" part of the if/else check here wasn't possible because the surrounding else branch (starting at line 406) is already in the case where instr[26] is zero.

Fixes #2268.

The "else" part of the if/else check here wasn't possible because the
surrounding else branch (starting at line 406) is already in the case
where instr[26] is zero.
@rswarbrick rswarbrick added the Component:RTL RTL issue label Apr 23, 2025
Copy link
Contributor

@marnovandermaas marnovandermaas left a comment

Choose a reason for hiding this comment

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

This makes sense to me. Is it worth plopping an assertion that instr[26] must be zero if the code gets here?

@rswarbrick
Copy link
Contributor Author

I don't think so, since it's visible "syntactically". And we don't really have procedural assertions in our RTL code, I don't think. And I don't think I know a clever way to fake it for this sort of thing?

Copy link
Contributor

@andreaskurth andreaskurth left a comment

Choose a reason for hiding this comment

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

LGTM, thx @rswarbrick

@andreaskurth andreaskurth added this pull request to the merge queue Apr 25, 2025
Merged via the queue into lowRISC:master with commit 0199c03 Apr 25, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component:RTL RTL issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug][ibex_decoder] Report a bug in Ibex

3 participants

Comments