mirror of
https://github.com/safishamsi/graphify.git
synced 2026-07-13 02:47:00 +00:00
297075c3f3
The SystemVerilog class-body field regex in _augment_systemverilog_semantics matched only unqualified `<type> <name>;` declarations. Its `^\s*` prefix consumes leading whitespace but not leading class-property qualifiers, so a qualified field such as `rand Config m_cfg;` (three tokens) failed the two-token shape and its type reference was silently dropped from the graph. Consume optional leading qualifiers (rand/randc/local/protected/static/const/ automatic/var) before the type token. Zero qualifiers preserves the existing behavior; the type and name capture are unchanged. Adds test_systemverilog_qualified_field_references plus rand- and protected-qualified fields (and a Config class) to the shared .sv fixture.
45 lines
637 B
Systemverilog
45 lines
637 B
Systemverilog
package math_pkg;
|
|
endpackage
|
|
|
|
interface class Processor;
|
|
endclass
|
|
|
|
class BaseProcessor;
|
|
endclass
|
|
|
|
class Payload;
|
|
endclass
|
|
|
|
class Config;
|
|
endclass
|
|
|
|
class Result #(type T = Payload);
|
|
T value;
|
|
endclass
|
|
|
|
class DataProcessor extends BaseProcessor implements Processor;
|
|
Result #(Payload) current;
|
|
rand Config m_cfg;
|
|
protected BaseProcessor m_parent;
|
|
|
|
function Result #(Payload) build(Payload input);
|
|
return current;
|
|
endfunction
|
|
endclass
|
|
|
|
module leaf;
|
|
endmodule
|
|
|
|
module top;
|
|
import math_pkg::*;
|
|
|
|
function int add(input int a, input int b);
|
|
return a + b;
|
|
endfunction
|
|
|
|
task tick;
|
|
endtask
|
|
|
|
leaf u_leaf();
|
|
endmodule
|