mirror of
https://github.com/verilator/verilator.git
synced 2025-01-01 04:07:34 +00:00
Rename --bin to --build-dep-bin.
This commit is contained in:
parent
8dae4ad93a
commit
fc4ffd454e
1
Changes
1
Changes
@ -21,6 +21,7 @@ Verilator 4.227 devel
|
||||
|
||||
* Support IEEE constant signal strengths (#3601). [Ryszard Rozak/Antmicro]
|
||||
* Add --main to generate main() C++ (previously was experimental only).
|
||||
* Rename --bin to --build-dep-bin.
|
||||
* Fix thread saftey in SystemC VL_ASSIGN_SBW/WSB (#3494) (#3513). [Mladen Slijepcevic]
|
||||
* Fix crash in gate optimization of circular logic (#3543). [Bill Flynn]
|
||||
* Fix arguments in non-static method call (#3547) (#3582). [Gustav Svensk]
|
||||
|
@ -282,8 +282,8 @@ detailed descriptions of these arguments.
|
||||
--autoflush Flush streams after all $displays
|
||||
--bbox-sys Blackbox unknown $system calls
|
||||
--bbox-unsup Blackbox unsupported language features
|
||||
--bin <filename> Override Verilator binary
|
||||
--build Build model executable/library after Verilation
|
||||
--build-dep-bin <filename> Override build dependency Verilator binary
|
||||
--build-jobs <jobs> Parallelism for --build
|
||||
--cc Create C++ output
|
||||
--cdc Clock domain crossing analysis
|
||||
|
@ -115,13 +115,6 @@ Summary:
|
||||
|
||||
Using this argument will likely cause incorrect simulation.
|
||||
|
||||
.. option:: --bin <filename>
|
||||
|
||||
Rarely needed. Override the default filename for Verilator itself.
|
||||
When a dependency (.d) file is created, this filename will become a
|
||||
source dependency, such that a change in this binary will have make
|
||||
rebuild the output files.
|
||||
|
||||
.. option:: --build
|
||||
|
||||
After generating the SystemC/C++ code, Verilator will invoke the
|
||||
@ -129,6 +122,15 @@ Summary:
|
||||
is also used). Verilator manages the build itself, and for this --build
|
||||
requires GNU Make to be available on the platform.
|
||||
|
||||
.. option:: --build-dep-bin <filename>
|
||||
|
||||
Rarely needed. When a dependency (.d) file is created, this filename
|
||||
will become a source dependency, such that a change in this binary will
|
||||
have make rebuild the output files. Defaults to the full path to the
|
||||
Verilator binary.
|
||||
|
||||
This option was named `--bin` prior to version 4.228.
|
||||
|
||||
.. option:: --build-jobs [<value>]
|
||||
|
||||
Specify the level of parallelism for :vlopt:`--build`. If zero, uses the
|
||||
|
@ -292,7 +292,7 @@ class EmitMkHierVerilation final {
|
||||
of.puts("# Verilation of hierarchical blocks are executed in this directory\n");
|
||||
of.puts("VM_HIER_RUN_DIR := " + cwd + "\n");
|
||||
of.puts("# Common options for hierarchical blocks\n");
|
||||
const string fullpath_bin = V3Os::filenameRealPath(v3Global.opt.bin());
|
||||
const string fullpath_bin = V3Os::filenameRealPath(v3Global.opt.buildDepBin());
|
||||
const string verilator_wrapper = V3Os::filenameDir(fullpath_bin) + "/verilator";
|
||||
of.puts("VM_HIER_VERILATOR := " + verilator_wrapper + "\n");
|
||||
of.puts("VM_HIER_INPUT_FILES := \\\n");
|
||||
|
@ -154,7 +154,7 @@ void V3FileDependImp::writeDepend(const string& filename) {
|
||||
if (i.target()) *ofp << i.filename() << " ";
|
||||
}
|
||||
*ofp << " : ";
|
||||
*ofp << v3Global.opt.bin();
|
||||
*ofp << v3Global.opt.buildDepBin();
|
||||
*ofp << " ";
|
||||
|
||||
for (const DependFile& i : m_filenameList) {
|
||||
|
@ -1005,8 +1005,8 @@ void V3Options::parseOptsList(FileLine* fl, const string& optdir, int argc, char
|
||||
m_bboxUnsup = flag;
|
||||
FileLine::globalWarnOff(V3ErrorCode::E_UNSUPPORTED, true);
|
||||
});
|
||||
DECL_OPTION("-bin", Set, &m_bin);
|
||||
DECL_OPTION("-build", Set, &m_build);
|
||||
DECL_OPTION("-build-dep-bin", Set, &m_buildDepBin);
|
||||
DECL_OPTION("-build-jobs", CbVal, [this, fl](const char* valp) {
|
||||
int val = std::atoi(valp);
|
||||
if (val < 0) {
|
||||
|
@ -320,7 +320,7 @@ private:
|
||||
int m_compLimitMembers = 64; // compiler selection; number of members in struct before make anon array
|
||||
int m_compLimitParens = 240; // compiler selection; number of nested parens
|
||||
|
||||
string m_bin; // main switch: --bin {binary}
|
||||
string m_buildDepBin; // main switch: --build-dep-bin {filename}
|
||||
string m_exeName; // main switch: -o {name}
|
||||
string m_flags; // main switch: -f {name}
|
||||
string m_l2Name; // main switch: --l2name; "" for top-module's name
|
||||
@ -419,7 +419,6 @@ public:
|
||||
bool makePhony() const { return m_makePhony; }
|
||||
bool preprocNoLine() const { return m_preprocNoLine; }
|
||||
bool underlineZero() const { return m_underlineZero; }
|
||||
string bin() const { return m_bin; }
|
||||
string flags() const { return m_flags; }
|
||||
bool systemC() const { return m_systemC; }
|
||||
bool savable() const { return m_savable; }
|
||||
@ -431,6 +430,8 @@ public:
|
||||
bool bboxSys() const { return m_bboxSys; }
|
||||
bool bboxUnsup() const { return m_bboxUnsup; }
|
||||
bool build() const { return m_build; }
|
||||
string buildDepBin() const { return m_buildDepBin; }
|
||||
void buildDepBin(const string& flag) { m_buildDepBin = flag; }
|
||||
bool cdc() const { return m_cdc; }
|
||||
bool cmake() const { return m_cmake; }
|
||||
bool context() const { return m_context; }
|
||||
@ -631,7 +632,6 @@ public:
|
||||
// Return options for child hierarchical blocks when forTop==false, otherwise returns args for
|
||||
// the top module.
|
||||
string allArgsStringForHierBlock(bool forTop) const;
|
||||
void bin(const string& flag) { m_bin = flag; }
|
||||
void parseOpts(FileLine* fl, int argc, char** argv);
|
||||
void parseOptsList(FileLine* fl, const string& optdir, int argc, char** argv);
|
||||
void parseOptsFile(FileLine* fl, const string& filename, bool rel);
|
||||
|
@ -563,7 +563,7 @@ static void verilate(const string& argString) {
|
||||
UINFO(1, "Option --verilate: Start Verilation\n");
|
||||
|
||||
// Can we skip doing everything if times are ok?
|
||||
V3File::addSrcDepend(v3Global.opt.bin());
|
||||
V3File::addSrcDepend(v3Global.opt.buildDepBin());
|
||||
if (v3Global.opt.skipIdentical().isTrue()
|
||||
&& V3File::checkTimes(v3Global.opt.hierTopDataDir() + "/" + v3Global.opt.prefix()
|
||||
+ "__verFiles.dat",
|
||||
@ -714,7 +714,7 @@ int main(int argc, char** argv, char** /*env*/) {
|
||||
V3PreShell::boot();
|
||||
|
||||
// Command option parsing
|
||||
v3Global.opt.bin(argv[0]);
|
||||
v3Global.opt.buildDepBin(argv[0]);
|
||||
const string argString = V3Options::argString(argc - 1, argv + 1);
|
||||
v3Global.opt.parseOpts(new FileLine{FileLine::commandLineFilename()}, argc - 1, argv + 1);
|
||||
|
||||
|
@ -1 +0,0 @@
|
||||
%Error: --build-jobs requires a non-negative integer, but '-1' was passed
|
@ -10,13 +10,11 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
||||
|
||||
scenarios(vlt => 1);
|
||||
|
||||
top_filename("t/t_flag_werror.v");
|
||||
|
||||
lint(
|
||||
fails => 1,
|
||||
verilator_flags => [qw(--build-jobs -1 --build)],
|
||||
expect_filename => $Self->{golden_filename},
|
||||
compile(
|
||||
v_flags2 => ['--build-dep-bin', 'path_to_exe'],
|
||||
);
|
||||
|
||||
file_grep("$Self->{obj_dir}/$Self->{VM_PREFIX}__ver.d", qr/path_to_exe/);
|
||||
|
||||
ok(1);
|
||||
1;
|
8
test_regress/t/t_flag_build_dep_bin.v
Normal file
8
test_regress/t/t_flag_build_dep_bin.v
Normal file
@ -0,0 +1,8 @@
|
||||
// DESCRIPTION: Verilator: Verilog Test module
|
||||
//
|
||||
// This file ONLY is placed under the Creative Commons Public Domain, for
|
||||
// any use, without warranty, 2005 by Wilson Snyder.
|
||||
// SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
module t (/*AUTOARG*/);
|
||||
endmodule
|
Loading…
Reference in New Issue
Block a user