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

(System)Verilog parallel_case attribute is not supported #185

Open
KatCe opened this issue Oct 17, 2023 · 1 comment
Open

(System)Verilog parallel_case attribute is not supported #185

KatCe opened this issue Oct 17, 2023 · 1 comment

Comments

@KatCe
Copy link

KatCe commented Oct 17, 2023

Hello.

hdlConvertor does not support the parallel_case attribute. An example can be found here: https://github.com/KatCe/hdlConvertor_issue_185

Using the python script in the repo I tried all 3 language settings mentioned and saved the ast as text files (ast_v.txt: Language.VERILOG, ast_v2005.txt: Language.VERILOG_2005, ast_sv2017.txt: Language.SYSTEM_VERILOG_2017).

The parallel_case attribute was not understood by hdlConvertor. Error output:

python3 ast_to_json.py > ast_v.txt
./picorv32_sv2v_out.v:276:2: AttributeParser.visitAttribute_instance Conversion to Python object not implemented
    ...(*parallel_case*)...
./picorv32_sv2v_out.v:331:2: AttributeParser.visitAttribute_instance Conversion to Python object not implemented
    ...(*full_case*)...
./picorv32_sv2v_out.v:1017:3: AttributeParser.visitAttribute_instance Conversion to Python object not implemented
    ...(*parallel_case*)...
./picorv32_sv2v_out.v:1139:2: AttributeParser.visitAttribute_instance Conversion to Python object not implemented
    ...(*parallel_case,full_case*)...
./picorv32_sv2v_out.v:1149:2: AttributeParser.visitAttribute_instance Conversion to Python object not implemented
    ...(*parallel_case,full_case*)...
./picorv32_sv2v_out.v:1178:3: AttributeParser.visitAttribute_instance Conversion to Python object not implemented
    ...(*parallel_case*)...
./picorv32_sv2v_out.v:1289:3: AttributeParser.visitAttribute_instance Conversion to Python object not implemented
    ...(*parallel_case,full_case*)...
./picorv32_sv2v_out.v:1296:5: AttributeParser.visitAttribute_instance Conversion to Python object not implemented
    ...(*parallel_case*)...
./picorv32_sv2v_out.v:1372:5: AttributeParser.visitAttribute_instance Conversion to Python object not implemented
    ...(*parallel_case*)...
./picorv32_sv2v_out.v:1412:7: AttributeParser.visitAttribute_instance Conversion to Python object not implemented
    ...(*parallel_case,full_case*)...
./picorv32_sv2v_out.v:1506:8: AttributeParser.visitAttribute_instance Conversion to Python object not implemented
    ...(*parallel_case*)...
./picorv32_sv2v_out.v:1534:5: AttributeParser.visitAttribute_instance Conversion to Python object not implemented
    ...(*parallel_case*)...
./picorv32_sv2v_out.v:1603:6: AttributeParser.visitAttribute_instance Conversion to Python object not implemented
    ...(*parallel_case,full_case*)...
./picorv32_sv2v_out.v:1612:6: AttributeParser.visitAttribute_instance Conversion to Python object not implemented
    ...(*parallel_case,full_case*)...
./picorv32_sv2v_out.v:1626:7: AttributeParser.visitAttribute_instance Conversion to Python object not implemented
    ...(*parallel_case,full_case*)...
./picorv32_sv2v_out.v:1650:7: AttributeParser.visitAttribute_instance Conversion to Python object not implemented
    ...(*parallel_case,full_case*)...
./picorv32_sv2v_out.v:1667:7: AttributeParser.visitAttribute_instance Conversion to Python object not implemented
    ...(*parallel_case,full_case*)...

The parallel_case in line 1139/1140 of picorv32_sv2v_out.v is a good example where the case statement without attribute has a different semantic than with it, so the attribute should not be dropped. Corresponding line in ast_v.txt:31946.

@Nic30
Copy link
Owner

Nic30 commented Oct 23, 2023

should be fixed in 2800920

@KatCe , do you think you would be able to find some minimal examples with SV attributes? Now I have to make a test suite for this functionality and there are many places where attribute can appear. I was wondering if you know about where are examples of this feature (other than SV specification).

Also, what are you using hdlConvertor for?

Last week I was talking with qarlosalberto about some not yet public projects. I am going to publish some projects which are using hdlConvertor to analyze hierarchy and file dependencies. (+- this weekend)
There are several other project like this, focused mainly on circuit visualization but it takes an effort to make them public. So, if you describe what are interested in, there is a probability that I will be able to share something useful for you.

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