Skip to content

[Fix] Decoder uses vtype.vill to decide if instruction is legal - #122

Open
ilmessere wants to merge 1 commit into
pulp-platform:mainfrom
FondazioneChipsIT:dpala/pulp/fix_vtype_vill_valid_req
Open

[Fix] Decoder uses vtype.vill to decide if instruction is legal#122
ilmessere wants to merge 1 commit into
pulp-platform:mainfrom
FondazioneChipsIT:dpala/pulp/fix_vtype_vill_valid_req

Conversation

@ilmessere

Copy link
Copy Markdown

According to the spec, if vill is set, any vector instructions that depends on vtype, must be considered an illegal instructions.
See RISCV unpriv. 30.1.3.4.4. Vector Type Illegal (vill)

In these cases the decoder_rsp_o.instr_illegal remained '0.
This made the spatz_controller set spatz_req_valid, and made it send the request the execution units.
This means that an illegal instruction could generate a valid spatz request, that could result in memory accesses or updates of the register file.

This change will make decoder_rsp_o.instr_illegal=1 for instructions that depend on vtype when vtype_q.vill=1.

This change will make decoder_rsp_o.instr_illegal=1 for instructions
that depend on vtype when vtype_q.vill=1

According to the spec, if vill is set, any vector instructions that depends on vtype,
must be considered an illegal instructions.
(See RISCV unpriv. 30.1.3.4.4. Vector Type Illegal (vill))

In these cases the decoder_rsp_o.instr_illegal remained '0.
This causes spatz_req_valid to be set and the request to be sent to the execution units.
This means that an illegal instruction may generate a valid request that could result
in memory requests or updates of the register file.
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.

1 participant