-
Notifications
You must be signed in to change notification settings - Fork 620
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 does not recognize that the module name is a macro definition #3712
Comments
This is a known issue.
What do you expect? |
I expect output have kind of module vscode verilog extensions use ctags to instance module, when module name is macro , can't find 'kind:module' in tags,extension not working |
I don't this this works for you. How `xxx is defined in your design? `define xxx foo In this case tag output should be something like:
Or
|
An ip will have multiple sets of macro definition configurations in the system, the same module name is not allowed to have different functions, we define the module name with a macro, so that different configurations will be modified into different module names, module instantiation also needs Instantiate using macro definition, so I want to get the original macro definition name, not the defined value `XXX is a sub module `define XXX_TOP foo_top
`define XXX foo xxx.v module `XXX (
) xxx_top.v module `XXX_TOP
...
`XXX U_XXX ( //when i use vscode verilog extensions to instance xxx.v,this shoud be `XXX ,not foo
) |
Interesting discussion. I have not had a chance to use SystemVerilog, but I found another reason to extract `XXX: /tmp/input.sv:
ctags could not fill the scope field of mod_prog1. If the parser accepts `XXX, ctags can fill the scope field without reporting the internal error. |
I understood your request. You should use the configuration feature of the current Verilog (SystemVerilog) for this case. The basic fix for @@ -887,7 +887,7 @@ static bool isIdentifier (tokenInfo* token)
int c = vStringChar (token->name, i);
if (i == 0)
{
- if (c == '`' || !isWordToken (c))
+ if (!isWordToken (c))
return false;
}
else I have noticed that this modification exposes a hidden bug. I have to fix it before fixing this. |
Note that text macros cannot be fully supported without the use of a preprocessor. FIx for universal-ctags#3712 Signed-off-by: Hiroo HAYASHI <24754036+hirooih@users.noreply.github.com>
PR #3722 fixes this. It was merged into master. Thank you for your report. |
The name of the parser:
verilog
The command line you used to run ctags:
any
The content of input file:
The tags output you are not satisfied with:
The tags output you expect:
The version of ctags:
How do you get ctags binary:
(
github
)
The text was updated successfully, but these errors were encountered: