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

Issue with the reverse_endianness() function #884

Open
fahadausaf opened this issue Jan 15, 2025 · 2 comments
Open

Issue with the reverse_endianness() function #884

fahadausaf opened this issue Jan 15, 2025 · 2 comments

Comments

@fahadausaf
Copy link

fahadausaf commented Jan 15, 2025

I am trying to compile Arm LDADDB instruction to SystemVerilog. I am facing an issue with the reverse_endianness() function which is not very descriptive.

This issue only occurs when I generate and save the System Verilog code using -sv_output_dir {path to directory}. This issue does not occur when I use just -sv, -c or -type_check directive

image

My understanding is when we concatenate 8-bits with 120-bits, or when we concatenate the last two sets of 8-bits of a 128-bit stream, it breaks

I tried applying some patches for undefined variables and optimizing the code. Then I get another error which looks exactly the same

image

Here is the description of the code files used

• Decode.sail – contains the decode block
• Execute.sail – Contains the execute block
• Main.sail – Contains the testbench
• v8_base.sail – contains over 20k lines of code extracted from Arm original v8_base library. It contains the chain of functions which is required to run LDADDB instruction.

decode.txt
execute.txt
main.txt

@fahadausaf
Copy link
Author

The same issue arises when I tried to convert STR(register) instruction to SystemVerilog

@Alasdair
Copy link
Collaborator

Are you using the released version of Sail, or building from the current source? This case should be implemented here

| CT_fbits n, CT_fbits m, CT_lbits ->
so I'm not sure what's going on.

Probably you want to figure out what code path is leading to a 128-bit endianness reversal for an instruction like LDADDB, and statically remove it, because it it's probably for some weird case like 128-but PTEs for big endian Arm.

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

2 participants