mirror of
https://github.com/verilator/verilator.git
synced 2026-10-05 17:43:31 +02:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d3797ade95 | ||
|
|
19b472cf0b | ||
|
|
38a31ae168 | ||
|
|
27516b565d | ||
|
|
c288a7bfb9 | ||
|
|
b44cd57866 | ||
|
|
b88a7f5152 | ||
|
|
7f9aa057bf | ||
|
|
305b4f3c75 | ||
|
|
6f4a8fe695 | ||
|
|
8aec436b5e | ||
|
|
aef2b7ea3c | ||
|
|
dcde026bac | ||
|
|
926209706f | ||
|
|
bd5d4c61c6 | ||
|
|
19abce5535 | ||
|
|
ab058c85bf | ||
|
|
4361c4b57a | ||
|
|
e6beab4037 | ||
|
|
ebeb645539 | ||
|
|
5c72f01598 | ||
|
|
0cf44a9c4f | ||
|
|
1fe5d5db79 | ||
|
|
a1a2650f1e | ||
|
|
07d00f26aa | ||
|
|
8d3d185e3b | ||
|
|
81a63b0c7d | ||
|
|
510be53521 | ||
|
|
4145a38c47 | ||
|
|
590b1853d0 | ||
|
|
08a51e3e09 | ||
|
|
75ebe7a4be | ||
|
|
1e0e51edd3 | ||
|
|
0ca07e4d58 | ||
|
|
1ce360ed5b | ||
|
|
172583eb03 | ||
|
|
c2b49f0174 | ||
|
|
92d62a6568 | ||
|
|
5d9d1cc09f | ||
|
|
57068b95ef | ||
|
|
5f63b24c50 | ||
|
|
81c659957e | ||
|
|
ee8dd32c04 | ||
|
|
0a755e6ecf | ||
|
|
e6c91f59ab | ||
|
|
9f947bcb5f | ||
|
|
135ccf6595 | ||
|
|
9a2a3f8db7 | ||
|
|
8ccc17f30b | ||
|
|
9392eac6a7 |
+5
-3
@@ -1,8 +1,10 @@
|
|||||||
# DESCRIPTION: Travis-CI config
|
# DESCRIPTION: Travis-CI config
|
||||||
#
|
#
|
||||||
# Copyright 2003-2019 by Todd Strader. Verilator is free software; you can
|
# Copyright 2003-2020 by Wilson Snyder. This program is free software; you
|
||||||
# redistribute it and/or modify it under the terms of either the GNU Lesser
|
# can redistribute it and/or modify it under the terms of either the GNU
|
||||||
# General Public License Version 3 or the Perl Artistic License Version 2.0.
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
|
# Version 2.0.
|
||||||
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
version: ~> 1.0
|
version: ~> 1.0
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,35 @@ Revision history for Verilator
|
|||||||
The contributors that suggested a given feature are shown in []. Thanks!
|
The contributors that suggested a given feature are shown in []. Thanks!
|
||||||
|
|
||||||
|
|
||||||
|
* Verilator 4.032 2020-04-04
|
||||||
|
|
||||||
|
*** Add column numbers to errors and warnings.
|
||||||
|
|
||||||
|
*** Add GCC 9-style line number prefix when showing source text for errors.
|
||||||
|
|
||||||
|
*** Add setting VM_PARALLEL_BUILDS=1 when using --output-split, #2185.
|
||||||
|
|
||||||
|
*** Change --quiet-exit to also suppress 'Exiting due to N errors'.
|
||||||
|
|
||||||
|
**** Suppress REALCVT for whole real numbers.
|
||||||
|
|
||||||
|
**** Support split_var in vlt files, #2219. [Marco Widmer]
|
||||||
|
|
||||||
|
**** Fix parameter type redeclaring a type, #2195. [hdzhangdoc]
|
||||||
|
|
||||||
|
**** Fix VCD open with empty filename, #2198. [Julius Baxter]
|
||||||
|
|
||||||
|
**** Fix packages as enum base types, #2202. [Driss Hafdi]
|
||||||
|
|
||||||
|
**** Fix duplicate typedefs in generate for, #2205. [hdzhangdoc]
|
||||||
|
|
||||||
|
**** Fix MinW portability, #2114. [Sean Cross]
|
||||||
|
|
||||||
|
**** Fix assertions with unique case inside, #2199. [hdzhangdoc]
|
||||||
|
|
||||||
|
**** Fix implicit conversion of floats to wide integers.
|
||||||
|
|
||||||
|
|
||||||
* Verilator 4.030 2020-03-08
|
* Verilator 4.030 2020-03-08
|
||||||
|
|
||||||
** Add split_var metacomment to assist UNOPTFLAT fixes, #2066. [Yutetsu TAKATSUKASA]
|
** Add split_var metacomment to assist UNOPTFLAT fixes, #2066. [Yutetsu TAKATSUKASA]
|
||||||
@@ -3538,10 +3567,11 @@ of input ports exists for tracing.
|
|||||||
|
|
||||||
This uses outline mode in Emacs. See C-h m [M-x describe-mode].
|
This uses outline mode in Emacs. See C-h m [M-x describe-mode].
|
||||||
|
|
||||||
Copyright 2001-2020 by Wilson Snyder. This program is free software; you
|
Copyright 2001-2020 by Wilson Snyder. This program is free software; you
|
||||||
can redistribute it and/or modify it under the terms of either the GNU
|
can redistribute it and/or modify it under the terms of either the GNU
|
||||||
Lesser General Public License Version 3 or the Perl Artistic License
|
Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
Version 2.0.
|
Version 2.0.
|
||||||
|
SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
Local variables:
|
Local variables:
|
||||||
mode: outline
|
mode: outline
|
||||||
|
|||||||
+2
-1
@@ -28,7 +28,7 @@
|
|||||||
/obj_vcs/
|
/obj_vcs/
|
||||||
/obj_vlt/
|
/obj_vlt/
|
||||||
/obj_vltmt/
|
/obj_vltmt/
|
||||||
/INCA_libs/
|
INCA_libs/
|
||||||
/cov_work/
|
/cov_work/
|
||||||
/logs/
|
/logs/
|
||||||
^Makefile$
|
^Makefile$
|
||||||
@@ -37,6 +37,7 @@ bin/verilator_bin.*
|
|||||||
bin/verilator_coverage_bin.*
|
bin/verilator_coverage_bin.*
|
||||||
docs/.*\.html$
|
docs/.*\.html$
|
||||||
docs/Makefile$
|
docs/Makefile$
|
||||||
|
docs/clang-format.txt$
|
||||||
docs/doxygen-doc/.*
|
docs/doxygen-doc/.*
|
||||||
examples/xml_py/copied/
|
examples/xml_py/copied/
|
||||||
examples/xml_py/graph.*
|
examples/xml_py/graph.*
|
||||||
|
|||||||
+3
-7
@@ -7,15 +7,11 @@
|
|||||||
#
|
#
|
||||||
#*****************************************************************************
|
#*****************************************************************************
|
||||||
#
|
#
|
||||||
# Copyright 2003-2020 by Wilson Snyder. This program is free software; you can
|
# Copyright 2003-2020 by Wilson Snyder. This program is free software; you
|
||||||
# redistribute it and/or modify it under the terms of either the GNU
|
# can redistribute it and/or modify it under the terms of either the GNU
|
||||||
# Lesser General Public License Version 3 or the Perl Artistic License
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
# Version 2.0.
|
# Version 2.0.
|
||||||
#
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
# Verilator is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
#
|
||||||
#****************************************************************************/
|
#****************************************************************************/
|
||||||
#
|
#
|
||||||
|
|||||||
+52
-24
@@ -5,11 +5,7 @@
|
|||||||
# can redistribute it and/or modify it under the terms of either the GNU
|
# can redistribute it and/or modify it under the terms of either the GNU
|
||||||
# Lesser General Public License Version 3 or the Perl Artistic License
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
# Version 2.0.
|
# Version 2.0.
|
||||||
#
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
#
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
@@ -1083,8 +1079,8 @@ and the remaining files can be compiled on parallel machines. Using
|
|||||||
design --output-split 20000 resulted in splitting into approximately
|
design --output-split 20000 resulted in splitting into approximately
|
||||||
one-minute-compile chunks.
|
one-minute-compile chunks.
|
||||||
|
|
||||||
Typically when using this, make with VM_PARALLEL_BUILDS=1, and use
|
Typically when using this, make with VM_PARALLEL_BUILDS=1 (set for you if
|
||||||
I<ccache>.
|
using the default makefiles), and use I<ccache>.
|
||||||
|
|
||||||
=item --output-split-cfuncs I<statements>
|
=item --output-split-cfuncs I<statements>
|
||||||
|
|
||||||
@@ -1273,7 +1269,8 @@ detailed description.
|
|||||||
|
|
||||||
=item --quiet-exit
|
=item --quiet-exit
|
||||||
|
|
||||||
When exiting due to an error, do not display the "Command Failed" message.
|
When exiting due to an error, do not display the "Exiting due to Errors"
|
||||||
|
nor "Command Failed" messages.
|
||||||
|
|
||||||
=item --relative-includes
|
=item --relative-includes
|
||||||
|
|
||||||
@@ -2855,7 +2852,7 @@ and range of line numbers (or all lines if omitted).
|
|||||||
For tracing_off, cells below any module in the files/ranges specified will
|
For tracing_off, cells below any module in the files/ranges specified will
|
||||||
also not be traced.
|
also not be traced.
|
||||||
|
|
||||||
=item clock_enable -module "<modulename>" -signal "<signame>"
|
=item clock_enable -module "<modulename>" -var "<signame>"
|
||||||
|
|
||||||
Indicate the signal is used to gate a clock, and the user takes responsibility
|
Indicate the signal is used to gate a clock, and the user takes responsibility
|
||||||
for insuring there are no races related to it.
|
for insuring there are no races related to it.
|
||||||
@@ -2863,13 +2860,13 @@ for insuring there are no races related to it.
|
|||||||
Same as /*verilator clock_enable*/, see L</"LANGUAGE EXTENSIONS"> for
|
Same as /*verilator clock_enable*/, see L</"LANGUAGE EXTENSIONS"> for
|
||||||
more information and an example.
|
more information and an example.
|
||||||
|
|
||||||
=item clocker -module "<modulename>" [-task "<taskname>"] -signal "<signame>"
|
=item clocker -module "<modulename>" [-task "<taskname>"] -var "<signame>"
|
||||||
|
|
||||||
=item clocker -module "<modulename>" [-function "<funcname>"] -signal "<signame>"
|
=item clocker -module "<modulename>" [-function "<funcname>"] -var "<signame>"
|
||||||
|
|
||||||
=item no_clocker -module "<modulename>" [-task "<taskname>"] -signal "<signame>"
|
=item no_clocker -module "<modulename>" [-task "<taskname>"] -var "<signame>"
|
||||||
|
|
||||||
=item no_clocker -module "<modulename>" [-function "<funcname>"] -signal "<signame>"
|
=item no_clocker -module "<modulename>" [-function "<funcname>"] -var "<signame>"
|
||||||
|
|
||||||
Indicate the signal is used as clock or not. This information is used by
|
Indicate the signal is used as clock or not. This information is used by
|
||||||
Verilator to mark the signal as clocker and propagate the clocker attribute
|
Verilator to mark the signal as clocker and propagate the clocker attribute
|
||||||
@@ -2911,9 +2908,9 @@ routines will replace the __DOT__ with the period.
|
|||||||
Same as /*verilator inline_module*/, see L</"LANGUAGE EXTENSIONS"> for
|
Same as /*verilator inline_module*/, see L</"LANGUAGE EXTENSIONS"> for
|
||||||
more information.
|
more information.
|
||||||
|
|
||||||
=item isolate_assignments -module "<modulename>" [-task "<taskname>"] -signal "<signame>"
|
=item isolate_assignments -module "<modulename>" [-task "<taskname>"] -var "<signame>"
|
||||||
|
|
||||||
=item isolate_assignments -module "<modulename>" [-function "<funcname>"] -signal "<signame>"
|
=item isolate_assignments -module "<modulename>" [-function "<funcname>"] -var "<signame>"
|
||||||
|
|
||||||
=item isolate_assignments -module "<modulename>" -function "<fname>"
|
=item isolate_assignments -module "<modulename>" -function "<fname>"
|
||||||
|
|
||||||
@@ -2948,9 +2945,9 @@ outside the task itself.
|
|||||||
Same as /*verilator no_inline_task*/, see L</"LANGUAGE EXTENSIONS">
|
Same as /*verilator no_inline_task*/, see L</"LANGUAGE EXTENSIONS">
|
||||||
for more information.
|
for more information.
|
||||||
|
|
||||||
=item sc_bv -module "<modulename>" [-task "<taskname>"] -signal "<signame>"
|
=item sc_bv -module "<modulename>" [-task "<taskname>"] -var "<signame>"
|
||||||
|
|
||||||
=item sc_bv -module "<modulename>" [-function "<funcname>"] -signal "<signame>"
|
=item sc_bv -module "<modulename>" [-function "<funcname>"] -var "<signame>"
|
||||||
|
|
||||||
Sets the port to be of sc_bv<I<width>> type, instead of bool, vluint32_t or
|
Sets the port to be of sc_bv<I<width>> type, instead of bool, vluint32_t or
|
||||||
vluint64_t. This may be useful if the port width is parameterized and
|
vluint64_t. This may be useful if the port width is parameterized and
|
||||||
@@ -2962,9 +2959,9 @@ significantly.
|
|||||||
Same as /*verilator sc_bv*/, see L</"LANGUAGE EXTENSIONS"> for more
|
Same as /*verilator sc_bv*/, see L</"LANGUAGE EXTENSIONS"> for more
|
||||||
information.
|
information.
|
||||||
|
|
||||||
=item sformat [-module "<modulename>"] [-task "<taskname>"] -signal "<signame>"
|
=item sformat [-module "<modulename>"] [-task "<taskname>"] -var "<signame>"
|
||||||
|
|
||||||
=item sformat [-module "<modulename>"] [-function "<funcname>"] -signal "<signame>"
|
=item sformat [-module "<modulename>"] [-function "<funcname>"] -var "<signame>"
|
||||||
|
|
||||||
Final input of a function or task "input string" to indicate the
|
Final input of a function or task "input string" to indicate the
|
||||||
function or task should pass all remaining arguments through
|
function or task should pass all remaining arguments through
|
||||||
@@ -2974,6 +2971,17 @@ behavior. See the test_regress/t/t_dpi_display.v file for an example.
|
|||||||
Same as /*verilator sformat*/, see L</"LANGUAGE EXTENSIONS"> for more
|
Same as /*verilator sformat*/, see L</"LANGUAGE EXTENSIONS"> for more
|
||||||
information.
|
information.
|
||||||
|
|
||||||
|
=item split_var [-module "<modulename>"] [-task "<taskname>"] -var "<varname>"
|
||||||
|
|
||||||
|
=item split_var [-module "<modulename>"] [-function "<funcname>"] -var "<varname>"
|
||||||
|
|
||||||
|
Break the variable into multiple pieces typically to resolve UNOPTFLAT
|
||||||
|
performance issues. Typically the variables to attach this to are
|
||||||
|
recommeded by Verilator itself, see UNOPTFLAT.
|
||||||
|
|
||||||
|
Same as /*verilator split_var*/, see L</"LANGUAGE EXTENSIONS"> for more
|
||||||
|
information.
|
||||||
|
|
||||||
=back
|
=back
|
||||||
|
|
||||||
|
|
||||||
@@ -3487,6 +3495,9 @@ requested but cannot occur a SPLITVAR warning is issued. Splitting large
|
|||||||
arrays may slow donw the Verilation speed, so use this only on variables
|
arrays may slow donw the Verilation speed, so use this only on variables
|
||||||
that require it.
|
that require it.
|
||||||
|
|
||||||
|
Same as C<split_var> in configuration files, see L</"CONFIGURATION FILES">
|
||||||
|
for more information.
|
||||||
|
|
||||||
=item /*verilator tag <text...>*/
|
=item /*verilator tag <text...>*/
|
||||||
|
|
||||||
Attached after a variable or structure member to indicate opaque (to
|
Attached after a variable or structure member to indicate opaque (to
|
||||||
@@ -3914,7 +3925,24 @@ checking across the designs, and prevents other users from compiling your
|
|||||||
code without knowing the magic set of disables needed to successfully
|
code without knowing the magic set of disables needed to successfully
|
||||||
compile your design.
|
compile your design.
|
||||||
|
|
||||||
List of all warnings:
|
=head2 Error and Warning Format
|
||||||
|
|
||||||
|
Warnings and errors printed by Verilator always match this regular
|
||||||
|
expression:
|
||||||
|
|
||||||
|
%(Error|Warning)(-[A-Z0-9_]+)?: ((\S+):(\d+):((\d+):)? )?.*
|
||||||
|
|
||||||
|
Errors and warning start with a percent sign (historical heritage from
|
||||||
|
Digital Equipment Corporation). Some errors or warning have a code
|
||||||
|
attached, with meanings described below. Some errors also have a filename,
|
||||||
|
line number and optional column number (starting at column 1 to match GCC).
|
||||||
|
|
||||||
|
Following an the error message, Verilator will typically show the user's
|
||||||
|
source code corresponding to the error, prefixed by the line number and a "
|
||||||
|
| ". Following this is typically an arrow and ~ pointing at the error on
|
||||||
|
the source line directly above.
|
||||||
|
|
||||||
|
=head2 List of all warnings
|
||||||
|
|
||||||
=over 4
|
=over 4
|
||||||
|
|
||||||
@@ -5359,15 +5387,15 @@ remain anonymous.
|
|||||||
|
|
||||||
The latest version is available from L<https://verilator.org>.
|
The latest version is available from L<https://verilator.org>.
|
||||||
|
|
||||||
Copyright 2003-2020 by Wilson Snyder. Verilator is free software; you can
|
Copyright 2003-2020 by Wilson Snyder. This program is free software; you can
|
||||||
redistribute it and/or modify the Verilator internals under the terms of
|
redistribute it and/or modify the Verilator internals under the terms of
|
||||||
either the GNU Lesser General Public License Version 3 or the Perl Artistic
|
either the GNU Lesser General Public License Version 3 or the Perl Artistic
|
||||||
License Version 2.0.
|
License Version 2.0.
|
||||||
|
|
||||||
All Verilog and C++/SystemC code quoted within this documentation file are
|
All Verilog and C++/SystemC code quoted within this documentation file are
|
||||||
released into the Public Domain. Many example files and test files are
|
released as Creative Commons Public Domain (CC0). Many example files and
|
||||||
likewise released into the Public Domain as described in the files
|
test files are likewise released under CC0 into effectively the Public
|
||||||
themselves.
|
Domain as described in the files themselves.
|
||||||
|
|
||||||
=head1 SEE ALSO
|
=head1 SEE ALSO
|
||||||
|
|
||||||
|
|||||||
@@ -6,11 +6,6 @@
|
|||||||
# Lesser General Public License Version 3 or the Perl Artistic License
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
# Version 2.0.
|
# Version 2.0.
|
||||||
#
|
#
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
require 5.006_001;
|
require 5.006_001;
|
||||||
@@ -269,10 +264,12 @@ Specifies a module search directory.
|
|||||||
|
|
||||||
The latest version is available from L<https://verilator.org>.
|
The latest version is available from L<https://verilator.org>.
|
||||||
|
|
||||||
Copyright 2003-2020 by Wilson Snyder. Verilator is free software; you can
|
Copyright 2003-2020 by Wilson Snyder. This program is free software; you
|
||||||
redistribute it and/or modify the Verilator internals under the terms of
|
can redistribute it and/or modify the Verilator internals under the terms
|
||||||
either the GNU Lesser General Public License Version 3 or the Perl Artistic
|
of either the GNU Lesser General Public License Version 3 or the Perl
|
||||||
License Version 2.0.
|
Artistic License Version 2.0.
|
||||||
|
|
||||||
|
SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
=head1 AUTHORS
|
=head1 AUTHORS
|
||||||
|
|
||||||
|
|||||||
@@ -233,9 +233,12 @@ Do not show differences in line numbering.
|
|||||||
|
|
||||||
The latest version is available from L<https://verilator.org>.
|
The latest version is available from L<https://verilator.org>.
|
||||||
|
|
||||||
Copyright 2005-2020 by Wilson Snyder. This package is free software; you can
|
Copyright 2005-2020 by Wilson Snyder. This program is free software; you
|
||||||
redistribute it and/or modify it under the terms of either the GNU Lesser
|
can redistribute it and/or modify it under the terms of either the GNU
|
||||||
General Public License Version 3 or the Perl Artistic License Version 2.0.
|
Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
|
Version 2.0.
|
||||||
|
|
||||||
|
SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
=head1 AUTHORS
|
=head1 AUTHORS
|
||||||
|
|
||||||
|
|||||||
+6
-3
@@ -538,9 +538,12 @@ verilator_gantt.vcd.
|
|||||||
|
|
||||||
The latest version is available from L<https://verilator.org>.
|
The latest version is available from L<https://verilator.org>.
|
||||||
|
|
||||||
Copyright 2018-2020 by Wilson Snyder. Verilator is free software; you can
|
Copyright 2018-2020 by Wilson Snyder. This program is free software; you
|
||||||
redistribute it and/or modify it under the terms of either the GNU Lesser
|
can redistribute it and/or modify it under the terms of either the GNU
|
||||||
General Public License Version 3 or the Perl Artistic License Version 2.0.
|
Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
|
Version 2.0.
|
||||||
|
|
||||||
|
SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
=head1 AUTHORS
|
=head1 AUTHORS
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
#!/usr/bin/env perl
|
#!/usr/bin/env perl
|
||||||
# DESCRIPTION: Print include statements for each ARGV
|
# DESCRIPTION: Print include statements for each ARGV
|
||||||
#
|
#
|
||||||
# Copyright 2003-2020 by Wilson Snyder. This package is free software; you can
|
# Copyright 2003-2020 by Wilson Snyder. This program is free software; you
|
||||||
# redistribute it and/or modify it under the terms of either the GNU Lesser
|
# can redistribute it and/or modify it under the terms of either the GNU
|
||||||
# General Public License Version 3 or the Perl Artistic License Version 2.0.
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
|
# Version 2.0.
|
||||||
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
require 5.005;
|
require 5.005;
|
||||||
|
|||||||
@@ -228,9 +228,12 @@ Displays this message and program version and exits.
|
|||||||
|
|
||||||
The latest version is available from L<https://verilator.org>.
|
The latest version is available from L<https://verilator.org>.
|
||||||
|
|
||||||
Copyright 2007-2020 by Wilson Snyder. Verilator is free software; you can
|
Copyright 2007-2020 by Wilson Snyder. This program is free software; you
|
||||||
redistribute it and/or modify it under the terms of either the GNU Lesser
|
can redistribute it and/or modify it under the terms of either the GNU
|
||||||
General Public License Version 3 or the Perl Artistic License Version 2.0.
|
Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
|
Version 2.0.
|
||||||
|
|
||||||
|
SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
=head1 AUTHORS
|
=head1 AUTHORS
|
||||||
|
|
||||||
|
|||||||
+3
-2
@@ -1,10 +1,11 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# DESCRIPTION: Verilator: Build script for vcddiff
|
# DESCRIPTION: Verilator: Build script for vcddiff
|
||||||
#
|
#
|
||||||
# Copyright 2019 by Todd Strader. This program is free software; you can
|
# Copyright 2019 by Todd Strader. This program is free software; you
|
||||||
# redistribute it and/or modify it under the terms of either the GNU
|
# can redistribute it and/or modify it under the terms of either the GNU
|
||||||
# Lesser General Public License Version 3 or the Perl Artistic License
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
# Version 2.0.
|
# Version 2.0.
|
||||||
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# NB: it would be better to add this via a PPA
|
# NB: it would be better to add this via a PPA
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# DESCRIPTION: Verilator: Travis CI build script
|
# DESCRIPTION: Verilator: Travis CI build script
|
||||||
#
|
#
|
||||||
# Copyright 2019 by Todd Strader. This program is free software; you can
|
# Copyright 2019 by Todd Strader. This program is free software; you
|
||||||
# redistribute it and/or modify it under the terms of either the GNU
|
# can redistribute it and/or modify it under the terms of either the GNU
|
||||||
# Lesser General Public License Version 3 or the Perl Artistic License
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
# Version 2.0.
|
# Version 2.0.
|
||||||
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
#
|
#
|
||||||
# This script builds and caches the Verilator binaries for Travis CI
|
# This script builds and caches the Verilator binaries for Travis CI
|
||||||
# (and possibly other CI platforms). The Verilator CI system uses this
|
# (and possibly other CI platforms). The Verilator CI system uses this
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
# DESCRIPTION: Dockerfile for env to build and fully test Verilator
|
# DESCRIPTION: Dockerfile for env to build and fully test Verilator
|
||||||
#
|
#
|
||||||
# Copyright 2020 by Stefan Wallentowitz. This program is free
|
# Copyright 2020 by Stefan Wallentowitz. This program is free software; you
|
||||||
# software; you can redistribute it and/or modify it under the terms
|
# can redistribute it and/or modify it under the terms of either the GNU
|
||||||
# of either the GNU Lesser General Public License Version 3 or the
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
# Perl Artistic License Version 2.0.
|
# Version 2.0.
|
||||||
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
FROM ubuntu:18.04
|
FROM ubuntu:18.04
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
= Verilator Build Environment
|
= Verilator Docker Build Environment
|
||||||
|
|
||||||
This container is set up to compile and test a Verilator build based
|
This Verilator Build container is set up to compile and test a Verilator
|
||||||
on the following parameters:
|
build. It uses the following parameters:
|
||||||
|
|
||||||
* Source repository (default: https://github.com/verilator/verilator)
|
* Source repository (default: https://github.com/verilator/verilator)
|
||||||
* Source revision (default: master)
|
* Source revision (default: master)
|
||||||
@@ -10,7 +10,7 @@ on the following parameters:
|
|||||||
The container is published as `verilator/verilator-buildenv` on
|
The container is published as `verilator/verilator-buildenv` on
|
||||||
https://hub.docker.com/repository/docker/verilator/verilator-buildenv[docker hub].
|
https://hub.docker.com/repository/docker/verilator/verilator-buildenv[docker hub].
|
||||||
|
|
||||||
To run the basic build of current master:
|
To run the basic build using the current Verilator master:
|
||||||
|
|
||||||
docker run -ti verilator/verilator-buildenv
|
docker run -ti verilator/verilator-buildenv
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ To also run tests:
|
|||||||
|
|
||||||
docker run -ti verilator/verilator-buildenv test
|
docker run -ti verilator/verilator-buildenv test
|
||||||
|
|
||||||
Change the compiler:
|
To change the compiler:
|
||||||
|
|
||||||
docker run -ti -e CC=gcc-4.8 -e CXX=g++-4.8 verilator/verilator-buildenv test
|
docker run -ti -e CC=gcc-4.8 -e CXX=g++-4.8 verilator/verilator-buildenv test
|
||||||
|
|
||||||
@@ -29,22 +29,21 @@ To run those too:
|
|||||||
docker run -ti -v ${PWD}:/tmp/repo -e REPO=/tmp/repo -e REV=`git rev-parse --short HEAD` -e CC=gcc-4.8 -e CXX=g++-4.8 --cap-add=SYS_PTRACE --security-opt seccomp=unconfined verilator/verilator-buildenv test
|
docker run -ti -v ${PWD}:/tmp/repo -e REPO=/tmp/repo -e REV=`git rev-parse --short HEAD` -e CC=gcc-4.8 -e CXX=g++-4.8 --cap-add=SYS_PTRACE --security-opt seccomp=unconfined verilator/verilator-buildenv test
|
||||||
....
|
....
|
||||||
|
|
||||||
You may want to avoid pushing your changes to a remote repository and
|
Rather then building using a remote git repository you may prefer to use a
|
||||||
instead use a local working copy. You can mount the local working copy
|
working copy on the local filesystem. Mount the local working copy path as
|
||||||
path as a volume and use this as repo. Be careful, that it can only
|
a volume and use that in place of git. When doing this be careful to have
|
||||||
use committed changes, so you may want to use a work-in-progress
|
all changes committed to the local git area. To build the current HEAD from
|
||||||
commit or so. To build the current HEAD from top of a repository:
|
top of a repository:
|
||||||
|
|
||||||
....
|
....
|
||||||
docker run -ti -v ${PWD}:/tmp/repo -e REPO=/tmp/repo -e REV=`git rev-parse --short HEAD` --cap-add=SYS_PTRACE --security-opt seccomp=unconfined verilator/verilator-buildenv test
|
docker run -ti -v ${PWD}:/tmp/repo -e REPO=/tmp/repo -e REV=`git rev-parse --short HEAD` --cap-add=SYS_PTRACE --security-opt seccomp=unconfined verilator/verilator-buildenv test
|
||||||
....
|
....
|
||||||
|
|
||||||
== Under the Hood
|
== Rebuilding
|
||||||
|
|
||||||
To rebuild the image, simply run:
|
To rebuild the Verilator-buildenv docker image, run:
|
||||||
|
|
||||||
docker build .
|
docker build .
|
||||||
|
|
||||||
It will build SystemC in all supported compiler variants to reduce the
|
This will also build SystemC under all supported compiler variants to
|
||||||
impact on testing cycles. A build script will be the entrypoint to the
|
reduce the SystemC testing time.
|
||||||
container that will perform a standard build and test procedure.
|
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
#!/bin/bash -e
|
#!/bin/bash -e
|
||||||
# DESCRIPTION: Build SystemC in Ubuntu 18.04 with different g++/gcc
|
# DESCRIPTION: Build SystemC in Ubuntu 18.04 with different g++/gcc
|
||||||
#
|
#
|
||||||
# Copyright 2020 by Stefan Wallentowitz. This program is free
|
# Copyright 2020 by Stefan Wallentowitz. This program is free software; you
|
||||||
# software; you can redistribute it and/or modify it under the terms
|
# can redistribute it and/or modify it under the terms of either the GNU
|
||||||
# of either the GNU Lesser General Public License Version 3 or the
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
# Perl Artistic License Version 2.0.
|
# Version 2.0.
|
||||||
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
build_variant () {
|
build_variant () {
|
||||||
version=$($1 --version | grep gcc | awk '{print $4}')
|
version=$($1 --version | grep gcc | awk '{print $4}')
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
#!/bin/bash -e
|
#!/bin/bash -e
|
||||||
# DESCRIPTION: Build Verilator (inside container)
|
# DESCRIPTION: Build Verilator (inside container)
|
||||||
#
|
#
|
||||||
# Copyright 2020 by Stefan Wallentowitz. This program is free
|
# Copyright 2020 by Stefan Wallentowitz. This program is free software; you
|
||||||
# software; you can redistribute it and/or modify it under the terms
|
# can redistribute it and/or modify it under the terms of either the GNU
|
||||||
# of either the GNU Lesser General Public License Version 3 or the
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
# Perl Artistic License Version 2.0.
|
# Version 2.0.
|
||||||
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
: "${REPO:=https://github.com/verilator/verilator}"
|
: "${REPO:=https://github.com/verilator/verilator}"
|
||||||
: "${REV:=master}"
|
: "${REV:=master}"
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
# DESCRIPTION: Dockerfile for image to run Verilator inside
|
# DESCRIPTION: Dockerfile for image to run Verilator inside
|
||||||
#
|
#
|
||||||
# Copyright 2020 by Stefan Wallentowitz. This program is free
|
# Copyright 2020 by Stefan Wallentowitz. This program is free software; you
|
||||||
# software; you can redistribute it and/or modify it under the terms
|
# can redistribute it and/or modify it under the terms of either the GNU
|
||||||
# of either the GNU Lesser General Public License Version 3 or the
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
# Perl Artistic License Version 2.0.
|
# Version 2.0.
|
||||||
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
FROM ubuntu:18.04
|
FROM ubuntu:18.04
|
||||||
|
|
||||||
|
|||||||
+35
-25
@@ -1,49 +1,59 @@
|
|||||||
= Docker Container as Verilator executable
|
= Verilator Executable Docker Container
|
||||||
|
|
||||||
This allows you to run Verilator easily as a docker image, e.g.:
|
The Verilator Executable Docker Container allows you to run Verilator
|
||||||
|
easily as a docker image, e.g.:
|
||||||
|
|
||||||
docker run -ti verilator/verilator:latest --version
|
docker run -ti verilator/verilator:latest --version
|
||||||
|
|
||||||
This is in particular useful to compare against older version or to
|
This will install the container, run the latest Verilator and print
|
||||||
check when an issue was introduced.
|
Verilator's version.
|
||||||
|
|
||||||
You will need to give it access to your files as a volume and fix the
|
Containers are automatically built for all released versions, so you may
|
||||||
user rights:
|
easily compare results across versions, e.g.:
|
||||||
|
|
||||||
|
docker run -ti verilator/verilator:4.030 --version
|
||||||
|
|
||||||
|
Verilator needs to read and write files on the local system. To simplify
|
||||||
|
this process, use the `verilator-docker` convenience script. This script
|
||||||
|
takes the version number, and all remaining arguments are passed through to
|
||||||
|
Verilator. e.g.:
|
||||||
|
|
||||||
|
./verilator-docker 4.030 --version
|
||||||
|
|
||||||
|
or
|
||||||
|
|
||||||
|
./verilator-docker 4.030 --cc test.v
|
||||||
|
|
||||||
|
If you prefer not to use `verilator-docker` you must give the container
|
||||||
|
access to your files as a volume with appropriate user rights. For example
|
||||||
|
to Verilate test.v:
|
||||||
|
|
||||||
....
|
....
|
||||||
docker run -ti -v ${PWD}:/work --user $(id -u):$(id -g) verilator/verilator:latest --cc test.v
|
docker run -ti -v ${PWD}:/work --user $(id -u):$(id -g) verilator/verilator:latest --cc test.v
|
||||||
....
|
....
|
||||||
|
|
||||||
The caveat is that it can only access files below the current
|
This method can only access files below the current directory. An
|
||||||
directory then, a workaround is to adopt the volume and set
|
alternative is setup the volume `-workdir`.
|
||||||
`-workdir`.
|
|
||||||
|
|
||||||
There is a convenience script in this folder that wraps around the
|
You can also work in the container by setting the entrypoint
|
||||||
docker calls:
|
|
||||||
|
|
||||||
$ verilator-docker 3.922 --version
|
|
||||||
Verilator 3.922 2018-03-17 rev UNKNOWN_REV
|
|
||||||
|
|
||||||
Finally, you can also work in the container by setting the entrypoint
|
|
||||||
(don't forget to mount a volume if you want your work persistent):
|
(don't forget to mount a volume if you want your work persistent):
|
||||||
|
|
||||||
docker run -ti --entrypoint /bin/bash verilator/verilator:latest
|
docker run -ti --entrypoint /bin/bash verilator/verilator:latest
|
||||||
|
|
||||||
The other files in this folder all for building the containers and to
|
You can also use the container to build Verilator at a specific
|
||||||
store in them. You could use it to build Verilator at a specific
|
|
||||||
commit:
|
commit:
|
||||||
|
|
||||||
docker build --build-arg SOURCE_COMMIT=<commit> .
|
docker build --build-arg SOURCE_COMMIT=<commit> .
|
||||||
|
|
||||||
== Internals
|
== Internals
|
||||||
|
|
||||||
The Dockerfile is pretty straight-forward, it builds Verilator and
|
The Dockerfile builds Verilator and removes the tree when completed to
|
||||||
removes the tree after that to reduce the image size. It sets a
|
reduce the image size. The entrypoint is set as a wrapper script
|
||||||
wrapper script (`verilator-wrap.sh`) as entrypoint. This script calls
|
(`verilator-wrap.sh`). That script 1. calls Verilator, and 2. copies the
|
||||||
Verilator but also copies the verilated runtime files to the `obj_dir`
|
Verilated runtime files to the `obj_dir` or the `-Mdir` respectively. This
|
||||||
or the `-Mdir` respectively. This allows the user to build the C++
|
allows the user to have the files to they may later build the C++ output
|
||||||
output with the matching runtime files. The wrapper patches the
|
with the matching runtime files. The wrapper also patches the Verilated
|
||||||
generated Makefile accordingly.
|
Makefile accordingly.
|
||||||
|
|
||||||
There is also a hook defined that is run by docker hub via automated
|
There is also a hook defined that is run by docker hub via automated
|
||||||
builds.
|
builds.
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# DESCRIPTION: Docker hub hook to pass SOURCE_COMMIT
|
# DESCRIPTION: Docker hub hook to pass SOURCE_COMMIT
|
||||||
#
|
#
|
||||||
# Copyright 2020 by Stefan Wallentowitz. This program is free
|
# Copyright 2020 by Stefan Wallentowitz. This program is free software; you
|
||||||
# software; you can redistribute it and/or modify it under the terms
|
# can redistribute it and/or modify it under the terms of either the GNU
|
||||||
# of either the GNU Lesser General Public License Version 3 or the
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
# Perl Artistic License Version 2.0.FROM ubuntu:18.04
|
# Version 2.0.
|
||||||
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
docker build --build-arg SOURCE_COMMIT=${SOURCE_COMMIT} -f $DOCKERFILE_PATH -t $IMAGE_NAME .
|
docker build --build-arg SOURCE_COMMIT=${SOURCE_COMMIT} -f $DOCKERFILE_PATH -t $IMAGE_NAME .
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# DESCRIPTION: Docker hub hook to tag the latest release (stable)
|
# DESCRIPTION: Docker hub hook to tag the latest release (stable)
|
||||||
#
|
#
|
||||||
# Copyright 2020 by Stefan Wallentowitz. This program is free
|
# Copyright 2020 by Stefan Wallentowitz. This program is free software; you
|
||||||
# software; you can redistribute it and/or modify it under the terms
|
# can redistribute it and/or modify it under the terms of either the GNU
|
||||||
# of either the GNU Lesser General Public License Version 3 or the
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
# Perl Artistic License Version 2.0.FROM ubuntu:18.04
|
# Version 2.0.
|
||||||
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
if [ "$SOURCE_BRANCH"="stable" ]; then
|
if [ "$SOURCE_BRANCH"="stable" ]; then
|
||||||
docker tag $IMAGE_NAME $DOCKER_REPO:latest
|
docker tag $IMAGE_NAME $DOCKER_REPO:latest
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# DESCRIPTION: Wrap a verilator call to run a docker container
|
# DESCRIPTION: Wrap a verilator call to run a docker container
|
||||||
#
|
#
|
||||||
# Copyright 2020 by Stefan Wallentowitz. This program is free
|
# Copyright 2020 by Stefan Wallentowitz. This program is free software; you
|
||||||
# software; you can redistribute it and/or modify it under the terms
|
# can redistribute it and/or modify it under the terms of either the GNU
|
||||||
# of either the GNU Lesser General Public License Version 3 or the
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
# Perl Artistic License Version 2.0.
|
# Version 2.0.
|
||||||
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
docker pull verilator/verilator:$1 >/dev/null
|
docker pull verilator/verilator:$1 >/dev/null
|
||||||
docker run -ti -v ${PWD}:/work --user $(id -u):$(id -g) verilator/verilator:$1 "${@:2}"
|
docker run -ti -v ${PWD}:/work --user $(id -u):$(id -g) verilator/verilator:$1 "${@:2}"
|
||||||
|
|||||||
@@ -1,13 +1,18 @@
|
|||||||
#!/bin/bash -e
|
#!/bin/bash
|
||||||
# DESCRIPTION: Wrap a Verilator call and copy vlt includes
|
# DESCRIPTION: Wrap a Verilator call and copy vlt includes
|
||||||
# (inside docker container)
|
# (inside docker container)
|
||||||
#
|
#
|
||||||
# Copyright 2020 by Stefan Wallentowitz. This program is free
|
# Copyright 2020 by Stefan Wallentowitz. This program is free software; you
|
||||||
# software; you can redistribute it and/or modify it under the terms
|
# can redistribute it and/or modify it under the terms of either the GNU
|
||||||
# of either the GNU Lesser General Public License Version 3 or the
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
# Perl Artistic License Version 2.0.
|
# Version 2.0.
|
||||||
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
perl /usr/local/bin/verilator "$@"
|
perl /usr/local/bin/verilator "$@"
|
||||||
|
status=$?
|
||||||
|
if [ $status -ne 0 ]; then
|
||||||
|
exit $status
|
||||||
|
fi
|
||||||
|
|
||||||
# Check if user set an obj_dir
|
# Check if user set an obj_dir
|
||||||
obj_dir=$(echo " $@" | grep -oP '\s--Mdir\s*\K\S+')
|
obj_dir=$(echo " $@" | grep -oP '\s--Mdir\s*\K\S+')
|
||||||
|
|||||||
+4
-2
@@ -1,10 +1,12 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# DESCRIPTION: Verilator: Travis CI test script
|
# DESCRIPTION: Verilator: Travis CI test script
|
||||||
#
|
#
|
||||||
# Copyright 2019 by Todd Strader. This program is free software; you can
|
# Copyright 2019 by Todd Strader. This program is free software; you
|
||||||
# redistribute it and/or modify it under the terms of either the GNU
|
# can redistribute it and/or modify it under the terms of either the GNU
|
||||||
# Lesser General Public License Version 3 or the Perl Artistic License
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
# Version 2.0.
|
# Version 2.0.
|
||||||
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
export DRIVER_FLAGS='-j 0 --quiet --rerun'
|
export DRIVER_FLAGS='-j 0 --quiet --rerun'
|
||||||
|
|||||||
+9
-4
@@ -1,12 +1,13 @@
|
|||||||
# DESCRIPTION: Process this file with autoconf to produce a configure script.
|
# DESCRIPTION: Process this file with autoconf to produce a configure script.
|
||||||
#
|
#
|
||||||
# Copyright 2003-2020 by Wilson Snyder. Verilator is free software; you can
|
# Copyright 2003-2020 by Wilson Snyder. Verilator is free software; you
|
||||||
# redistribute it and/or modify it under the terms of either the GNU Lesser
|
# can redistribute it and/or modify it under the terms of either the GNU Lesser
|
||||||
# General Public License Version 3 or the Perl Artistic License Version 2.0.
|
# General Public License Version 3 or the Perl Artistic License Version 2.0.
|
||||||
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
#AC_INIT([Verilator],[#.### YYYY-MM-DD])
|
#AC_INIT([Verilator],[#.### YYYY-MM-DD])
|
||||||
#AC_INIT([Verilator],[#.### devel])
|
#AC_INIT([Verilator],[#.### devel])
|
||||||
AC_INIT([Verilator],[4.030 2020-03-08],
|
AC_INIT([Verilator],[4.032 2020-04-04],
|
||||||
[https://verilator.org],
|
[https://verilator.org],
|
||||||
[verilator],[https://verilator.org])
|
[verilator],[https://verilator.org])
|
||||||
# When releasing, also update header of Changes file
|
# When releasing, also update header of Changes file
|
||||||
@@ -301,7 +302,6 @@ AC_SUBST(CFG_CXXFLAGS_WEXTRA)
|
|||||||
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_SRC,-Qunused-arguments)
|
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_SRC,-Qunused-arguments)
|
||||||
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_SRC,-faligned-new)
|
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_SRC,-faligned-new)
|
||||||
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_SRC,-Wno-unused-parameter)
|
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_SRC,-Wno-unused-parameter)
|
||||||
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_SRC,-Wno-undefined-bool-conversion)
|
|
||||||
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_SRC,-Wno-shadow)
|
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_SRC,-Wno-shadow)
|
||||||
AC_SUBST(CFG_CXXFLAGS_SRC)
|
AC_SUBST(CFG_CXXFLAGS_SRC)
|
||||||
|
|
||||||
@@ -369,8 +369,13 @@ AC_SUBST(CFG_LDFLAGS_SRC)
|
|||||||
# The pthread library is required by tcmalloc, so add it if it exists. If it
|
# The pthread library is required by tcmalloc, so add it if it exists. If it
|
||||||
# does not, the tcmalloc check below will fail anyway, and linking against
|
# does not, the tcmalloc check below will fail anyway, and linking against
|
||||||
# pthreads is harmless otherwise.
|
# pthreads is harmless otherwise.
|
||||||
|
CFG_LIBS="$LIBS $CFG_LIBS"
|
||||||
_MY_LDLIBS_CHECK_OPT(CFG_LIBS, -lpthread)
|
_MY_LDLIBS_CHECK_OPT(CFG_LIBS, -lpthread)
|
||||||
|
|
||||||
|
# Check libraries for MingW
|
||||||
|
_MY_LDLIBS_CHECK_OPT(CFG_LIBS, -lbcrypt)
|
||||||
|
_MY_LDLIBS_CHECK_OPT(CFG_LIBS, -lpsapi)
|
||||||
|
|
||||||
# Check if tcmalloc is available based on --enable-tcmalloc
|
# Check if tcmalloc is available based on --enable-tcmalloc
|
||||||
_MY_LDLIBS_CHECK_IFELSE(
|
_MY_LDLIBS_CHECK_IFELSE(
|
||||||
$LTCMALLOC,
|
$LTCMALLOC,
|
||||||
|
|||||||
@@ -50,13 +50,13 @@ contributions flow more efficiently.
|
|||||||
link:CONTRIBUTORS[docs/CONTRIBUTORS] and you are agreeing all future
|
link:CONTRIBUTORS[docs/CONTRIBUTORS] and you are agreeing all future
|
||||||
contributions are also certified.
|
contributions are also certified.
|
||||||
|
|
||||||
** We occasionally accept contributions where people do not want their
|
** We occasionally accept contributions where people do not want their name
|
||||||
name published. Please email us; you must still certify your
|
published. Please email us; you must still privately certify your
|
||||||
contribution using email.
|
contribution.
|
||||||
|
|
||||||
* Your test contributions are generally considered released into the public
|
* Your test contributions are generally considered released into the
|
||||||
domain, unless you request otherwise or put a GNU/Artistic license on
|
Creative Commons Public Domain (CC0), unless you request otherwise or put
|
||||||
your test file.
|
a GNU/Artistic license on your file.
|
||||||
|
|
||||||
* Most important is we get your patch. If you'd like to clean up
|
* Most important is we get your patch. If you'd like to clean up
|
||||||
indentation and related issues ahead of our feedback, that is
|
indentation and related issues ahead of our feedback, that is
|
||||||
|
|||||||
+4
-1
@@ -8,6 +8,7 @@ all.
|
|||||||
Ahmed El-Mahmoudy
|
Ahmed El-Mahmoudy
|
||||||
Alex Chadwick
|
Alex Chadwick
|
||||||
Chris Randall
|
Chris Randall
|
||||||
|
David Stanford
|
||||||
Driss Hafdi
|
Driss Hafdi
|
||||||
Eric Rippey
|
Eric Rippey
|
||||||
Garrett Smith
|
Garrett Smith
|
||||||
@@ -23,6 +24,8 @@ Kevin Kiningham
|
|||||||
Kuba Ober
|
Kuba Ober
|
||||||
Lukasz Dalek
|
Lukasz Dalek
|
||||||
Maarten De Braekeleer
|
Maarten De Braekeleer
|
||||||
|
Maciej Sobkowski
|
||||||
|
Marco Widmer
|
||||||
Matthew Ballance
|
Matthew Ballance
|
||||||
Mike Popoloski
|
Mike Popoloski
|
||||||
Patrick Stewart
|
Patrick Stewart
|
||||||
@@ -30,6 +33,7 @@ Peter Monsson
|
|||||||
Philipp Wagner
|
Philipp Wagner
|
||||||
Pieter Kapsenberg
|
Pieter Kapsenberg
|
||||||
Richard Myers
|
Richard Myers
|
||||||
|
Sean Cross
|
||||||
Sebastien Van Cauwenberghe
|
Sebastien Van Cauwenberghe
|
||||||
Stefan Wallentowitz
|
Stefan Wallentowitz
|
||||||
Tobias Rosenkranz
|
Tobias Rosenkranz
|
||||||
@@ -38,4 +42,3 @@ Todd Strader
|
|||||||
Wilson Snyder
|
Wilson Snyder
|
||||||
Yutetsu TAKATSUKASA
|
Yutetsu TAKATSUKASA
|
||||||
Yves Mathieu
|
Yves Mathieu
|
||||||
David Stanford
|
|
||||||
|
|||||||
+3
-7
@@ -7,15 +7,11 @@
|
|||||||
#
|
#
|
||||||
#*****************************************************************************
|
#*****************************************************************************
|
||||||
#
|
#
|
||||||
# Copyright 2003-2020 by Wilson Snyder. This program is free software; you can
|
# Copyright 2003-2020 by Wilson Snyder. This program is free software; you
|
||||||
# redistribute it and/or modify it under the terms of either the GNU
|
# can redistribute it and/or modify it under the terms of either the GNU
|
||||||
# Lesser General Public License Version 3 or the Perl Artistic License
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
# Version 2.0.
|
# Version 2.0.
|
||||||
#
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
# Verilator is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
#
|
||||||
#****************************************************************************/
|
#****************************************************************************/
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
|
// SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
* Language support:
|
* Language support:
|
||||||
** Fix ordering of each bit separately in a signal (mips)
|
** Fix ordering of each bit separately in a signal (mips)
|
||||||
@@ -22,17 +23,10 @@
|
|||||||
** Assertions
|
** Assertions
|
||||||
** Tristate support
|
** Tristate support
|
||||||
|
|
||||||
* Configure/Make/Install
|
|
||||||
** Distribute with flex/bison already expanded?
|
|
||||||
Flex library not needed. Probably too difficult to be worth it.
|
|
||||||
|
|
||||||
* Testing:
|
* Testing:
|
||||||
** Capture all inputs into global "rerun it" file
|
|
||||||
** Code to make wrapper that sets signals, so can do comparison checks
|
** Code to make wrapper that sets signals, so can do comparison checks
|
||||||
** New random program generator
|
** New random program generator
|
||||||
** Better graph viewer with search and zoom
|
** Better graph viewer with search and zoom
|
||||||
** Port and test against opencores.org code
|
|
||||||
** // verilator debug in code so can see only tree affecting those nodes
|
|
||||||
|
|
||||||
* Usability:
|
* Usability:
|
||||||
** Detect and pre-remove most UNOPTFLATs
|
** Detect and pre-remove most UNOPTFLATs
|
||||||
|
|||||||
@@ -0,0 +1,159 @@
|
|||||||
|
clang-format is used to standardize the indentation of the internal C++
|
||||||
|
code.
|
||||||
|
|
||||||
|
For the most part clang-format changes provide good consistency, the two
|
||||||
|
main exceptions being the indentation of preprocessor directives, and
|
||||||
|
tables of statements.
|
||||||
|
|
||||||
|
Reformatting is generally performed only before other large changes are to
|
||||||
|
be made to a file. The following files are not yet clang-format clean:
|
||||||
|
|
||||||
|
clang-format -i include/verilated.h
|
||||||
|
clang-format -i include/verilated_dpi.h
|
||||||
|
clang-format -i include/verilated_fst_c.h
|
||||||
|
clang-format -i include/verilated_heavy.h
|
||||||
|
clang-format -i include/verilated_imp.h
|
||||||
|
clang-format -i include/verilated_save.h
|
||||||
|
clang-format -i include/verilated_sym_props.h
|
||||||
|
clang-format -i include/verilated_unordered_set_map.h
|
||||||
|
clang-format -i include/verilated_vcd_c.h
|
||||||
|
clang-format -i include/verilatedos.h
|
||||||
|
|
||||||
|
clang-format -i include/verilated.cpp
|
||||||
|
clang-format -i include/verilated_cov.cpp
|
||||||
|
clang-format -i include/verilated_dpi.cpp
|
||||||
|
clang-format -i include/verilated_fst_c.cpp
|
||||||
|
clang-format -i include/verilated_save.cpp
|
||||||
|
clang-format -i include/verilated_threads.cpp
|
||||||
|
clang-format -i include/verilated_vcd_c.cpp
|
||||||
|
clang-format -i include/verilated_vpi.cpp
|
||||||
|
|
||||||
|
clang-format -i src/V3Ast.h
|
||||||
|
clang-format -i src/V3AstNodes.h
|
||||||
|
clang-format -i src/V3EmitCBase.h
|
||||||
|
clang-format -i src/V3Error.h
|
||||||
|
clang-format -i src/V3File.h
|
||||||
|
clang-format -i src/V3FileLine.h
|
||||||
|
clang-format -i src/V3Global.h
|
||||||
|
clang-format -i src/V3Graph.h
|
||||||
|
clang-format -i src/V3GraphDfa.h
|
||||||
|
clang-format -i src/V3GraphStream.h
|
||||||
|
clang-format -i src/V3Hashed.h
|
||||||
|
clang-format -i src/V3LanguageWords.h
|
||||||
|
clang-format -i src/V3LinkDot.h
|
||||||
|
clang-format -i src/V3List.h
|
||||||
|
clang-format -i src/V3Number.h
|
||||||
|
clang-format -i src/V3Options.h
|
||||||
|
clang-format -i src/V3OrderGraph.h
|
||||||
|
clang-format -i src/V3Os.h
|
||||||
|
clang-format -i src/V3ParseImp.h
|
||||||
|
clang-format -i src/V3ParseSym.h
|
||||||
|
clang-format -i src/V3Partition.h
|
||||||
|
clang-format -i src/V3PartitionGraph.h
|
||||||
|
clang-format -i src/V3PreLex.h
|
||||||
|
clang-format -i src/V3PreProc.h
|
||||||
|
clang-format -i src/V3Scoreboard.h
|
||||||
|
clang-format -i src/V3SenTree.h
|
||||||
|
clang-format -i src/V3Simulate.h
|
||||||
|
clang-format -i src/V3Stats.h
|
||||||
|
clang-format -i src/V3String.h
|
||||||
|
clang-format -i src/V3SymTable.h
|
||||||
|
clang-format -i src/V3TSP.h
|
||||||
|
clang-format -i src/V3Task.h
|
||||||
|
clang-format -i src/V3WidthCommit.h
|
||||||
|
|
||||||
|
clang-format -i src/V3Active.cpp
|
||||||
|
clang-format -i src/V3ActiveTop.cpp
|
||||||
|
clang-format -i src/V3Assert.cpp
|
||||||
|
clang-format -i src/V3AssertPre.cpp
|
||||||
|
clang-format -i src/V3Ast.cpp
|
||||||
|
clang-format -i src/V3AstNodes.cpp
|
||||||
|
clang-format -i src/V3Begin.cpp
|
||||||
|
clang-format -i src/V3Branch.cpp
|
||||||
|
clang-format -i src/V3Broken.cpp
|
||||||
|
clang-format -i src/V3CCtors.cpp
|
||||||
|
clang-format -i src/V3Case.cpp
|
||||||
|
clang-format -i src/V3Cast.cpp
|
||||||
|
clang-format -i src/V3Cdc.cpp
|
||||||
|
clang-format -i src/V3Changed.cpp
|
||||||
|
clang-format -i src/V3Clean.cpp
|
||||||
|
clang-format -i src/V3Clock.cpp
|
||||||
|
clang-format -i src/V3Combine.cpp
|
||||||
|
clang-format -i src/V3Const.cpp
|
||||||
|
clang-format -i src/V3Coverage.cpp
|
||||||
|
clang-format -i src/V3CoverageJoin.cpp
|
||||||
|
clang-format -i src/V3Dead.cpp
|
||||||
|
clang-format -i src/V3Delayed.cpp
|
||||||
|
clang-format -i src/V3Depth.cpp
|
||||||
|
clang-format -i src/V3DepthBlock.cpp
|
||||||
|
clang-format -i src/V3EmitC.cpp
|
||||||
|
clang-format -i src/V3EmitCInlines.cpp
|
||||||
|
clang-format -i src/V3EmitCMake.cpp
|
||||||
|
clang-format -i src/V3EmitCSyms.cpp
|
||||||
|
clang-format -i src/V3EmitMk.cpp
|
||||||
|
clang-format -i src/V3EmitV.cpp
|
||||||
|
clang-format -i src/V3EmitXml.cpp
|
||||||
|
clang-format -i src/V3Error.cpp
|
||||||
|
clang-format -i src/V3Expand.cpp
|
||||||
|
clang-format -i src/V3File.cpp
|
||||||
|
clang-format -i src/V3FileLine.cpp
|
||||||
|
clang-format -i src/V3Gate.cpp
|
||||||
|
clang-format -i src/V3GenClk.cpp
|
||||||
|
clang-format -i src/V3Graph.cpp
|
||||||
|
clang-format -i src/V3GraphAcyc.cpp
|
||||||
|
clang-format -i src/V3GraphAlg.cpp
|
||||||
|
clang-format -i src/V3GraphDfa.cpp
|
||||||
|
clang-format -i src/V3GraphPathChecker.cpp
|
||||||
|
clang-format -i src/V3GraphTest.cpp
|
||||||
|
clang-format -i src/V3Hashed.cpp
|
||||||
|
clang-format -i src/V3Inline.cpp
|
||||||
|
clang-format -i src/V3Inst.cpp
|
||||||
|
clang-format -i src/V3InstrCount.cpp
|
||||||
|
clang-format -i src/V3Life.cpp
|
||||||
|
clang-format -i src/V3LifePost.cpp
|
||||||
|
clang-format -i src/V3LinkCells.cpp
|
||||||
|
clang-format -i src/V3LinkDot.cpp
|
||||||
|
clang-format -i src/V3LinkJump.cpp
|
||||||
|
clang-format -i src/V3LinkLValue.cpp
|
||||||
|
clang-format -i src/V3LinkLevel.cpp
|
||||||
|
clang-format -i src/V3LinkParse.cpp
|
||||||
|
clang-format -i src/V3LinkResolve.cpp
|
||||||
|
clang-format -i src/V3Localize.cpp
|
||||||
|
clang-format -i src/V3Name.cpp
|
||||||
|
clang-format -i src/V3Number.cpp
|
||||||
|
clang-format -i src/V3Number_test.cpp
|
||||||
|
clang-format -i src/V3Options.cpp
|
||||||
|
clang-format -i src/V3Order.cpp
|
||||||
|
clang-format -i src/V3Os.cpp
|
||||||
|
clang-format -i src/V3Param.cpp
|
||||||
|
clang-format -i src/V3ParseGrammar.cpp
|
||||||
|
clang-format -i src/V3ParseImp.cpp
|
||||||
|
clang-format -i src/V3ParseLex.cpp
|
||||||
|
clang-format -i src/V3Partition.cpp
|
||||||
|
clang-format -i src/V3PreProc.cpp
|
||||||
|
clang-format -i src/V3PreShell.cpp
|
||||||
|
clang-format -i src/V3Premit.cpp
|
||||||
|
clang-format -i src/V3ProtectLib.cpp
|
||||||
|
clang-format -i src/V3Reloop.cpp
|
||||||
|
clang-format -i src/V3Scope.cpp
|
||||||
|
clang-format -i src/V3Scoreboard.cpp
|
||||||
|
clang-format -i src/V3Slice.cpp
|
||||||
|
clang-format -i src/V3Split.cpp
|
||||||
|
clang-format -i src/V3SplitAs.cpp
|
||||||
|
clang-format -i src/V3SplitVar.cpp
|
||||||
|
clang-format -i src/V3Stats.cpp
|
||||||
|
clang-format -i src/V3StatsReport.cpp
|
||||||
|
clang-format -i src/V3String.cpp
|
||||||
|
clang-format -i src/V3Subst.cpp
|
||||||
|
clang-format -i src/V3TSP.cpp
|
||||||
|
clang-format -i src/V3Table.cpp
|
||||||
|
clang-format -i src/V3Task.cpp
|
||||||
|
clang-format -i src/V3Trace.cpp
|
||||||
|
clang-format -i src/V3TraceDecl.cpp
|
||||||
|
clang-format -i src/V3Tristate.cpp
|
||||||
|
clang-format -i src/V3Undriven.cpp
|
||||||
|
clang-format -i src/V3Unknown.cpp
|
||||||
|
clang-format -i src/V3Unroll.cpp
|
||||||
|
clang-format -i src/V3Width.cpp
|
||||||
|
clang-format -i src/V3WidthSel.cpp
|
||||||
|
clang-format -i src/Verilator.cpp
|
||||||
@@ -303,3 +303,4 @@ or https://verilator.org/verilator_doc.pdf[Verilator manual (PDF)].
|
|||||||
Copyright 2008-2020 by Wilson Snyder. Verilator is free software; you can
|
Copyright 2008-2020 by Wilson Snyder. Verilator is free software; you can
|
||||||
redistribute it and/or modify it under the terms of either the GNU Lesser
|
redistribute it and/or modify it under the terms of either the GNU Lesser
|
||||||
General Public License Version 3 or the Perl Artistic License Version 2.0.
|
General Public License Version 3 or the Perl Artistic License Version 2.0.
|
||||||
|
// SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|||||||
@@ -998,3 +998,4 @@ list in `src/Makefile_obj.in` and reconfigure.
|
|||||||
Copyright 2008-2020 by Wilson Snyder. Verilator is free software; you can
|
Copyright 2008-2020 by Wilson Snyder. Verilator is free software; you can
|
||||||
redistribute it and/or modify it under the terms of either the GNU Lesser
|
redistribute it and/or modify it under the terms of either the GNU Lesser
|
||||||
General Public License Version 3 or the Perl Artistic License Version 2.0.
|
General Public License Version 3 or the Perl Artistic License Version 2.0.
|
||||||
|
// SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|||||||
@@ -63,3 +63,10 @@ each describing the contents of that module, and a single `<typetable>`...
|
|||||||
`</typetable>` element which lists all used types used within the
|
`</typetable>` element which lists all used types used within the
|
||||||
modules. Each type has a numeric `id` attribute that is referred to by
|
modules. Each type has a numeric `id` attribute that is referred to by
|
||||||
elements in the `<module>` elements using the `dtype_id` attribute.
|
elements in the `<module>` elements using the `dtype_id` attribute.
|
||||||
|
|
||||||
|
== Distribution
|
||||||
|
|
||||||
|
Copyright 2020-2020 by Wilson Snyder. Verilator is free software; you can
|
||||||
|
redistribute it and/or modify it under the terms of either the GNU Lesser
|
||||||
|
General Public License Version 3 or the Perl Artistic License Version 2.0.
|
||||||
|
// SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|||||||
@@ -5,10 +5,11 @@
|
|||||||
# This is an example cmake script to build a verilog to systemc project
|
# This is an example cmake script to build a verilog to systemc project
|
||||||
# using cmake and verilator.
|
# using cmake and verilator.
|
||||||
#
|
#
|
||||||
# Copyright 2003-2020 by Wilson Snyder. This program is free software; you can
|
# Copyright 2003-2020 by Wilson Snyder. This program is free software; you
|
||||||
# redistribute it and/or modify it under the terms of either the GNU
|
# can redistribute it and/or modify it under the terms of either the GNU
|
||||||
# Lesser General Public License Version 3 or the Perl Artistic License
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
# Version 2.0.
|
# Version 2.0.
|
||||||
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
#
|
#
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
|
|||||||
@@ -6,10 +6,11 @@
|
|||||||
# This makefile is here for testing the examples and should
|
# This makefile is here for testing the examples and should
|
||||||
# generally not be added to a CMake project.
|
# generally not be added to a CMake project.
|
||||||
#
|
#
|
||||||
# Copyright 2003-2020 by Wilson Snyder. This program is free software; you can
|
# Copyright 2003-2020 by Wilson Snyder. This program is free software; you
|
||||||
# redistribute it and/or modify it under the terms of either the GNU
|
# can redistribute it and/or modify it under the terms of either the GNU
|
||||||
# Lesser General Public License Version 3 or the Perl Artistic License
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
# Version 2.0.
|
# Version 2.0.
|
||||||
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
#
|
#
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
|
|||||||
@@ -5,10 +5,11 @@
|
|||||||
# This is an example cmake script to build a verilog to SystemC project
|
# This is an example cmake script to build a verilog to SystemC project
|
||||||
# using CMake and Verilator.
|
# using CMake and Verilator.
|
||||||
#
|
#
|
||||||
# Copyright 2003-2020 by Wilson Snyder. This program is free software; you can
|
# Copyright 2003-2020 by Wilson Snyder. This program is free software; you
|
||||||
# redistribute it and/or modify it under the terms of either the GNU
|
# can redistribute it and/or modify it under the terms of either the GNU
|
||||||
# Lesser General Public License Version 3 or the Perl Artistic License
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
# Version 2.0.
|
# Version 2.0.
|
||||||
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
#
|
#
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
|
|||||||
@@ -6,10 +6,11 @@
|
|||||||
# This makefile is here for testing the examples and should
|
# This makefile is here for testing the examples and should
|
||||||
# generally not be added to a CMake project.
|
# generally not be added to a CMake project.
|
||||||
#
|
#
|
||||||
# Copyright 2003-2020 by Wilson Snyder. This program is free software; you can
|
# Copyright 2003-2020 by Wilson Snyder. This program is free software; you
|
||||||
# redistribute it and/or modify it under the terms of either the GNU
|
# can redistribute it and/or modify it under the terms of either the GNU
|
||||||
# Lesser General Public License Version 3 or the Perl Artistic License
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
# Version 2.0.
|
# Version 2.0.
|
||||||
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
#
|
#
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
|
|||||||
@@ -5,10 +5,11 @@
|
|||||||
# This is an example cmake script to build a verilog to systemc project
|
# This is an example cmake script to build a verilog to systemc project
|
||||||
# using cmake and verilator.
|
# using cmake and verilator.
|
||||||
#
|
#
|
||||||
# Copyright 2003-2020 by Wilson Snyder. This program is free software; you can
|
# Copyright 2003-2020 by Wilson Snyder. This program is free software; you
|
||||||
# redistribute it and/or modify it under the terms of either the GNU
|
# can redistribute it and/or modify it under the terms of either the GNU
|
||||||
# Lesser General Public License Version 3 or the Perl Artistic License
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
# Version 2.0.
|
# Version 2.0.
|
||||||
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
#
|
#
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
|
|||||||
@@ -6,10 +6,11 @@
|
|||||||
# This makefile is here for testing the examples and should
|
# This makefile is here for testing the examples and should
|
||||||
# generally not be added to a CMake project.
|
# generally not be added to a CMake project.
|
||||||
#
|
#
|
||||||
# Copyright 2003-2020 by Wilson Snyder. This program is free software; you can
|
# Copyright 2003-2020 by Wilson Snyder. This program is free software; you
|
||||||
# redistribute it and/or modify it under the terms of either the GNU
|
# can redistribute it and/or modify it under the terms of either the GNU
|
||||||
# Lesser General Public License Version 3 or the Perl Artistic License
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
# Version 2.0.
|
# Version 2.0.
|
||||||
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
#
|
#
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
|
|||||||
@@ -5,10 +5,11 @@
|
|||||||
# This is an example cmake script to build a verilog to systemc project
|
# This is an example cmake script to build a verilog to systemc project
|
||||||
# using cmake and verilator.
|
# using cmake and verilator.
|
||||||
#
|
#
|
||||||
# Copyright 2003-2020 by Wilson Snyder. This program is free software; you can
|
# Copyright 2003-2020 by Wilson Snyder. This program is free software; you
|
||||||
# redistribute it and/or modify it under the terms of either the GNU
|
# can redistribute it and/or modify it under the terms of either the GNU
|
||||||
# Lesser General Public License Version 3 or the Perl Artistic License
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
# Version 2.0.
|
# Version 2.0.
|
||||||
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
#
|
#
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
|
|||||||
@@ -6,10 +6,11 @@
|
|||||||
# This makefile is here for testing the examples and should
|
# This makefile is here for testing the examples and should
|
||||||
# generally not be added to a CMake project.
|
# generally not be added to a CMake project.
|
||||||
#
|
#
|
||||||
# Copyright 2003-2020 by Wilson Snyder. This program is free software; you can
|
# Copyright 2003-2020 by Wilson Snyder. This program is free software; you
|
||||||
# redistribute it and/or modify it under the terms of either the GNU
|
# can redistribute it and/or modify it under the terms of either the GNU
|
||||||
# Lesser General Public License Version 3 or the Perl Artistic License
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
# Version 2.0.
|
# Version 2.0.
|
||||||
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
#
|
#
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
|
|||||||
@@ -5,10 +5,11 @@
|
|||||||
# This is an example cmake script to build a verilog to SystemC project
|
# This is an example cmake script to build a verilog to SystemC project
|
||||||
# using CMake and Verilator.
|
# using CMake and Verilator.
|
||||||
#
|
#
|
||||||
# Copyright 2003-2020 by Wilson Snyder. This program is free software; you can
|
# Copyright 2003-2020 by Wilson Snyder. This program is free software; you
|
||||||
# redistribute it and/or modify it under the terms of either the GNU
|
# can redistribute it and/or modify it under the terms of either the GNU
|
||||||
# Lesser General Public License Version 3 or the Perl Artistic License
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
# Version 2.0.
|
# Version 2.0.
|
||||||
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
#
|
#
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
|
|||||||
@@ -6,10 +6,11 @@
|
|||||||
# This makefile is here for testing the examples and should
|
# This makefile is here for testing the examples and should
|
||||||
# generally not be added to a CMake project.
|
# generally not be added to a CMake project.
|
||||||
#
|
#
|
||||||
# Copyright 2003-2020 by Wilson Snyder. This program is free software; you can
|
# Copyright 2003-2020 by Wilson Snyder. This program is free software; you
|
||||||
# redistribute it and/or modify it under the terms of either the GNU
|
# can redistribute it and/or modify it under the terms of either the GNU
|
||||||
# Lesser General Public License Version 3 or the Perl Artistic License
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
# Version 2.0.
|
# Version 2.0.
|
||||||
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
#
|
#
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
|
|||||||
@@ -5,10 +5,11 @@
|
|||||||
# This calls the object directory makefile. That allows the objects to
|
# This calls the object directory makefile. That allows the objects to
|
||||||
# be placed in the "current directory" which simplifies the Makefile.
|
# be placed in the "current directory" which simplifies the Makefile.
|
||||||
#
|
#
|
||||||
# Copyright 2003-2020 by Wilson Snyder. This program is free software; you can
|
# Copyright 2003-2020 by Wilson Snyder. This program is free software; you
|
||||||
# redistribute it and/or modify it under the terms of either the GNU
|
# can redistribute it and/or modify it under the terms of either the GNU
|
||||||
# Lesser General Public License Version 3 or the Perl Artistic License
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
# Version 2.0.
|
# Version 2.0.
|
||||||
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
#
|
#
|
||||||
######################################################################
|
######################################################################
|
||||||
# Check for sanity to avoid later confusion
|
# Check for sanity to avoid later confusion
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
// DESCRIPTION: Verilator: Verilog example module
|
// DESCRIPTION: Verilator: Verilog example module
|
||||||
//
|
//
|
||||||
// This file ONLY is placed into the Public Domain, for any use,
|
// This file ONLY is placed under the Creative Commons Public Domain, for
|
||||||
// without warranty, 2017 by Wilson Snyder.
|
// any use, without warranty, 2017 by Wilson Snyder.
|
||||||
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
//======================================================================
|
//======================================================================
|
||||||
|
|
||||||
// Include common routines
|
// Include common routines
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
// DESCRIPTION: Verilator: Verilog example module
|
// DESCRIPTION: Verilator: Verilog example module
|
||||||
//
|
//
|
||||||
// This file ONLY is placed into the Public Domain, for any use,
|
// This file ONLY is placed under the Creative Commons Public Domain, for
|
||||||
// without warranty, 2017 by Wilson Snyder.
|
// any use, without warranty, 2017 by Wilson Snyder.
|
||||||
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
// See also the EXAMPLE section in the verilator manpage/document.
|
// See also the EXAMPLE section in the verilator manpage/document.
|
||||||
module top;
|
module top;
|
||||||
|
|||||||
@@ -5,10 +5,11 @@
|
|||||||
# This calls the object directory makefile. That allows the objects to
|
# This calls the object directory makefile. That allows the objects to
|
||||||
# be placed in the "current directory" which simplifies the Makefile.
|
# be placed in the "current directory" which simplifies the Makefile.
|
||||||
#
|
#
|
||||||
# Copyright 2003-2020 by Wilson Snyder. This program is free software; you can
|
# Copyright 2003-2020 by Wilson Snyder. This program is free software; you
|
||||||
# redistribute it and/or modify it under the terms of either the GNU
|
# can redistribute it and/or modify it under the terms of either the GNU
|
||||||
# Lesser General Public License Version 3 or the Perl Artistic License
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
# Version 2.0.
|
# Version 2.0.
|
||||||
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
#
|
#
|
||||||
######################################################################
|
######################################################################
|
||||||
# Check for sanity to avoid later confusion
|
# Check for sanity to avoid later confusion
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
// -*- SystemC -*-
|
// -*- SystemC -*-
|
||||||
// DESCRIPTION: Verilator Example: Top level main for invoking SystemC model
|
// DESCRIPTION: Verilator Example: Top level main for invoking SystemC model
|
||||||
//
|
//
|
||||||
// This file ONLY is placed into the Public Domain, for any use,
|
// This file ONLY is placed under the Creative Commons Public Domain, for
|
||||||
// without warranty, 2017 by Wilson Snyder.
|
// any use, without warranty, 2017 by Wilson Snyder.
|
||||||
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
//======================================================================
|
//======================================================================
|
||||||
|
|
||||||
// SystemC global header
|
// SystemC global header
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
// DESCRIPTION: Verilator: Verilog example module
|
// DESCRIPTION: Verilator: Verilog example module
|
||||||
//
|
//
|
||||||
// This file ONLY is placed into the Public Domain, for any use,
|
// This file ONLY is placed under the Creative Commons Public Domain, for
|
||||||
// without warranty, 2017 by Wilson Snyder.
|
// any use, without warranty, 2017 by Wilson Snyder.
|
||||||
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
// See also the EXAMPLE section in the verilator manpage/document.
|
// See also the EXAMPLE section in the verilator manpage/document.
|
||||||
module top;
|
module top;
|
||||||
|
|||||||
@@ -5,10 +5,11 @@
|
|||||||
# This calls the object directory makefiles. That allows the objects to
|
# This calls the object directory makefiles. That allows the objects to
|
||||||
# be placed in the "current directory" which simplifies the Makefile.
|
# be placed in the "current directory" which simplifies the Makefile.
|
||||||
#
|
#
|
||||||
# Copyright 2019 by Todd Strader. This program is free software; you can
|
# Copyright 2019 by Wilson Snyder. This program is free software; you
|
||||||
# redistribute it and/or modify it under the terms of either the GNU
|
# can redistribute it and/or modify it under the terms of either the GNU
|
||||||
# Lesser General Public License Version 3 or the Perl Artistic License
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
# Version 2.0.
|
# Version 2.0.
|
||||||
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
#
|
#
|
||||||
######################################################################
|
######################################################################
|
||||||
# Check for sanity to avoid later confusion
|
# Check for sanity to avoid later confusion
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
// DESCRIPTION: Verilator: --protect-lib example secret module
|
// DESCRIPTION: Verilator: --protect-lib example secret module
|
||||||
//
|
//
|
||||||
// This file ONLY is placed into the Public Domain, for any use,
|
// This file ONLY is placed under the Creative Commons Public Domain, for
|
||||||
// without warranty, 2019 by Todd Strader.
|
// any use, without warranty, 2019 by Todd Strader.
|
||||||
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
// This module will be used as libsecret.a or libsecret.so without
|
// This module will be used as libsecret.a or libsecret.so without
|
||||||
// exposing the source.
|
// exposing the source.
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
// DESCRIPTION: Verilator: --protect-lib example module
|
// DESCRIPTION: Verilator: --protect-lib example module
|
||||||
//
|
//
|
||||||
// This file ONLY is placed into the Public Domain, for any use,
|
// This file ONLY is placed under the Creative Commons Public Domain, for
|
||||||
// without warranty, 2019 by Todd Strader.
|
// any use, without warranty, 2019 by Todd Strader.
|
||||||
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
//======================================================================
|
//======================================================================
|
||||||
|
|
||||||
// See examples/tracing_c for notes on tracing
|
// See examples/tracing_c for notes on tracing
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
// DESCRIPTION: Verilator: --protect-lib example module
|
// DESCRIPTION: Verilator: --protect-lib example module
|
||||||
//
|
//
|
||||||
// This file ONLY is placed into the Public Domain, for any use,
|
// This file ONLY is placed under the Creative Commons Public Domain, for
|
||||||
// without warranty, 2019 by Todd Strader.
|
// any use, without warranty, 2019 by Todd Strader.
|
||||||
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
// See also the EXAMPLE section in the verilator manpage/document.
|
// See also the EXAMPLE section in the verilator manpage/document.
|
||||||
module top (input clk);
|
module top (input clk);
|
||||||
|
|||||||
@@ -5,10 +5,11 @@
|
|||||||
# This calls the object directory makefile. That allows the objects to
|
# This calls the object directory makefile. That allows the objects to
|
||||||
# be placed in the "current directory" which simplifies the Makefile.
|
# be placed in the "current directory" which simplifies the Makefile.
|
||||||
#
|
#
|
||||||
# Copyright 2003-2020 by Wilson Snyder. This program is free software; you can
|
# Copyright 2003-2020 by Wilson Snyder. This program is free software; you
|
||||||
# redistribute it and/or modify it under the terms of either the GNU
|
# can redistribute it and/or modify it under the terms of either the GNU
|
||||||
# Lesser General Public License Version 3 or the Perl Artistic License
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
# Version 2.0.
|
# Version 2.0.
|
||||||
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
#
|
#
|
||||||
######################################################################
|
######################################################################
|
||||||
# Check for sanity to avoid later confusion
|
# Check for sanity to avoid later confusion
|
||||||
|
|||||||
@@ -5,10 +5,11 @@
|
|||||||
#
|
#
|
||||||
# This is executed in the object directory, and called by ../Makefile
|
# This is executed in the object directory, and called by ../Makefile
|
||||||
#
|
#
|
||||||
# Copyright 2003-2020 by Wilson Snyder. This program is free software; you can
|
# Copyright 2003-2020 by Wilson Snyder. This program is free software; you
|
||||||
# redistribute it and/or modify it under the terms of either the GNU
|
# can redistribute it and/or modify it under the terms of either the GNU
|
||||||
# Lesser General Public License Version 3 or the Perl Artistic License
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
# Version 2.0.
|
# Version 2.0.
|
||||||
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
#
|
#
|
||||||
#######################################################################
|
#######################################################################
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
// DESCRIPTION: Verilator: Verilog example module
|
// DESCRIPTION: Verilator: Verilog example module
|
||||||
//
|
//
|
||||||
// This file ONLY is placed into the Public Domain, for any use,
|
// This file ONLY is placed under the Creative Commons Public Domain, for
|
||||||
// without warranty, 2017 by Wilson Snyder.
|
// any use, without warranty, 2017 by Wilson Snyder.
|
||||||
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
//======================================================================
|
//======================================================================
|
||||||
|
|
||||||
// Include common routines
|
// Include common routines
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
// DESCRIPTION: Verilator: Verilog Test module
|
// DESCRIPTION: Verilator: Verilog Test module
|
||||||
//
|
//
|
||||||
// This file ONLY is placed into the Public Domain, for any use,
|
// This file ONLY is placed under the Creative Commons Public Domain, for
|
||||||
// without warranty, 2003 by Wilson Snyder.
|
// any use, without warranty, 2003 by Wilson Snyder.
|
||||||
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
// ======================================================================
|
// ======================================================================
|
||||||
|
|
||||||
module sub
|
module sub
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
// DESCRIPTION: Verilator: Verilog example module
|
// DESCRIPTION: Verilator: Verilog example module
|
||||||
//
|
//
|
||||||
// This file ONLY is placed into the Public Domain, for any use,
|
// This file ONLY is placed under the Creative Commons Public Domain, for
|
||||||
// without warranty, 2003 by Wilson Snyder.
|
// any use, without warranty, 2003 by Wilson Snyder.
|
||||||
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
// ======================================================================
|
// ======================================================================
|
||||||
|
|
||||||
// This is intended to be a complex example of several features, please also
|
// This is intended to be a complex example of several features, please also
|
||||||
|
|||||||
@@ -5,10 +5,11 @@
|
|||||||
# This calls the object directory makefile. That allows the objects to
|
# This calls the object directory makefile. That allows the objects to
|
||||||
# be placed in the "current directory" which simplifies the Makefile.
|
# be placed in the "current directory" which simplifies the Makefile.
|
||||||
#
|
#
|
||||||
# Copyright 2003-2020 by Wilson Snyder. This program is free software; you can
|
# Copyright 2003-2020 by Wilson Snyder. This program is free software; you
|
||||||
# redistribute it and/or modify it under the terms of either the GNU
|
# can redistribute it and/or modify it under the terms of either the GNU
|
||||||
# Lesser General Public License Version 3 or the Perl Artistic License
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
# Version 2.0.
|
# Version 2.0.
|
||||||
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
#
|
#
|
||||||
######################################################################
|
######################################################################
|
||||||
# Check for sanity to avoid later confusion
|
# Check for sanity to avoid later confusion
|
||||||
|
|||||||
@@ -5,10 +5,11 @@
|
|||||||
#
|
#
|
||||||
# This is executed in the object directory, and called by ../Makefile
|
# This is executed in the object directory, and called by ../Makefile
|
||||||
#
|
#
|
||||||
# Copyright 2003-2020 by Wilson Snyder. This program is free software; you can
|
# Copyright 2003-2020 by Wilson Snyder. This program is free software; you
|
||||||
# redistribute it and/or modify it under the terms of either the GNU
|
# can redistribute it and/or modify it under the terms of either the GNU
|
||||||
# Lesser General Public License Version 3 or the Perl Artistic License
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
# Version 2.0.
|
# Version 2.0.
|
||||||
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
#
|
#
|
||||||
#######################################################################
|
#######################################################################
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
// -*- SystemC -*-
|
// -*- SystemC -*-
|
||||||
// DESCRIPTION: Verilator Example: Top level main for invoking SystemC model
|
// DESCRIPTION: Verilator Example: Top level main for invoking SystemC model
|
||||||
//
|
//
|
||||||
// This file ONLY is placed into the Public Domain, for any use,
|
// This file ONLY is placed under the Creative Commons Public Domain, for
|
||||||
// without warranty, 2017 by Wilson Snyder.
|
// any use, without warranty, 2017 by Wilson Snyder.
|
||||||
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
//======================================================================
|
//======================================================================
|
||||||
|
|
||||||
// SystemC global header
|
// SystemC global header
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
// DESCRIPTION: Verilator: Verilog Test module
|
// DESCRIPTION: Verilator: Verilog Test module
|
||||||
//
|
//
|
||||||
// This file ONLY is placed into the Public Domain, for any use,
|
// This file ONLY is placed under the Creative Commons Public Domain, for
|
||||||
// without warranty, 2003 by Wilson Snyder.
|
// any use, without warranty, 2003 by Wilson Snyder.
|
||||||
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
// ======================================================================
|
// ======================================================================
|
||||||
|
|
||||||
module sub
|
module sub
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
// DESCRIPTION: Verilator: Verilog example module
|
// DESCRIPTION: Verilator: Verilog example module
|
||||||
//
|
//
|
||||||
// This file ONLY is placed into the Public Domain, for any use,
|
// This file ONLY is placed under the Creative Commons Public Domain, for
|
||||||
// without warranty, 2003 by Wilson Snyder.
|
// any use, without warranty, 2003 by Wilson Snyder.
|
||||||
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
// ======================================================================
|
// ======================================================================
|
||||||
|
|
||||||
// This is intended to be a complex example of several features, please also
|
// This is intended to be a complex example of several features, please also
|
||||||
|
|||||||
@@ -2,10 +2,11 @@
|
|||||||
#
|
#
|
||||||
# DESCRIPTION: Verilator Example: XML tests
|
# DESCRIPTION: Verilator Example: XML tests
|
||||||
#
|
#
|
||||||
# Copyright 2003-2020 by Wilson Snyder. This program is free software; you can
|
# Copyright 2003-2020 by Wilson Snyder. This program is free software; you
|
||||||
# redistribute it and/or modify it under the terms of either the GNU
|
# can redistribute it and/or modify it under the terms of either the GNU
|
||||||
# Lesser General Public License Version 3 or the Perl Artistic License
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
# Version 2.0.
|
# Version 2.0.
|
||||||
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
#
|
#
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
// DESCRIPTION: Verilator: Verilog Test module
|
// DESCRIPTION: Verilator: Verilog Test module
|
||||||
//
|
//
|
||||||
// This file ONLY is placed into the Public Domain, for any use,
|
// This file ONLY is placed under the Creative Commons Public Domain, for
|
||||||
// without warranty, 2019 by Wilson Snyder.
|
// any use, without warranty, 2019 by Wilson Snyder.
|
||||||
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
// ======================================================================
|
// ======================================================================
|
||||||
|
|
||||||
module sub
|
module sub
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
// DESCRIPTION: Verilator: Verilog example module
|
// DESCRIPTION: Verilator: Verilog example module
|
||||||
//
|
//
|
||||||
// This file ONLY is placed into the Public Domain, for any use,
|
// This file ONLY is placed under the Creative Commons Public Domain, for
|
||||||
// without warranty, 2019 by Wilson Snyder.
|
// any use, without warranty, 2019 by Wilson Snyder.
|
||||||
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
// ======================================================================
|
// ======================================================================
|
||||||
|
|
||||||
module top
|
module top
|
||||||
|
|||||||
@@ -84,8 +84,10 @@ Example usage:
|
|||||||
-v <filename> Verilog library
|
-v <filename> Verilog library
|
||||||
-y <dir> Directory to search for modules
|
-y <dir> Directory to search for modules
|
||||||
|
|
||||||
This file ONLY is placed into the Public Domain, for any use, without
|
This file ONLY is placed under the Creative Commons Public Domain, for
|
||||||
warranty, 2019 by Wilson Snyder."""
|
any use, without warranty, 2019 by Wilson Snyder.
|
||||||
|
SPDX-License-Identifier: CC0-1.0
|
||||||
|
"""
|
||||||
)
|
)
|
||||||
parser.add_argument('-debug', '--debug',
|
parser.add_argument('-debug', '--debug',
|
||||||
action='store_const', const=9,
|
action='store_const', const=9,
|
||||||
|
|||||||
@@ -108,8 +108,10 @@ Example usage:
|
|||||||
-v <filename> Verilog library
|
-v <filename> Verilog library
|
||||||
-y <dir> Directory to search for modules
|
-y <dir> Directory to search for modules
|
||||||
|
|
||||||
This file ONLY is placed into the Public Domain, for any use, without
|
This file ONLY is placed under the Creative Commons Public Domain, for
|
||||||
warranty, 2019 by Wilson Snyder."""
|
any use, without warranty, 2019 by Wilson Snyder.
|
||||||
|
SPDX-License-Identifier: CC0-1.0
|
||||||
|
"""
|
||||||
)
|
)
|
||||||
parser.add_argument('-debug', '--debug',
|
parser.add_argument('-debug', '--debug',
|
||||||
action='store_const', const=9,
|
action='store_const', const=9,
|
||||||
|
|||||||
@@ -22,6 +22,8 @@
|
|||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
THE SOFTWARE.
|
THE SOFTWARE.
|
||||||
|
|
||||||
|
SPDX-License-Identifier: MIT
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "fastlz.h"
|
#include "fastlz.h"
|
||||||
|
|||||||
@@ -22,6 +22,8 @@
|
|||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
THE SOFTWARE.
|
THE SOFTWARE.
|
||||||
|
|
||||||
|
SPDX-License-Identifier: MIT
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef FASTLZ_H
|
#ifndef FASTLZ_H
|
||||||
|
|||||||
@@ -18,6 +18,8 @@
|
|||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
* DEALINGS IN THE SOFTWARE.
|
* DEALINGS IN THE SOFTWARE.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -1024,7 +1026,9 @@ if(!xc->curval_mem)
|
|||||||
|
|
||||||
static void fstDestroyMmaps(struct fstWriterContext *xc, int is_closing)
|
static void fstDestroyMmaps(struct fstWriterContext *xc, int is_closing)
|
||||||
{
|
{
|
||||||
|
#if !defined __CYGWIN__ && !defined __MINGW32__
|
||||||
(void)is_closing;
|
(void)is_closing;
|
||||||
|
#endif
|
||||||
|
|
||||||
fstMunmap(xc->valpos_mem, xc->maxhandle * 4 * sizeof(uint32_t));
|
fstMunmap(xc->valpos_mem, xc->maxhandle * 4 * sizeof(uint32_t));
|
||||||
xc->valpos_mem = NULL;
|
xc->valpos_mem = NULL;
|
||||||
|
|||||||
@@ -18,6 +18,8 @@
|
|||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
* DEALINGS IN THE SOFTWARE.
|
* DEALINGS IN THE SOFTWARE.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef FST_API_H
|
#ifndef FST_API_H
|
||||||
|
|||||||
@@ -27,6 +27,8 @@
|
|||||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
SPDX-License-Identifier: BSD-2-Clause
|
||||||
|
|
||||||
You can contact the author at :
|
You can contact the author at :
|
||||||
- LZ4 source repository : https://github.com/Cyan4973/lz4
|
- LZ4 source repository : https://github.com/Cyan4973/lz4
|
||||||
- LZ4 public forum : https://groups.google.com/forum/#!forum/lz4c
|
- LZ4 public forum : https://groups.google.com/forum/#!forum/lz4c
|
||||||
|
|||||||
@@ -28,6 +28,8 @@
|
|||||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
SPDX-License-Identifier: BSD-2-Clause
|
||||||
|
|
||||||
You can contact the author at :
|
You can contact the author at :
|
||||||
- LZ4 source repository : https://github.com/Cyan4973/lz4
|
- LZ4 source repository : https://github.com/Cyan4973/lz4
|
||||||
- LZ4 public forum : https://groups.google.com/forum/#!forum/lz4c
|
- LZ4 public forum : https://groups.google.com/forum/#!forum/lz4c
|
||||||
|
|||||||
@@ -18,6 +18,8 @@
|
|||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
* DEALINGS IN THE SOFTWARE.
|
* DEALINGS IN THE SOFTWARE.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef WAVE_ALLOCA_H
|
#ifndef WAVE_ALLOCA_H
|
||||||
|
|||||||
+8
-14
@@ -3,13 +3,9 @@
|
|||||||
//
|
//
|
||||||
// Copyright 2003-2020 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2020 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License.
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
//
|
// SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
// Verilator is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU General Public License for more details.
|
|
||||||
//
|
//
|
||||||
//=========================================================================
|
//=========================================================================
|
||||||
///
|
///
|
||||||
@@ -888,7 +884,7 @@ static inline int _vl_vsss_peek(FILE* fp, int& floc, WDataInP fromp,
|
|||||||
}
|
}
|
||||||
static inline void _vl_vsss_skipspace(FILE* fp, int& floc,
|
static inline void _vl_vsss_skipspace(FILE* fp, int& floc,
|
||||||
WDataInP fromp, const std::string& fstr) VL_MT_SAFE {
|
WDataInP fromp, const std::string& fstr) VL_MT_SAFE {
|
||||||
while (1) {
|
while (true) {
|
||||||
int c = _vl_vsss_peek(fp, floc, fromp, fstr);
|
int c = _vl_vsss_peek(fp, floc, fromp, fstr);
|
||||||
if (c==EOF || !isspace(c)) return;
|
if (c==EOF || !isspace(c)) return;
|
||||||
_vl_vsss_advance(fp, floc);
|
_vl_vsss_advance(fp, floc);
|
||||||
@@ -898,7 +894,7 @@ static inline void _vl_vsss_read(FILE* fp, int& floc, WDataInP fromp, const std:
|
|||||||
char* tmpp, const char* acceptp) VL_MT_SAFE {
|
char* tmpp, const char* acceptp) VL_MT_SAFE {
|
||||||
// Read into tmp, consisting of characters from acceptp list
|
// Read into tmp, consisting of characters from acceptp list
|
||||||
char* cp = tmpp;
|
char* cp = tmpp;
|
||||||
while (1) {
|
while (true) {
|
||||||
int c = _vl_vsss_peek(fp, floc, fromp, fstr);
|
int c = _vl_vsss_peek(fp, floc, fromp, fstr);
|
||||||
if (c==EOF || isspace(c)) break;
|
if (c==EOF || isspace(c)) break;
|
||||||
if (acceptp // String - allow anything
|
if (acceptp // String - allow anything
|
||||||
@@ -1344,7 +1340,7 @@ IData VL_FREAD_I(int width, int array_lsb, int array_size,
|
|||||||
// Read the data
|
// Read the data
|
||||||
// We process a character at a time, as then we don't need to deal
|
// We process a character at a time, as then we don't need to deal
|
||||||
// with changing buffer sizes dynamically, etc.
|
// with changing buffer sizes dynamically, etc.
|
||||||
while (1) {
|
while (true) {
|
||||||
int c = fgetc(fp);
|
int c = fgetc(fp);
|
||||||
if (VL_UNLIKELY(c == EOF)) break;
|
if (VL_UNLIKELY(c == EOF)) break;
|
||||||
// Shift value in
|
// Shift value in
|
||||||
@@ -1672,7 +1668,7 @@ bool VlReadMem::get(QData& addrr, std::string& valuer) {
|
|||||||
// Read the data
|
// Read the data
|
||||||
// We process a character at a time, as then we don't need to deal
|
// We process a character at a time, as then we don't need to deal
|
||||||
// with changing buffer sizes dynamically, etc.
|
// with changing buffer sizes dynamically, etc.
|
||||||
while (1) {
|
while (true) {
|
||||||
int c = fgetc(m_fp);
|
int c = fgetc(m_fp);
|
||||||
if (VL_UNLIKELY(c == EOF)) break;
|
if (VL_UNLIKELY(c == EOF)) break;
|
||||||
// printf("%d: Got '%c' Addr%lx IN%d IgE%d IgC%d\n",
|
// printf("%d: Got '%c' Addr%lx IN%d IgE%d IgC%d\n",
|
||||||
@@ -1857,7 +1853,7 @@ void VL_READMEM_N(bool hex, // Hex format, else binary
|
|||||||
|
|
||||||
VlReadMem rmem(hex, bits, filename, start, end);
|
VlReadMem rmem(hex, bits, filename, start, end);
|
||||||
if (VL_UNLIKELY(!rmem.isOpen())) return;
|
if (VL_UNLIKELY(!rmem.isOpen())) return;
|
||||||
while (1) {
|
while (true) {
|
||||||
QData addr;
|
QData addr;
|
||||||
std::string value;
|
std::string value;
|
||||||
if (rmem.get(addr /*ref*/, value/*ref*/)) {
|
if (rmem.get(addr /*ref*/, value/*ref*/)) {
|
||||||
@@ -2187,9 +2183,7 @@ void VerilatedImp::commandArgsAddGuts(int argc, const char** argv) VL_REQUIRES(s
|
|||||||
void VerilatedImp::commandArgVl(const std::string& arg) {
|
void VerilatedImp::commandArgVl(const std::string& arg) {
|
||||||
if (0 == strncmp(arg.c_str(), "+verilator+", strlen("+verilator+"))) {
|
if (0 == strncmp(arg.c_str(), "+verilator+", strlen("+verilator+"))) {
|
||||||
std::string value;
|
std::string value;
|
||||||
if (0) {
|
if (arg == "+verilator+debug") {
|
||||||
}
|
|
||||||
else if (arg == "+verilator+debug") {
|
|
||||||
Verilated::debug(4);
|
Verilated::debug(4);
|
||||||
}
|
}
|
||||||
else if (commandArgVlValue(arg, "+verilator+debugi+", value/*ref*/)) {
|
else if (commandArgVlValue(arg, "+verilator+debugi+", value/*ref*/)) {
|
||||||
|
|||||||
+67
-17
@@ -3,13 +3,9 @@
|
|||||||
//
|
//
|
||||||
// Copyright 2003-2020 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2020 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License.
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
//
|
// SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
// Verilator is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU General Public License for more details.
|
|
||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
///
|
///
|
||||||
@@ -320,7 +316,7 @@ private:
|
|||||||
public: // But internals only - called from VerilatedModule's
|
public: // But internals only - called from VerilatedModule's
|
||||||
VerilatedScope();
|
VerilatedScope();
|
||||||
~VerilatedScope();
|
~VerilatedScope();
|
||||||
void configure(VerilatedSyms* symsp, const char* prefixp, const char* suffix,
|
void configure(VerilatedSyms* symsp, const char* prefixp, const char* suffixp,
|
||||||
const char* identifier, const Type type) VL_MT_UNSAFE;
|
const char* identifier, const Type type) VL_MT_UNSAFE;
|
||||||
void exportInsert(int finalize, const char* namep, void* cb) VL_MT_UNSAFE;
|
void exportInsert(int finalize, const char* namep, void* cb) VL_MT_UNSAFE;
|
||||||
void varInsert(int finalize, const char* namep, void* datap,
|
void varInsert(int finalize, const char* namep, void* datap,
|
||||||
@@ -699,13 +695,12 @@ static inline QData VL_CVT_Q_D(double lhs) VL_PURE {
|
|||||||
union { double d; QData q; } u; u.d=lhs; return u.q; }
|
union { double d; QData q; } u; u.d=lhs; return u.q; }
|
||||||
/// Return double from QData (numeric)
|
/// Return double from QData (numeric)
|
||||||
static inline double VL_ITOR_D_I(IData lhs) VL_PURE {
|
static inline double VL_ITOR_D_I(IData lhs) VL_PURE {
|
||||||
return static_cast<double>(static_cast<vlsint32_t>(lhs)); }
|
return static_cast<double>(static_cast<vlsint32_t>(lhs));
|
||||||
|
}
|
||||||
/// Return QData from double (numeric)
|
/// Return QData from double (numeric)
|
||||||
static inline IData VL_RTOI_I_D(double lhs) VL_PURE {
|
static inline IData VL_RTOI_I_D(double lhs) VL_PURE {
|
||||||
return static_cast<vlsint32_t>(VL_TRUNC(lhs)); }
|
return static_cast<vlsint32_t>(VL_TRUNC(lhs));
|
||||||
/// Return QData from double (numeric)
|
}
|
||||||
static inline IData VL_RTOIROUND_I_D(double lhs) VL_PURE {
|
|
||||||
return static_cast<vlsint32_t>(VL_ROUND(lhs)); }
|
|
||||||
|
|
||||||
// Sign extend such that if MSB set, we get ffff_ffff, else 0s
|
// Sign extend such that if MSB set, we get ffff_ffff, else 0s
|
||||||
// (Requires clean input)
|
// (Requires clean input)
|
||||||
@@ -1324,6 +1319,14 @@ static inline WDataOutP VL_NEGATE_W(int words, WDataOutP owp, WDataInP lwp) VL_M
|
|||||||
}
|
}
|
||||||
return owp;
|
return owp;
|
||||||
}
|
}
|
||||||
|
static void VL_NEGATE_INPLACE_W(int words, WDataOutP owp_lwp) VL_MT_SAFE {
|
||||||
|
EData carry = 1;
|
||||||
|
for (int i = 0; i < words; ++i) {
|
||||||
|
EData word = ~owp_lwp[i] + carry;
|
||||||
|
carry = (word < ~owp_lwp[i]);
|
||||||
|
owp_lwp[i] = word;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// EMIT_RULE: VL_MUL: oclean=dirty; lclean==clean; rclean==clean;
|
// EMIT_RULE: VL_MUL: oclean=dirty; lclean==clean; rclean==clean;
|
||||||
// EMIT_RULE: VL_DIV: oclean=dirty; lclean==clean; rclean==clean;
|
// EMIT_RULE: VL_DIV: oclean=dirty; lclean==clean; rclean==clean;
|
||||||
@@ -1650,18 +1653,22 @@ static inline void _VL_INSERT_WW(int, WDataOutP owp, WDataInP lwp, int hbit, int
|
|||||||
int oword = lword+i;
|
int oword = lword+i;
|
||||||
EData d = lwp[i] << loffset;
|
EData d = lwp[i] << loffset;
|
||||||
EData od = (owp[oword] & ~linsmask) | (d & linsmask);
|
EData od = (owp[oword] & ~linsmask) | (d & linsmask);
|
||||||
if (oword == hword)
|
if (oword == hword) {
|
||||||
owp[oword] = (owp[oword] & ~hinsmask) | (od & hinsmask);
|
owp[oword] = (owp[oword] & ~hinsmask) | (od & hinsmask);
|
||||||
else owp[oword] = od;
|
} else {
|
||||||
|
owp[oword] = od;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
{ // Upper word
|
{ // Upper word
|
||||||
int oword = lword+i+1;
|
int oword = lword+i+1;
|
||||||
if (oword <= hword) {
|
if (oword <= hword) {
|
||||||
EData d = lwp[i] >> nbitsonright;
|
EData d = lwp[i] >> nbitsonright;
|
||||||
EData od = (d & ~linsmask) | (owp[oword] & linsmask);
|
EData od = (d & ~linsmask) | (owp[oword] & linsmask);
|
||||||
if (oword == hword)
|
if (oword == hword) {
|
||||||
owp[oword] = (owp[oword] & ~hinsmask) | (od & hinsmask);
|
owp[oword] = (owp[oword] & ~hinsmask) | (od & hinsmask);
|
||||||
else owp[oword] = od;
|
} else {
|
||||||
|
owp[oword] = od;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2240,6 +2247,49 @@ static inline WDataOutP VL_SEL_WWII(int obits, int lbits, int, int,
|
|||||||
return owp;
|
return owp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//======================================================================
|
||||||
|
// Math needing insert/select
|
||||||
|
|
||||||
|
/// Return QData from double (numeric)
|
||||||
|
// EMIT_RULE: VL_RTOIROUND_Q_D: oclean=dirty; lclean==clean/real
|
||||||
|
static inline QData VL_RTOIROUND_Q_D(int bits, double lhs) VL_PURE {
|
||||||
|
// IEEE format: [63]=sign [62:52]=exp+1023 [51:0]=mantissa
|
||||||
|
// This does not need to support subnormals as they are sub-integral
|
||||||
|
lhs = VL_ROUND(lhs);
|
||||||
|
if (lhs == 0.0) return 0;
|
||||||
|
QData q = VL_CVT_Q_D(lhs);
|
||||||
|
int lsb = static_cast<int>((q >> VL_ULL(52)) & VL_MASK_Q(11)) - 1023 - 52;
|
||||||
|
vluint64_t mantissa = (q & VL_MASK_Q(52)) | (VL_ULL(1) << 52);
|
||||||
|
vluint64_t out = 0;
|
||||||
|
if (lsb < 0) {
|
||||||
|
out = mantissa >> -lsb;
|
||||||
|
} else if (lsb < 64) {
|
||||||
|
out = mantissa << lsb;
|
||||||
|
}
|
||||||
|
if (lhs < 0) out = -out;
|
||||||
|
return out;
|
||||||
|
}
|
||||||
|
static inline IData VL_RTOIROUND_I_D(int bits, double lhs) VL_PURE {
|
||||||
|
return static_cast<IData>(VL_RTOIROUND_Q_D(bits, lhs));
|
||||||
|
}
|
||||||
|
static inline WDataOutP VL_RTOIROUND_W_D(int obits, WDataOutP owp, double lhs) VL_PURE {
|
||||||
|
// IEEE format: [63]=sign [62:52]=exp+1023 [51:0]=mantissa
|
||||||
|
// This does not need to support subnormals as they are sub-integral
|
||||||
|
lhs = VL_ROUND(lhs);
|
||||||
|
VL_ZERO_W(obits, owp);
|
||||||
|
if (lhs == 0.0) return owp;
|
||||||
|
QData q = VL_CVT_Q_D(lhs);
|
||||||
|
int lsb = static_cast<int>((q >> VL_ULL(52)) & VL_MASK_Q(11)) - 1023 - 52;
|
||||||
|
vluint64_t mantissa = (q & VL_MASK_Q(52)) | (VL_ULL(1) << 52);
|
||||||
|
if (lsb < 0) {
|
||||||
|
VL_SET_WQ(owp, mantissa >> -lsb);
|
||||||
|
} else if (lsb < obits) {
|
||||||
|
_VL_INSERT_WQ(obits, owp, mantissa, lsb + 52, lsb);
|
||||||
|
}
|
||||||
|
if (lhs < 0) VL_NEGATE_INPLACE_W(VL_WORDS_I(obits), owp);
|
||||||
|
return owp;
|
||||||
|
}
|
||||||
|
|
||||||
//======================================================================
|
//======================================================================
|
||||||
// Range assignments
|
// Range assignments
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,11 @@
|
|||||||
######################################################################
|
######################################################################
|
||||||
# DESCRIPTION: Makefile commands for all verilated target files
|
# DESCRIPTION: Makefile commands for all verilated target files
|
||||||
#
|
#
|
||||||
# Copyright 2003-2020 by Wilson Snyder. Verilator is free software; you can
|
# Copyright 2003-2020 by Wilson Snyder. This program is free software; you
|
||||||
# redistribute it and/or modify it under the terms of either the GNU Lesser
|
# can redistribute it and/or modify it under the terms of either the GNU
|
||||||
# General Public License Version 3 or the Perl Artistic License Version 2.0.
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
|
# Version 2.0.
|
||||||
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
PERL = @PERL@
|
PERL = @PERL@
|
||||||
|
|||||||
+2
-6
@@ -6,13 +6,9 @@
|
|||||||
//
|
//
|
||||||
// Copyright 2003-2020 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2020 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License.
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
//
|
// SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
// This is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU General Public License for more details.
|
|
||||||
//
|
//
|
||||||
//=========================================================================
|
//=========================================================================
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -3,13 +3,9 @@
|
|||||||
//
|
//
|
||||||
// Copyright 2003-2020 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2020 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License.
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
//
|
// SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
// Verilator is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU General Public License for more details.
|
|
||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
///
|
///
|
||||||
|
|||||||
@@ -3,14 +3,11 @@
|
|||||||
//
|
//
|
||||||
// THIS MODULE IS PUBLICLY LICENSED
|
// THIS MODULE IS PUBLICLY LICENSED
|
||||||
//
|
//
|
||||||
// Copyright 2001-2020 by Wilson Snyder. This program is free software;
|
// Copyright 2001-2020 by Wilson Snyder. This program is free software; you
|
||||||
// you can redistribute it and/or modify it under the terms of either the GNU
|
// can redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License Version 2.0.
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
//
|
// Version 2.0.
|
||||||
// This is distributed in the hope that it will be useful, but WITHOUT ANY
|
// SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
// for more details.
|
|
||||||
//
|
//
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
///
|
///
|
||||||
@@ -77,7 +74,7 @@ public:
|
|||||||
virtual void zero() const VL_OVERRIDE { *m_countp = 0; }
|
virtual void zero() const VL_OVERRIDE { *m_countp = 0; }
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
// cppcheck-suppress noExplicitConstructor
|
// cppcheck-suppress noExplicitConstructor
|
||||||
VerilatedCoverItemSpec(T* countp) : m_countp(countp) { *m_countp = 0; }
|
explicit VerilatedCoverItemSpec(T* countp) : m_countp(countp) { *m_countp = 0; }
|
||||||
virtual ~VerilatedCoverItemSpec() VL_OVERRIDE {}
|
virtual ~VerilatedCoverItemSpec() VL_OVERRIDE {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
+15
-12
@@ -3,14 +3,11 @@
|
|||||||
//
|
//
|
||||||
// THIS MODULE IS PUBLICLY LICENSED
|
// THIS MODULE IS PUBLICLY LICENSED
|
||||||
//
|
//
|
||||||
// Copyright 2001-2020 by Wilson Snyder. This program is free software;
|
// Copyright 2001-2020 by Wilson Snyder. This program is free software; you
|
||||||
// you can redistribute it and/or modify it under the terms of either the GNU
|
// can redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License Version 2.0.
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
//
|
// Version 2.0.
|
||||||
// This is distributed in the hope that it will be useful, but WITHOUT ANY
|
// SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
// for more details.
|
|
||||||
//
|
//
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
///
|
///
|
||||||
@@ -32,9 +29,15 @@
|
|||||||
/// Conditionally compile coverage code
|
/// Conditionally compile coverage code
|
||||||
|
|
||||||
#ifdef VM_COVERAGE
|
#ifdef VM_COVERAGE
|
||||||
# define VL_IF_COVER(stmts) do { stmts ; } while(0)
|
# define VL_IF_COVER(stmts) \
|
||||||
|
do { \
|
||||||
|
stmts; \
|
||||||
|
} while (false)
|
||||||
#else
|
#else
|
||||||
# define VL_IF_COVER(stmts) do { if(0) { stmts ; } } while(0)
|
# define VL_IF_COVER(stmts) \
|
||||||
|
do { \
|
||||||
|
if (false) { stmts; } \
|
||||||
|
} while (false)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
@@ -65,10 +68,10 @@
|
|||||||
/// VL_COVER_INSERT(&m_cases[i], "comment", "Coverage Case", "i", cvtToNumStr(i));
|
/// VL_COVER_INSERT(&m_cases[i], "comment", "Coverage Case", "i", cvtToNumStr(i));
|
||||||
/// }
|
/// }
|
||||||
|
|
||||||
#define VL_COVER_INSERT(countp,args...) \
|
#define VL_COVER_INSERT(countp,...) \
|
||||||
VL_IF_COVER(VerilatedCov::_inserti(countp); \
|
VL_IF_COVER(VerilatedCov::_inserti(countp); \
|
||||||
VerilatedCov::_insertf(__FILE__, __LINE__); \
|
VerilatedCov::_insertf(__FILE__, __LINE__); \
|
||||||
VerilatedCov::_insertp("hier", name(), args))
|
VerilatedCov::_insertp("hier", name(), __VA_ARGS__))
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
/// Convert VL_COVER_INSERT value arguments to strings
|
/// Convert VL_COVER_INSERT value arguments to strings
|
||||||
|
|||||||
@@ -3,14 +3,11 @@
|
|||||||
//
|
//
|
||||||
// THIS MODULE IS PUBLICLY LICENSED
|
// THIS MODULE IS PUBLICLY LICENSED
|
||||||
//
|
//
|
||||||
// Copyright 2001-2020 by Wilson Snyder. This program is free software;
|
// Copyright 2001-2020 by Wilson Snyder. This program is free software; you
|
||||||
// you can redistribute it and/or modify it under the terms of either the GNU
|
// can redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License Version 2.0.
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
//
|
// Version 2.0.
|
||||||
// This is distributed in the hope that it will be useful, but WITHOUT ANY
|
// SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
// for more details.
|
|
||||||
//
|
//
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
///
|
///
|
||||||
|
|||||||
@@ -3,13 +3,9 @@
|
|||||||
//
|
//
|
||||||
// Copyright 2009-2020 by Wilson Snyder. This program is free software; you can
|
// Copyright 2009-2020 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License.
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
//
|
// SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
// Verilator is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU General Public License for more details.
|
|
||||||
//
|
//
|
||||||
//=========================================================================
|
//=========================================================================
|
||||||
///
|
///
|
||||||
@@ -46,8 +42,8 @@
|
|||||||
VL_FATAL_MT(__FILE__, __LINE__, "", \
|
VL_FATAL_MT(__FILE__, __LINE__, "", \
|
||||||
(std::string("%%Error: Unsupported DPI function: ")+VL_FUNC).c_str())
|
(std::string("%%Error: Unsupported DPI function: ")+VL_FUNC).c_str())
|
||||||
|
|
||||||
#define _VL_SVDPI_WARN(message...) \
|
#define _VL_SVDPI_WARN(...) \
|
||||||
VL_PRINTF_MT(message)
|
VL_PRINTF_MT(__VA_ARGS__)
|
||||||
|
|
||||||
// Function requires a "context" in the import declaration
|
// Function requires a "context" in the import declaration
|
||||||
#define _VL_SVDPI_CONTEXT_WARN() \
|
#define _VL_SVDPI_CONTEXT_WARN() \
|
||||||
|
|||||||
@@ -3,13 +3,9 @@
|
|||||||
//
|
//
|
||||||
// Copyright 2003-2020 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2020 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License.
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
//
|
// SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
// Verilator is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU General Public License for more details.
|
|
||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
///
|
///
|
||||||
|
|||||||
@@ -3,14 +3,11 @@
|
|||||||
//
|
//
|
||||||
// THIS MODULE IS PUBLICLY LICENSED
|
// THIS MODULE IS PUBLICLY LICENSED
|
||||||
//
|
//
|
||||||
// Copyright 2001-2020 by Wilson Snyder. This program is free software;
|
// Copyright 2001-2020 by Wilson Snyder. This program is free software; you
|
||||||
// you can redistribute it and/or modify it under the terms of either the GNU
|
// can redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License Version 2.0.
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
//
|
// Version 2.0.
|
||||||
// This is distributed in the hope that it will be useful, but WITHOUT ANY
|
// SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
// for more details.
|
|
||||||
//
|
//
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
///
|
///
|
||||||
|
|||||||
@@ -3,14 +3,11 @@
|
|||||||
//
|
//
|
||||||
// THIS MODULE IS PUBLICLY LICENSED
|
// THIS MODULE IS PUBLICLY LICENSED
|
||||||
//
|
//
|
||||||
// Copyright 2001-2020 by Wilson Snyder. This program is free software;
|
// Copyright 2001-2020 by Wilson Snyder. This program is free software; you
|
||||||
// you can redistribute it and/or modify it under the terms of either the GNU
|
// can redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License Version 2.0.
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
//
|
// Version 2.0.
|
||||||
// This is distributed in the hope that it will be useful, but WITHOUT ANY
|
// SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
// for more details.
|
|
||||||
//
|
//
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
///
|
///
|
||||||
|
|||||||
@@ -3,13 +3,9 @@
|
|||||||
//
|
//
|
||||||
// Copyright 2010-2020 by Wilson Snyder. This program is free software; you can
|
// Copyright 2010-2020 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License.
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
//
|
// SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
// Verilator is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU General Public License for more details.
|
|
||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
///
|
///
|
||||||
@@ -37,10 +33,10 @@
|
|||||||
//===================================================================
|
//===================================================================
|
||||||
// String formatters (required by below containers)
|
// String formatters (required by below containers)
|
||||||
|
|
||||||
extern std::string VL_TO_STRING(CData obj);
|
extern std::string VL_TO_STRING(CData lhs);
|
||||||
extern std::string VL_TO_STRING(SData obj);
|
extern std::string VL_TO_STRING(SData lhs);
|
||||||
extern std::string VL_TO_STRING(IData obj);
|
extern std::string VL_TO_STRING(IData lhs);
|
||||||
extern std::string VL_TO_STRING(QData obj);
|
extern std::string VL_TO_STRING(QData lhs);
|
||||||
inline std::string VL_TO_STRING(const std::string& obj) { return "\"" + obj + "\""; }
|
inline std::string VL_TO_STRING(const std::string& obj) { return "\"" + obj + "\""; }
|
||||||
extern std::string VL_TO_STRING_W(int words, WDataInP obj);
|
extern std::string VL_TO_STRING_W(int words, WDataInP obj);
|
||||||
|
|
||||||
@@ -162,7 +158,7 @@ public:
|
|||||||
int next(T_Key& indexr) const {
|
int next(T_Key& indexr) const {
|
||||||
typename Map::const_iterator it = m_map.find(indexr);
|
typename Map::const_iterator it = m_map.find(indexr);
|
||||||
if (VL_UNLIKELY(it == m_map.end())) return 0;
|
if (VL_UNLIKELY(it == m_map.end())) return 0;
|
||||||
it++;
|
++it;
|
||||||
if (VL_UNLIKELY(it == m_map.end())) return 0;
|
if (VL_UNLIKELY(it == m_map.end())) return 0;
|
||||||
indexr = it->first;
|
indexr = it->first;
|
||||||
return 1;
|
return 1;
|
||||||
@@ -221,7 +217,7 @@ void VL_READMEM_N(bool hex, int bits, const std::string& filename,
|
|||||||
VlAssocArray<T_Key, T_Value>& obj, QData start, QData end) VL_MT_SAFE {
|
VlAssocArray<T_Key, T_Value>& obj, QData start, QData end) VL_MT_SAFE {
|
||||||
VlReadMem rmem(hex, bits, filename, start, end);
|
VlReadMem rmem(hex, bits, filename, start, end);
|
||||||
if (VL_UNLIKELY(!rmem.isOpen())) return;
|
if (VL_UNLIKELY(!rmem.isOpen())) return;
|
||||||
while (1) {
|
while (true) {
|
||||||
QData addr;
|
QData addr;
|
||||||
std::string data;
|
std::string data;
|
||||||
if (rmem.get(addr /*ref*/, data /*ref*/)) {
|
if (rmem.get(addr /*ref*/, data /*ref*/)) {
|
||||||
|
|||||||
@@ -3,13 +3,9 @@
|
|||||||
//
|
//
|
||||||
// Copyright 2009-2020 by Wilson Snyder. This program is free software; you can
|
// Copyright 2009-2020 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License.
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
//
|
// SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
// Verilator is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU General Public License for more details.
|
|
||||||
//
|
//
|
||||||
//=========================================================================
|
//=========================================================================
|
||||||
///
|
///
|
||||||
|
|||||||
@@ -3,14 +3,11 @@
|
|||||||
//
|
//
|
||||||
// THIS MODULE IS PUBLICLY LICENSED
|
// THIS MODULE IS PUBLICLY LICENSED
|
||||||
//
|
//
|
||||||
// Copyright 2001-2020 by Wilson Snyder. This program is free software;
|
// Copyright 2001-2020 by Wilson Snyder. This program is free software; you
|
||||||
// you can redistribute it and/or modify it under the terms of either the GNU
|
// can redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License Version 2.0.
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
//
|
// Version 2.0.
|
||||||
// This is distributed in the hope that it will be useful, but WITHOUT ANY
|
// SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
// for more details.
|
|
||||||
//
|
//
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
///
|
///
|
||||||
@@ -187,7 +184,7 @@ void VerilatedSave::flush() VL_MT_UNSAFE_ONE {
|
|||||||
m_assertOne.check();
|
m_assertOne.check();
|
||||||
if (VL_UNLIKELY(!isOpen())) return;
|
if (VL_UNLIKELY(!isOpen())) return;
|
||||||
vluint8_t* wp = m_bufp;
|
vluint8_t* wp = m_bufp;
|
||||||
while (1) {
|
while (true) {
|
||||||
ssize_t remaining = (m_cp - wp);
|
ssize_t remaining = (m_cp - wp);
|
||||||
if (remaining==0) break;
|
if (remaining==0) break;
|
||||||
errno = 0;
|
errno = 0;
|
||||||
@@ -216,7 +213,7 @@ void VerilatedRestore::fill() VL_MT_UNSAFE_ONE {
|
|||||||
m_endp = m_bufp + (m_endp - m_cp);
|
m_endp = m_bufp + (m_endp - m_cp);
|
||||||
m_cp = m_bufp; // Reset buffer
|
m_cp = m_bufp; // Reset buffer
|
||||||
// Read into buffer starting at m_endp
|
// Read into buffer starting at m_endp
|
||||||
while (1) {
|
while (true) {
|
||||||
ssize_t remaining = (m_bufp+bufferSize() - m_endp);
|
ssize_t remaining = (m_bufp+bufferSize() - m_endp);
|
||||||
if (remaining==0) break;
|
if (remaining==0) break;
|
||||||
errno = 0;
|
errno = 0;
|
||||||
|
|||||||
@@ -3,14 +3,11 @@
|
|||||||
//
|
//
|
||||||
// THIS MODULE IS PUBLICLY LICENSED
|
// THIS MODULE IS PUBLICLY LICENSED
|
||||||
//
|
//
|
||||||
// Copyright 2012-2020 by Wilson Snyder. This program is free software;
|
// Copyright 2000-2020 by Wilson Snyder. This program is free software; you
|
||||||
// you can redistribute it and/or modify it under the terms of either the GNU
|
// can redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License Version 2.0.
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
//
|
// Version 2.0.
|
||||||
// This is distributed in the hope that it will be useful, but WITHOUT ANY
|
// SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
// for more details.
|
|
||||||
//
|
//
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
///
|
///
|
||||||
|
|||||||
@@ -3,13 +3,9 @@
|
|||||||
//
|
//
|
||||||
// Copyright 2009-2020 by Wilson Snyder. This program is free software; you can
|
// Copyright 2009-2020 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License.
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
//
|
// SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
// Verilator is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU General Public License for more details.
|
|
||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
///
|
///
|
||||||
|
|||||||
@@ -3,13 +3,9 @@
|
|||||||
//
|
//
|
||||||
// Copyright 2003-2020 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2020 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License.
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
//
|
// SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
// Verilator is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU General Public License for more details.
|
|
||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
///
|
///
|
||||||
|
|||||||
@@ -3,13 +3,9 @@
|
|||||||
//
|
//
|
||||||
// Copyright 2003-2020 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2020 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License.
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
//
|
// SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
// Verilator is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU General Public License for more details.
|
|
||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
///
|
///
|
||||||
|
|||||||
@@ -1,16 +1,11 @@
|
|||||||
// -*- mode: C++; c-file-style: "cc-mode" -*-
|
// -*- mode: C++; c-file-style: "cc-mode" -*-
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
//
|
//
|
||||||
// THIS MODULE IS PUBLICLY LICENSED
|
// Copyright 2012-2020 by Wilson Snyder. This program is free software; you can
|
||||||
//
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Copyright 2012-2020 by Wilson Snyder. This program is free software;
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
// you can redistribute it and/or modify it under the terms of either the GNU
|
// Version 2.0.
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License Version 2.0.
|
// SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
//
|
|
||||||
// This is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
||||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
// for more details.
|
|
||||||
//
|
//
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
///
|
///
|
||||||
@@ -41,7 +36,8 @@ VlMTaskVertex::VlMTaskVertex(vluint32_t upstreamDepCount)
|
|||||||
// VlWorkerThread
|
// VlWorkerThread
|
||||||
|
|
||||||
VlWorkerThread::VlWorkerThread(VlThreadPool* poolp, bool profiling)
|
VlWorkerThread::VlWorkerThread(VlThreadPool* poolp, bool profiling)
|
||||||
: m_ready_size(0)
|
: m_waiting(false)
|
||||||
|
, m_ready_size(0)
|
||||||
, m_poolp(poolp)
|
, m_poolp(poolp)
|
||||||
, m_profiling(profiling)
|
, m_profiling(profiling)
|
||||||
, m_exiting(false)
|
, m_exiting(false)
|
||||||
@@ -63,7 +59,7 @@ void VlWorkerThread::workerLoop() {
|
|||||||
ExecRec work;
|
ExecRec work;
|
||||||
work.m_fnp = NULL;
|
work.m_fnp = NULL;
|
||||||
|
|
||||||
while (1) {
|
while (true) {
|
||||||
if (VL_LIKELY(!work.m_fnp)) {
|
if (VL_LIKELY(!work.m_fnp)) {
|
||||||
dequeWork(&work);
|
dequeWork(&work);
|
||||||
}
|
}
|
||||||
@@ -173,12 +169,12 @@ void VlThreadPool::profileDump(const char* filenamep, vluint64_t ticksElapsed) {
|
|||||||
VlMTaskVertex::yields());
|
VlMTaskVertex::yields());
|
||||||
|
|
||||||
vluint32_t thread_id = 0;
|
vluint32_t thread_id = 0;
|
||||||
for (ProfileSet::iterator pit = m_allProfiles.begin();
|
for (ProfileSet::const_iterator pit = m_allProfiles.begin();
|
||||||
pit != m_allProfiles.end(); ++pit) {
|
pit != m_allProfiles.end(); ++pit) {
|
||||||
++thread_id;
|
++thread_id;
|
||||||
|
|
||||||
bool printing = false; // False while in warmup phase
|
bool printing = false; // False while in warmup phase
|
||||||
for (ProfileTrace::iterator eit = (*pit)->begin();
|
for (ProfileTrace::const_iterator eit = (*pit)->begin();
|
||||||
eit != (*pit)->end(); ++eit) {
|
eit != (*pit)->end(); ++eit) {
|
||||||
switch (eit->m_type) {
|
switch (eit->m_type) {
|
||||||
case VlProfileRec::TYPE_BARRIER:
|
case VlProfileRec::TYPE_BARRIER:
|
||||||
|
|||||||
@@ -3,14 +3,11 @@
|
|||||||
//
|
//
|
||||||
// THIS MODULE IS PUBLICLY LICENSED
|
// THIS MODULE IS PUBLICLY LICENSED
|
||||||
//
|
//
|
||||||
// Copyright 2012-2020 by Wilson Snyder. This program is free software;
|
// Copyright 2012-2020 by Wilson Snyder. This program is free software; you
|
||||||
// you can redistribute it and/or modify it under the terms of either the GNU
|
// can redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License Version 2.0.
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
//
|
// Version 2.0.
|
||||||
// This is distributed in the hope that it will be useful, but WITHOUT ANY
|
// SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
// for more details.
|
|
||||||
//
|
//
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
///
|
///
|
||||||
|
|||||||
@@ -7,15 +7,11 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2020 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2020 by Wilson Snyder. This program is free software; you
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// can redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
//
|
// SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
// Verilator is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU General Public License for more details.
|
|
||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
|
|
||||||
@@ -151,7 +147,7 @@ public:
|
|||||||
return (!this->operator==(other));
|
return (!this->operator==(other));
|
||||||
}
|
}
|
||||||
void advanceUntilValid() {
|
void advanceUntilValid() {
|
||||||
while (1) {
|
while (true) {
|
||||||
if (m_bit != m_setp->m_bucketsp[m_bucketIdx].end()) {
|
if (m_bit != m_setp->m_bucketsp[m_bucketIdx].end()) {
|
||||||
// Valid iterator in this bucket; we're done.
|
// Valid iterator in this bucket; we're done.
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -3,14 +3,11 @@
|
|||||||
//
|
//
|
||||||
// THIS MODULE IS PUBLICLY LICENSED
|
// THIS MODULE IS PUBLICLY LICENSED
|
||||||
//
|
//
|
||||||
// Copyright 2001-2020 by Wilson Snyder. This program is free software;
|
// Copyright 2001-2020 by Wilson Snyder. This program is free software; you
|
||||||
// you can redistribute it and/or modify it under the terms of either the GNU
|
// can redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License Version 2.0.
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
//
|
// Version 2.0.
|
||||||
// This is distributed in the hope that it will be useful, but WITHOUT ANY
|
// SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
// for more details.
|
|
||||||
//
|
//
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
///
|
///
|
||||||
@@ -159,10 +156,10 @@ VerilatedVcd::VerilatedVcd(VerilatedVcdFile* filep)
|
|||||||
|
|
||||||
void VerilatedVcd::open(const char* filename) {
|
void VerilatedVcd::open(const char* filename) {
|
||||||
m_assertOne.check();
|
m_assertOne.check();
|
||||||
if (isOpen() || !filename || !*filename) return;
|
if (isOpen()) return;
|
||||||
|
|
||||||
// Set member variables
|
// Set member variables
|
||||||
m_filename = filename;
|
m_filename = filename; // "" is ok, as someone may overload open
|
||||||
VerilatedVcdSingleton::pushVcd(this);
|
VerilatedVcdSingleton::pushVcd(this);
|
||||||
|
|
||||||
// SPDIFF_OFF
|
// SPDIFF_OFF
|
||||||
@@ -367,7 +364,7 @@ void VerilatedVcd::bufferFlush() VL_MT_UNSAFE_ONE {
|
|||||||
m_assertOne.check();
|
m_assertOne.check();
|
||||||
if (VL_UNLIKELY(!isOpen())) return;
|
if (VL_UNLIKELY(!isOpen())) return;
|
||||||
char* wp = m_wrBufp;
|
char* wp = m_wrBufp;
|
||||||
while (1) {
|
while (true) {
|
||||||
ssize_t remaining = (m_writep - wp);
|
ssize_t remaining = (m_writep - wp);
|
||||||
if (remaining==0) break;
|
if (remaining==0) break;
|
||||||
errno = 0;
|
errno = 0;
|
||||||
|
|||||||
@@ -3,14 +3,11 @@
|
|||||||
//
|
//
|
||||||
// THIS MODULE IS PUBLICLY LICENSED
|
// THIS MODULE IS PUBLICLY LICENSED
|
||||||
//
|
//
|
||||||
// Copyright 2001-2020 by Wilson Snyder. This program is free software;
|
// Copyright 2001-2020 by Wilson Snyder. This program is free software; you
|
||||||
// you can redistribute it and/or modify it under the terms of either the GNU
|
// can redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License Version 2.0.
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
//
|
// Version 2.0.
|
||||||
// This is distributed in the hope that it will be useful, but WITHOUT ANY
|
// SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
// for more details.
|
|
||||||
//
|
//
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
///
|
///
|
||||||
|
|||||||
@@ -3,14 +3,11 @@
|
|||||||
//
|
//
|
||||||
// THIS MODULE IS PUBLICLY LICENSED
|
// THIS MODULE IS PUBLICLY LICENSED
|
||||||
//
|
//
|
||||||
// Copyright 2001-2020 by Wilson Snyder. This program is free software;
|
// Copyright 2001-2020 by Wilson Snyder. This program is free software; you
|
||||||
// you can redistribute it and/or modify it under the terms of either the GNU
|
// can redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License Version 2.0.
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
//
|
// Version 2.0.
|
||||||
// This is distributed in the hope that it will be useful, but WITHOUT ANY
|
// SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
// for more details.
|
|
||||||
//
|
//
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
///
|
///
|
||||||
|
|||||||
@@ -1,16 +1,11 @@
|
|||||||
// -*- mode: C++; c-file-style: "cc-mode" -*-
|
// -*- mode: C++; c-file-style: "cc-mode" -*-
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
//
|
//
|
||||||
// THIS MODULE IS PUBLICLY LICENSED
|
// Copyright 2001-2020 by Wilson Snyder. This program is free software; you can
|
||||||
//
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Copyright 2001-2020 by Wilson Snyder. This program is free software;
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
// you can redistribute it and/or modify it under the terms of either the GNU
|
// Version 2.0.
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License Version 2.0.
|
// SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
//
|
|
||||||
// This is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
||||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
// for more details.
|
|
||||||
//
|
//
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
///
|
///
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user