Check for supported tool versions
Define supported tool versions in tool_requirements.py, and check them
in a fusesoc run. If an unsupported tool version is found, fusesoc
outputs an error like this:
```
$ fusesoc --cores-root ../../ run --target=lint lowrisc:ip:aes
INFO: Preparing lowrisc:constants:top_pkg:0
INFO: Preparing lowrisc:lint:comportable:0.1
...
INFO: Preparing lowrisc:tool:check_tool_requirements:0.1
INFO: Preparing lowrisc:lint:common:0.1
...
INFO: Preparing lowrisc:ip:aes:0.5
ERROR: verilator is too old: found version 4.016, need at least 4.028
ERROR: Tool requirements not fulfilled. Please update the tools and retry.
ERROR: Failed to build lowrisc:ip:aes:0.5 : pre_build script \
'check_tool_requirements' exited with error code 1
```
The only version checked at this point is Verilator, which is set to
version 4.028, the first version to support wildcard matching for
`lint_off` rules.
The whole infrastructure has been created by @imphil in the Ibex
repository (see lowRISC/Ibex#604). This commit just copies the
framework over to OpenTitan.
Signed-off-by: Pirmin Vogel <vogelpi@lowrisc.org>
diff --git a/hw/lint/common.core b/hw/lint/common.core
index 64e323c..f7ce7f7 100644
--- a/hw/lint/common.core
+++ b/hw/lint/common.core
@@ -15,10 +15,13 @@
- tools/ascentlint/common.waiver: {file_type: waiver}
- tools/ascentlint/ascentlint-config.tcl: {file_type: tclSource}
+ files_check_tool_requirements:
+ depend:
+ - lowrisc:tool:check_tool_requirements
+
targets:
default: &default_target
filesets:
- tool_verilator ? (files_verilator)
- tool_ascentlint ? (files_ascentlint)
-
-
+ - files_check_tool_requirements