-
Notifications
You must be signed in to change notification settings - Fork 915
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 file list suport #4926
base: main
Are you sure you want to change the base?
Verilog file list suport #4926
Conversation
Please note that most, if not all tools, accept any command line argument in their file lists, not just filenames or +define/+incdir. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you're adding file list support for the verilog frontend, you should update the read
pass in /frontends/verific/verific.cc
to call it.
@udif The verific frontend for Yosys doesn't do this, so I don't think there's any reason that the read_verilog frontend should. It does however allow recursive calls with -f/-F in the file list. Also it calls it a command-file instead of a file list. |
All comments addressed, please review @KrystalDelusion |
} else { | ||
cmd_error(args, 1, "This version of Yosys is built without Verific support.\n"); | ||
args[0] = "read_verilog_file_list"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
read_verilog_file_list
is gated by !defined(__wasm)
, so it's usage here should be too.
args[0] = "read_verilog_file_list"; | |
#if !defined(__wasm) | |
args[0] = "read_verilog_file_list"; | |
#else | |
cmd_error(args, 1, "Command files are not supported on this platform.\n"); | |
#endif |
log("Parse a Verilog file list, and pass the list of Verilog files to read_verilog command.\n"); | ||
log("\n"); | ||
log(" -F file_list_path\n"); | ||
log(" File list file contains list of Verilog files to be parsed, any path is treated relative to the file list file\n"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
log(" File list file contains list of Verilog files to be parsed, any path is treated relative to the file list file\n"); | |
log(" File list file contains list of Verilog files to be parsed, any path is\n"); | |
log(" treated relative to the file list file\n"); |
log("\n"); | ||
log(" read_verilog_file_list [options]\n"); | ||
log("\n"); | ||
log("Parse a Verilog file list, and pass the list of Verilog files to read_verilog command.\n"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
log("Parse a Verilog file list, and pass the list of Verilog files to read_verilog command.\n"); | |
log("Parse a Verilog file list, and pass the list of Verilog files to read_verilog\n"); | |
log("command.\n"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Help messages should break at 80 characters (which is why the |---v---|
guides are there).
log(" File list file contains list of Verilog files to be parsed, any path is treated relative to the file list file\n"); | ||
log("\n"); | ||
log(" -f file_list_path\n"); | ||
log(" File list file contains list of Verilog files to be parsed, any path is treated relative to current working directroy\n"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
log(" File list file contains list of Verilog files to be parsed, any path is treated relative to current working directroy\n"); | |
log(" File list file contains list of Verilog files to be parsed, any path is\n"); | |
log(" treated relative to current working directroy\n"); |
What are the reasons/motivation for this change?
Most large Verilog/SystemVerilog IP use a file list/command '.f' file to hold list of Verilog file need to be compiled, this change make yosys able to directly parse file list.
Explain how this is achieved.
Implement a
read_verilog_file_list
command, that read in file list, and callsread_verilog
on each Verilog file in the file list. Currently the command only handles file path in file list file, in a future PR I will implement support for+define+
and+incdir+
in file list file.If applicable, please suggest to reviewers how they can test the change.