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

Decoding logic can not resolve instructions truly #111

Closed
togulcan opened this issue Mar 30, 2022 · 1 comment
Closed

Decoding logic can not resolve instructions truly #111

togulcan opened this issue Mar 30, 2022 · 1 comment
Milestone

Comments

@togulcan
Copy link
Contributor

togulcan commented Mar 30, 2022

Hello,

the node::compile and node::resolve mechanism does not work at all for the following pattern of instruction sets:

encoding: OPCODE[a:0] :: R[b:0] :: OPCODE[d:0]:: Imm[e:0];

I believe this is mostly because of the fact that it is AND'ing the masks of the instructions here:
https://github.com/tum-ei-eda/etiss/blob/master/src/Instruction.cpp#L641
This results in the wrong set of masks for the parse tree.

As an example:

LDR_imm_T4 encoding: 0b111110000101 :: n[3:0] :: t[3:0] :: 0b1 :: P[0:0] :: U[0:0] :: W[0:0] :: imm[7:0];
LDR_lit_T2 encoding: 0b11111000 :: U[0:0] :: 0b1011111 :: t[3:0] :: imm[13:2];

where the mask of LDR_immT4 is 11111111111100000000100000000000
and the mask of LDR_lit_T2 is 11111111011111110000000000000000

where the bold bits of LDR_imm_t4 are filtered out due to the mask of the LDR_lit_T2. This results in the wrong compilation of the instruction set and hence the encoded bit arrays can not be resolved into the corresponding instruction set during decoding and giving exceptions. I debugged this, indeed the parse three does not check the 11th and 23rd bits of LDR_immT4.

The exception I am receiving when LDR_imm_T4 is to be resolved is:
ETISS: Fatal Error: etiss::instr::Node::resolve called without a previous valid compilation call.

Thanks

@togulcan togulcan changed the title Decoding logic can not resolve instructions truly bug Decoding logic can not resolve instructions truly Mar 30, 2022
@PhilippvK PhilippvK added this to the Release v0.10 milestone Nov 10, 2022
@wysiwyng
Copy link
Contributor

merged #112

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

No branches or pull requests

3 participants