google / google/xls

Unsupported character: '_' Error in Netlist Interpreter (may be related to VAST)

Open
#418 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
C++
Stars
1.9k
Forks
283
Avg merge
2d 10h
Merged PRs (30d)
135

Description

When using the verilog file:
```
module __a__a(
input wire clk,
output wire [31:0] out
);
// ===== Pipe stage 0:
wire [31:0] p0_literal_1_comb;
assign p0_literal_1_comb = 32'h0000_0001;

// Registers for pipe stage 0:
reg [31:0] p0_literal_1;
always_ff @ (posedge clk) begin
p0_literal_1 <= p0_literal_1_comb;
end
assign out = p0_literal_1;
endmodule
```

I receive the following error.
```
F0502 19:43:27.783431 1020326 netlist_interpreter_main.cc:170] Check failed: ::absl::OkStatus() == (xls::RealMain(netlist_path, cell_library_path, cell_library_proto_path, module_name, inputs, output_type, dump_cells)) (OK vs. UNIMPLEMENTED: Unsupported character: '_' (0x5f) @ 1:8)
```
It is referring to the '_' in the module name: __a__a in the verilog file.

The commandline is:
```
bazel run //xls/tools:netlist_interpreter_main -- --cell_library=$PWD/cells.lib --netlist=$PWD/a.v --module_name=__a__a --input="high"
```
The contents of cells.lib does not seem relevant to the error.

On a side note:
The verilog was generated using the IR converter, IR Optimizer and Codegen tools.
The DSLX function is:
```
fn a() -> u32 {
u32: 1
}
```
Regardless, the verilog seems correct.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.