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
Verilog::Preproc misdocuments def_exists instead of def_params #1658
Comments
Original Redmine Comment Looking more through the code. defExists calls defParams (Preproc.xs line 134) which calls def_params (Preproc.xs line 139). I think the fix is either
OR ideally
|
Original Redmine Comment Hi, thanks for your report. I prefer to keep it backward compatible, so I've committed fixing this as a documentation change, removing def_exists and documenting def_params. Note this also matches up as def_params calls the option handler's defparam. |
Original Redmine Comment Wilson Snyder wrote:
Ok, thanks for the fix. I just noticed you made the changes. However, def_params is slightly different from def_exists. The docs should read like this:
|
Original Redmine Comment Thanks for the rewording, pushed to git. |
Author Name: Topa Tota
Original Redmine Issue: 1658 from https://www.veripool.org
Original Assignee: Wilson Snyder (@wsnyder)
In the package Verilog::Preproc, the callback def_exists doesn't get called at all (at least I haven't found any situation where it gets called). I believe when Verilog:Preproc finds
ifdef,
ifndef, and `elsif, it should call def_exists. However, it is calling def_params instead. Below is an example:The reason I think it should call def_exists is because in file VPreProc.cpp lines 829 and 845 (Module version: 3.470), m_preprocp->defExists is called when the state is ps_DEFNAME_IFDEF, ps_DEFNAME_IFNDEF, or ps_DEFNAME_ELSIF. I also think checking a token is defined should call both def_exists (VPreProc.cpp line 794) and def_params (VPreProc.cpp line 1186). It only calls def_params.
Also, def_params is an undocumented callback in the docs.
The text was updated successfully, but these errors were encountered: