-
Notifications
You must be signed in to change notification settings - Fork 217
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Standalone command-line tool for analyzing whole projects
First tool is a symbol-table inspector: * verible-verilog-project symbol-table-defs args... * verible-verilog-project symbol-table-refs args... PiperOrigin-RevId: 348548097
- Loading branch information
Showing
11 changed files
with
687 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
"""This package contains multi-tool for working with SystemVerilog projects. | ||
""" | ||
|
||
licenses(["notice"]) | ||
|
||
cc_binary( | ||
name = "verible-verilog-project", | ||
srcs = ["project_tool.cc"], | ||
visibility = ["//:__subpackages__"], | ||
deps = [ | ||
"//common/util:file_util", | ||
"//common/util:init_command_line", | ||
"//common/util:logging", | ||
"//common/util:subcommand", | ||
"//verilog/analysis:symbol_table", | ||
"//verilog/analysis:verilog_project", | ||
"@com_google_absl//absl/flags:usage", | ||
"@com_google_absl//absl/status", | ||
"@com_google_absl//absl/strings", | ||
], | ||
) | ||
|
||
sh_test( | ||
name = "project_tool_test", | ||
size = "small", | ||
srcs = ["project_tool_test.sh"], | ||
args = ["$(location :verible-verilog-project)"], | ||
data = [":verible-verilog-project"], | ||
deps = [], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# SystemVerilog Project Multi-tool | ||
|
||
<!--* | ||
freshness: { owner: 'fangism' reviewed: '2020-12-21' } | ||
*--> | ||
|
||
`verible-verilog-project` is a multi-tool that operates on whole Verilog | ||
projects, consisting of a file list and related configurations. This serves as a | ||
diagnostic tool for analyzing (and potentially transforming) project-level | ||
sources. | ||
|
||
## Usage | ||
|
||
``` | ||
verible-verilog-project COMMAND [options...] | ||
available commands: | ||
help | ||
symbol-table-defs | ||
symbol-table-refs | ||
Flags from verilog/tools/project/project_tool.cc: | ||
--file_list_path (The path to the file list which contains the names of | ||
SystemVerilog files. | ||
The files should be ordered by definition dependencies.); default: ""; | ||
--file_list_root (The absolute location which we prepend to the files in the | ||
file list (where listed files are relative to).); default: "."; | ||
--include_dir_paths (Comma separated paths of the directories used to look | ||
for included files. | ||
Note: The order of the files here is important. | ||
File search will stop at the the first found among the listed directories. | ||
e.g --include_dir_paths directory1,directory2 | ||
if "A.sv" exists in both "directory1" and "directory2" the one in | ||
"directory1" is the one we will use. | ||
); default: ; | ||
``` | ||
|
||
## Commands | ||
|
||
### `symbol-table-defs` | ||
|
||
Builds a unified symbol table over all project files, and prints a | ||
human-readable representation. This does not show nor attempt to resolve symbol | ||
references. | ||
|
||
### `symbol-table-refs` | ||
|
||
Builds a unified symbol table over all project files, attempts to resolve all | ||
symbol references to definitions, and prints a human-readable representation of | ||
the references. |
Oops, something went wrong.