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

Option --sv-no-strings can cause invalid code to be generated #874

Open
lexbailey opened this issue Jan 13, 2025 · 0 comments
Open

Option --sv-no-strings can cause invalid code to be generated #874

lexbailey opened this issue Jan 13, 2025 · 0 comments

Comments

@lexbailey
Copy link
Contributor

Consider this function, generated from src/sail_sv_backend/generate_primop2.ml:

function automatic sail_unit sail_dec_str_zz5i(logic [127:0] i);
    sail_unit s;
    s.itoa(i);
    return s;
endfunction

s does not have the type string, because of the --sv-no-strings option.
that means that s.itoa is not valid, since that's not defined for the sail_unit type.

Looks to be isolated just to the primops generated in this file.
This and similar functions should probably all just become stubs that return SAIL_UNIT if --sv-no-strings is set?

I can throw together a pull request for this, if that is the problem/solution

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

1 participant