hayato kimura
08/15/2023, 7:15 PM[ERROR]: 4 errors found by linter
[ERROR]: Step 0 (verilator_lint_check) failed with error:
-code 1 -level 0 -errorcode NONE -errorinfo {
while executing
"throw_error"
(procedure "run_verilator" line 60)
invoked from within
"run_verilator"
(procedure "run_verilator_step" line 3)
invoked from within
"run_verilator_step"} -errorline 1
I am trying to reproduce a project called avsdbgp_3v3_sky130_v2 that is publicly available.
In the same environment, when the following was executed in caravel_user_project, "SUCCESS" was obtained without any problem.
# Run openlane to harden user_proj_example
make user_proj_example
# Run openlane to harden user_project_wrapper
make user_project_wrapper
The environment was just launched today and everything is up to date.Mitch Bailey
08/15/2023, 9:39 PMuser_proj_example/runs/user_proj_example/logs/synthesis/linter.log
?hayato kimura
08/16/2023, 3:03 AM%Error: Cannot find file containing module: /project/openlane/user_proj_example/runs/user_proj_example/../../caravel/verilog/rtl/defines.v
%Error: This may be because there's no search path specified with -I<dir>.
... Looked in:
/project/openlane/user_proj_example/runs/user_proj_example/../../caravel/verilog/rtl/defines.v
/project/openlane/user_proj_example/runs/user_proj_example/../../caravel/verilog/rtl/defines.v.v
/project/openlane/user_proj_example/runs/user_proj_example/../../caravel/verilog/rtl/defines.v.sv
obj_dir//project/openlane/user_proj_example/runs/user_proj_example/../../caravel/verilog/rtl/defines.v
obj_dir//project/openlane/user_proj_example/runs/user_proj_example/../../caravel/verilog/rtl/defines.v.v
obj_dir//project/openlane/user_proj_example/runs/user_proj_example/../../caravel/verilog/rtl/defines.v.sv
%Error: Cannot find file containing module: /project/openlane/user_proj_example/runs/user_proj_example/../../verilog/rtl/user_proj_example.v
%Error: Exiting due to 3 error(s)
The configuration of openlane seems to have changed from 2 years ago.Mitch Bailey
08/16/2023, 3:59 AMcaravel_user_project
and replacing the configuration files with the ones from avsdbgp_3v3_sky130_v2
. The config.tcl should be replaced with config.json.hayato kimura
08/17/2023, 2:23 PMcaravel_user_project
and replaced only verilog/rtl/user_proj_example.v
. The error decreased, but I continue to get the following error.
[INFO]: Running linter (Verilator) (log: user_proj_example/runs/user_proj_example/logs/synthesis/linter.log)...
[ERROR]: 4 errors found by linter
[ERROR]: Step 0 (verilator_lint_check) failed with error:
-code 1 -level 0 -errorcode NONE -errorinfo {
while executing
"throw_error"
(procedure "run_verilator" line 60)
invoked from within
"run_verilator"
(procedure "run_verilator_step" line 3)
invoked from within
"run_verilator_step"} -errorline 1
Here is the content of /home/hayato/test/openlane/user_proj_example/runs/23_08_17_23_02/logs/synthesis/linter.log
%Warning-EOFNEWLINE: /home/hayato/test/openlane/user_proj_example/../../verilog/rtl/defines.v:66:28: Missing newline at end of file (POSIX 3.206).
: ... Suggest add newline.
66 | `endif // __GLOBAL_DEFINE_H
| ^
... For warning description see <https://verilator.org/warn/EOFNEWLINE?v=5.009>
... Use "/* verilator lint_off EOFNEWLINE */" and lint_on around source to disable this message.
%Error: /home/hayato/test/openlane/user_proj_example/../../verilog/rtl/user_proj_example.v:76:7: syntax error, unexpected real
76 | reg real VBGP;
| ^~~~
%Error: Exiting due to 1 error(s)
Attached is the user_proj_example.v
. I have not made any changes from the original avsdbgp_3v3_sky130_v2 repository, but I am getting a syntax error.
It may be a problem with the verilog description, but I have tried everything and cannot find a way to deal with the error.Mitch Bailey
08/17/2023, 9:33 PMavsdbgp_3v3_sky130_v2
module is behavioral verilog that is not intended to be synthesized. Try creating a file with just this module definition in verilog/rtl/avsdbgp_3v3_sky130v2.v
.
module avsdbgp_3v3_sky130_v2 #(
parameter BITS = 32
)(
input EN,
output VBGP
);
reg real VBGP;
initial begin
if (EN == 1'b1) begin
VBGP <= 1.19;
end else begin
VBGP <= 0.0;
end
end
always @(EN) begin
if (EN == 1'b1) begin
VBGP <= 1.19;
end else begin
VBGP <= 0.0;
end
end
endmodule
Remove the module definition from verilog/rtl/user_proj_example.v
, and add this file to VERILOG_FILES
and VERILOG_FILES_BLACKBOX
in the config.file. Hopefully, this will allow the file to be bypassed by the linter. I believe the linter addition is relatively new, so it might catch things in older projects.
I’m not a verilog or linter expert, so this is just a guess. There’s an article here that says that verilog does not permit real values as ports. If it works, please create an issue.hayato kimura
08/18/2023, 3:14 AMavsdbgp_3v3_sky130_v2.v
.
%Error: /home/hayato/avsdbgp_3v3_sky130_v2/openlane/user_proj_example/../../verilog/rtl/avsdbgp_3v3_sky130_v2.v:10:7: syntax error, unexpected real
10 | reg real VBGP;
| ^~~~
Is there any other way to handle this?Mitch Bailey
08/18/2023, 4:24 AMconfig.json
file?hayato kimura
08/18/2023, 4:34 AMavsdbgp_3v3_sky130_v2.v
added only to VERILOG_FILES_BLACKBOX
because adding it to `VERILOG_FILES`would cause the other error attached.Mitch Bailey
08/18/2023, 4:55 AMimage.png
file is because the json file is missing a ,
.hayato kimura
08/18/2023, 5:09 AMVERILOG_FILES_BLACKBOX
VERILOG_FILES
.Mitch Bailey
08/18/2023, 5:24 AMMitch Bailey
08/18/2023, 5:30 AMVERILOG_FILES_BLACKBOX
needs to be a list? You could try changing the order to see if the error location changes. Currently is says line 8 column 5.hayato kimura
08/18/2023, 5:49 AMattached file`avsdbgp_3v3_sky130_v2.v` to bothVERILOG_FILES_BLACKBOX
.VERILOG_FILES
Mitch Bailey
08/18/2023, 6:36 AMavsdbgp_3v3_sky130_v2.v
to avsdbgp_3v3_sky130_v2.bb.v
and delete
reg real VBGP;
initial begin
if (EN == 1'b1) begin
VBGP <= 1.19;
end else begin
VBGP <= 0.0;
end
end
always @(EN) begin
if (EN == 1'b1) begin
VBGP <= 1.19;
end else begin
VBGP <= 0.0;
end
end
then change your config.json
to use this file?hayato kimura
08/19/2023, 1:07 AMMitch Bailey
08/19/2023, 2:52 AMavsdbgp_3v3_sky130_v2.bb.v
should be ONLY
module avsdbgp_3v3_sky130_v2 #(
parameter BITS = 32
)(
input EN,
output VBGP
);
endmodule
hayato kimura
08/19/2023, 3:00 AMhayato kimura
08/19/2023, 3:09 AM/home/hayato/avsdbgp_3v3_sky130_v2/openlane/user_proj_example/runs/23_08_19_11_55/logs/synthesis/2-sta.log.
This is free software, and you are free to change and redistribute it
under certain conditions; type `show_copying' for details.
This program comes with ABSOLUTELY NO WARRANTY; for details type `show_warranty'.
define_corners Typical
read_liberty -corner Typical /home/hayato/dependencies/pdks/sky130B/libs.ref/sky130_fd_sc_hd/lib/sky130_fd_sc_hd__tt_025C_1v80.lib
Using 1e-12 for capacitance...
Using 1e+03 for resistance...
Using 1e-09 for time...
Using 1e+00 for voltage...
Using 1e-03 for current...
Using 1e-09 for power...
Using 1e-06 for distance...
Reading netlist '/home/hayato/avsdbgp_3v3_sky130_v2/openlane/user_proj_example/runs/23_08_19_11_55/results/synthesis/user_proj_example.v'…
Error while reading /home/hayato/avsdbgp_3v3_sky130_v2/openlane/user_proj_example/../../verilog/rtl/avsdbgp_3v3_sky130_v2.bb.v:
Make sure that this a gate-level netlist not an RTL file
You can add the following comment '/// sta-blackbox' in the file to skip it and blackbox the modules inside if needed.
Error: /home/hayato/avsdbgp_3v3_sky130_v2/openlane/user_proj_example/../../verilog/rtl/avsdbgp_3v3_sky130_v2.bb.v line 1, syntax error, unexpected '#', expecting ';' or '('
Mitch Bailey
08/19/2023, 3:10 AM#( parameter BITS = 32 )
2. Add /// sta-blackbox
at the top of the avsdbgp_3v3_sky130_v2.bb.v
file.Mitch Bailey
08/19/2023, 3:14 AMhayato kimura
08/19/2023, 3:29 AMMitch Bailey
08/19/2023, 4:55 AM"EXTRA_LEFS": "dir::../../lef/avsdbgp_3v3_sky130_v2.lef",
"EXTRA_GDS_FILES": "dir::../../gds/avsdbgp_3v3_sky130_v2.gds",
hayato kimura
08/19/2023, 5:22 AMavsdbgp_3v3_sky130_v2
was GDS generated without using openlane?Mitch Bailey
08/19/2023, 5:40 AMfind -name '*avsbdgp*'
. The file names may be a little different.Mitch Bailey
08/19/2023, 5:42 AMMitch Bailey
08/19/2023, 5:51 AMMitch Bailey
08/19/2023, 5:52 AMhayato kimura
08/19/2023, 6:01 AMavsdbgp_3v3_sky130_v2/Layout
to caravel/gds/user_analog_project_wrapper_empty.gds
?
I will try some more on the subject of this repository.Mitch Bailey
08/19/2023, 6:13 AMuser_proj_example
. It looks like it was created manually as you suggested.
You could try to create the gds and lef for avsdbgp_3v3_sky130_v2
and run openlane with that.
Shouldn’t be too hard.
1. Open the mag/BGR.mag
file in magic
2. Rename the top cell to avsdbgp_3v3_sky130_v2
3. lef write -tech -hide 100 -toplayer -pinonly 100
or something to create the lef file in the working directory.
4. move the lef file to the lef
directory
5. gds write avsdbgp_3v3_sky130_v2.gds
6. move the gds file to the gds
directory.
7. You can check the gds with klayout to be sure it’s reasonable.hayato kimura
08/19/2023, 6:23 AMVinayaka Karthik
08/23/2023, 7:22 AM