-
-
Notifications
You must be signed in to change notification settings - Fork 55
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
function parameter not correctly parsed #60
Comments
@CaulyKan We need a bit more information here:
FWIW those fragments look good to me. |
Hi, thanks for the reply. full testcase:
use the 2017 standards defines that:
Where data_type_or_implicit and port_identifier can both be inferred to empty. So However, from grammar's point of view, it seems more sensible that Not sure if this is an issue of sv-parser, or this work should be done in back-end. |
You're right, this is confusing. @vasilissoti and I have seen a similar issue in svdata. I think this needs to be handled further downstream because sv-parser adheres closely to the BNF. In my opinion, this is an issue with IEEE1800-2017, but there's not much to be done about that here. |
I also believe that the issue is related with IEEE1800-2017 and more specifically due to the lack of clarity in section 23.2.2.3 Since port b does not include an explicit direction, data kind, data type, signing or packed dimension declaration, all this information can be inherited/inferred from the previous port i.e. a (since b is not the first port). SvData utilises a function which returns a bool on whether a "full" inheritance should be made. If true, SvData only searches for the port identifier and unpacked dimensions (if any). |
Consider following verilog:
the parse_sv gives following result for port b:
The text was updated successfully, but these errors were encountered: