Hi,
I got an issue which causing malfunction of indexing procedures (go to declaration, auto complete etc.) in some of my files.
In those specific files, even “go to declaration” for an instance of this class\file doesn’t work.
See below the copied log at medium verbosity when trying to “open declaration” (two examples of two different files) and for “auto complete”.
I recognized that there is a function which mentioned at this log. This function is part of another Class, located at another file which is included at the malfunction file.
When I open this file- open declaration works properly, but each file which includes it seems not to work properly. Moreover, comment the “include” line solves the issue (but doesn’t compile ).
Can you please help me figure out the issue?
Testbench description:
////////////////class_c.sv///////////////
`include “class_b.sv”
Class class_c extends…
Class_a class_a_inst1;
…
…
class_a_inst1.init(); //--trying open declaration on “class_a_inst1”, doesn’t work!
…
..
…
//////class_b.sv///////////////////
Class class_b extends…
…
…
Virtual function void function1_name ();
…
..
endclass
//////////////////end of testbench/////////////////////////
////////////////////////////example1- open declaration “function1” for instance “instance1” at class class1.//////////////////////////////////////////////
[SVDBPluginLibIndex] ensureIndexState0 Starting Ensure Index State
[SVDBArgFileIndex2] findTargetFileTree: 0ms
[getContextScope] getContextScope: class_c.sv:866
[SVExprScanner] --> extractExprContext()
[SVExprScanner] First Ch (non-adjusted): "m"
[SVExprScanner] Scanning forward
[SVExprScanner] prev_ch=2
[SVExprScanner] First Ch (adjusted): "2"
[SVExprScanner] notInString c="2"
[SVExprScanner] id="class_a_inst1"
[SVExprScanner] trigger="null"
[SVExprScanner] <-- extractExprContext()
[getContextScope] active_scope:
[getContextScope] function1_name net.sf.sveditor.core.db.SVDBFunction@53c3264b net.sf.sveditor.core.db.SVDBClassDecl@310730e3
[getContextScope] class_a.sv net.sf.sveditor.core.db.SVDBClassDecl@310730e3 net.sf.sveditor.core.db.SVDBFile@4f1aa03a
[getContextScope] class_c.sv net.sf.sveditor.core.db.SVDBFile@4f1aa03a null
[getContextScope] File: net.sf.sveditor.core.db.SVDBFile@4f1aa03a ; net.sf.sveditor.core.db.SVDBFile@4f1aa03a
[SVDBPluginLibIndex] ensureIndexState0 Starting Ensure Index State
[SVDBPluginLibIndex] ensureIndexState0 Starting Ensure Index State
[SVDBPluginLibIndex] ensureIndexState0 Starting Ensure Index State
[SVDBPluginLibIndex] ensureIndexState0 Starting Ensure Index State
[SVDBPluginLibIndex] ensureIndexState0 Starting Ensure Index State
[SVDBPluginLibIndex] ensureIndexState0 Starting Ensure Index State
[SVDBPluginLibIndex] ensureIndexState0 Starting Ensure Index State
[SVDBPluginLibIndex] ensureIndexState0 Starting Ensure Index State
[OpenDeclaration] Result:
///////////////////////////////example1- autocomlete////////////////////////////////////////////////////////
[SVExprScanner] --> extractExprContext()
[SVExprScanner] First Ch (non-adjusted): "
"
[SVExprScanner] Scanning forward
[SVExprScanner] prev_ch=.
[SVExprScanner] First Ch (adjusted): "."
[SVExprScanner] notInId: ch="."
[SVExprScanner] <-- extractExprContext()
[SVCompletionProcessor] ctxt: type=Triggered trigger=. root=axi_soc2mnic_reg_adapter leaf= start=37095
[SVExprScanner] --> extractExprContext()
[SVExprScanner] First Ch (non-adjusted): "
"
[SVExprScanner] Scanning forward
[SVExprScanner] prev_ch=.
[SVExprScanner] First Ch (adjusted): "."
[SVExprScanner] notInId: ch="."
[SVExprScanner] <-- extractExprContext()
[SVCompletionProcessor] ctxt: type=Triggered trigger=. root=axi_soc2mnic_reg_adapter leaf= start=37095
[SVCompletionProcessor] computeProposals: ../class_c.sv:864:28
[SVCompletionProcessor] src_scope: Function function1_name
[SVDBPluginLibIndex] ensureIndexState0 Starting Ensure Index State
[SVDBPluginLibIndex] ensureIndexState0 Starting Ensure Index State
[SVDBPluginLibIndex] ensureIndexState0 Starting Ensure Index State
[SVDBPluginLibIndex] ensureIndexState0 Starting Ensure Index State
[SVDBPluginLibIndex] ensureIndexState0 Starting Ensure Index State
[SVDBPluginLibIndex] ensureIndexState0 Starting Ensure Index State
[SVDBPluginLibIndex] ensureIndexState0 Starting Ensure Index State
[SVDBPluginLibIndex] ensureIndexState0 Starting Ensure Index State
[SVCompletionProcessor] Failed to traverse the content-assist expression (0)
/////////////////////////////example2 – build function causing issue to open declaration////////////////////////////////////////////
[SVDBPluginLibIndex] ensureIndexState0 Starting Ensure Index State
[SVDBArgFileIndex2] findTargetFileTree: 0ms
[getContextScope] getContextScope: ./class_c.sv:866
[SVExprScanner] --> extractExprContext()
[SVExprScanner] First Ch (non-adjusted): "_"
[SVExprScanner] Scanning forward
[SVExprScanner] prev_ch=c
[SVExprScanner] First Ch (adjusted): "c"
[SVExprScanner] notInString c="c"
[SVExprScanner] id="class_a_inst1"
[SVExprScanner] trigger="null"
[SVExprScanner] <-- extractExprContext()
[getContextScope] active_scope:
[getContextScope] build net.sf.sveditor.core.db.SVDBFunction@2ba504e0 net.sf.sveditor.core.db.SVDBClassDecl@5ee32482 //[tomera] Notice that here “build” is the function name
[getContextScope] class_b net.sf.sveditor.core.db.SVDBClassDecl@5ee32482 net.sf.sveditor.core.db.SVDBFile@711e8057
[getContextScope] class_c.sv net.sf.sveditor.core.db.SVDBFile@711e8057 null
[getContextScope] File: net.sf.sveditor.core.db.SVDBFile@711e8057 ; net.sf.sveditor.core.db.SVDBFile@711e8057
[SVDBPluginLibIndex] ensureIndexState0 Starting Ensure Index State
[SVDBPluginLibIndex] ensureIndexState0 Starting Ensure Index State
[SVDBPluginLibIndex] ensureIndexState0 Starting Ensure Index State
[SVDBPluginLibIndex] ensureIndexState0 Starting Ensure Index State
[SVDBPluginLibIndex] ensureIndexState0 Starting Ensure Index State
[SVDBPluginLibIndex] ensureIndexState0 Starting Ensure Index State
[OpenDeclaration] Result:
//////////////////////////////////////////////////////////////////////////////////////////
Okay, this is interesting. It appears you have unicode characters in your code. Specifically, the double quotes in the inclusion of class_b.sv are not ASCI double-quote characters. If I change them to ASCII double quotes, everything appears to work fine.
Any idea how the unicode characters got there?
Hi Matthew,
First of all- thanks for you respond.
I tried to find any non ASCII character at my environment using the following grep command:
grep --color='auto' -P -n "[\x80-\xFF]"
But I didn't find any..
I think that this non ASCII character showed up because I edited those lines inside this site, and not at my regular environment. What do you think? Do you see anything at the above log which still pointing on a non ASCII character?
Do you see any other clue I can look for?
Thanks,
Tomer
Hi Tomer,
Okay, thanks for confirming that your actual source doesn't contain unicode characters. I've attached the project that I'm using to investigate this issue. Any updates you can make to the project that help to show the issue would be much appreciated!
Thanks,
Matthew
Thanks Mattew.
I have a "legal" issue to export the full log as it contain a lot of information and somtimes full code classes.
Do you have some recommendation of what should I look for? some error pattern I can greo and send?
Otherwise I will try to exclude this data from the log or will try to limit the issue somehow.
Thanks again for your help.
Hi,
I copied the end of my logfile which seems relevnat- see attached.
Here, I am trying to find the class "my_class_to_find" which is instanciated inside "container_class".
Is it helpfull? Do you need more information?
Thanks,
Tomer
Deleted testcase posted earlier ... started working when I went back to it.