mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 01:54:01 +02:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7c3c2af90b | ||
|
|
6dca9b4ba4 | ||
|
|
ede37bb9d8 | ||
|
|
4a1729eaab | ||
|
|
b1565f5b89 | ||
|
|
4fb8dcfd4e | ||
|
|
16d1f2b835 | ||
|
|
73594e5aa5 | ||
|
|
c0a365bd34 | ||
|
|
45940ff820 | ||
|
|
d545ae242c | ||
|
|
e862aaf2e1 | ||
|
|
30c3540086 | ||
|
|
663a084ca4 | ||
|
|
b4d9ccd9af | ||
|
|
98fff6a4ce | ||
|
|
4977a5e1d9 | ||
|
|
e4297486ef | ||
|
|
ad591767c9 | ||
|
|
8bc1e75d9f | ||
|
|
a1c7adcffc | ||
|
|
8867169957 | ||
|
|
79eac1e6b0 | ||
|
|
87533b13e1 | ||
|
|
a2ffe86a36 | ||
|
|
22bde7d461 |
@@ -3,12 +3,51 @@ Revision history for Verilator
|
|||||||
The contributors that suggested a given feature are shown in []. [by ...]
|
The contributors that suggested a given feature are shown in []. [by ...]
|
||||||
indicates the contributor was also the author of the fix; Thanks!
|
indicates the contributor was also the author of the fix; Thanks!
|
||||||
|
|
||||||
* Verilator 3.655 ***
|
* Verilator 3.660 2008/03/23
|
||||||
|
|
||||||
|
*** Add support for hard-coding VERILATOR_ROOT etc in the executables,
|
||||||
|
to enable easier use of Verilator RPMs. [Gunter Dannoritzer]
|
||||||
|
|
||||||
|
*** Allow multiple .v files on command line. [Stefan Thiede]
|
||||||
|
|
||||||
|
*** Convert re-defining macro error to warning. [Stefan Thiede]
|
||||||
|
|
||||||
|
*** Add --error-limit option. [Stefan Thiede]
|
||||||
|
|
||||||
|
*** Allow __ in cell names by quoting them in C. [Stefan Thiede]
|
||||||
|
|
||||||
|
**** Fix genvar to be signed, so "< 0" works properly. [Niranjan Prabhu]
|
||||||
|
|
||||||
|
**** Fix assignments to inputs inside functions/tasks. [Patricio Kaplan]
|
||||||
|
|
||||||
|
**** Fix definitions in main file.v, referenced in library. [Stefan Thiede]
|
||||||
|
|
||||||
|
**** Fix undefined assigns to be implicit warnings. [Stefan Thiede]
|
||||||
|
|
||||||
|
* Verilator 3.658 2008/02/25
|
||||||
|
|
||||||
|
**** Fix unistd compile error in 3.657. [Patricio Kaplan, Jonathan Kimmitt]
|
||||||
|
|
||||||
|
* Verilator 3.657 2008/02/20
|
||||||
|
|
||||||
|
**** Fix assignments of {a,b,c} = {c,b,a}. [Jonathan Kimmitt]
|
||||||
|
|
||||||
|
**** Fix Perl warning with --lint-only. [by Ding Xiaoliang]
|
||||||
|
|
||||||
|
**** Avoid creating obj_dir with --lint-only. [Ding Xiaoliang]
|
||||||
|
|
||||||
|
**** Fix parsing of always @(*). [Patricio Kaplan]
|
||||||
|
|
||||||
|
* Verilator 3.656 2008/01/18
|
||||||
|
|
||||||
**** Wide VL_CONST_W_#X functions are now made automatically. [Bernard Deadman]
|
**** Wide VL_CONST_W_#X functions are now made automatically. [Bernard Deadman]
|
||||||
In such cases, a new {prefix}__Inlines.h file will be built and included.
|
In such cases, a new {prefix}__Inlines.h file will be built and included.
|
||||||
|
|
||||||
* Verilator 3.655 11/27/2007
|
**** Fixed sign error when extracting from signed memory. [Peter Debacker]
|
||||||
|
|
||||||
|
**** Fixed tracing of SystemC w/o SystemPerl. [Bernard Deadman, Johan Wouters]
|
||||||
|
|
||||||
|
* Verilator 3.655 2007/11/27
|
||||||
|
|
||||||
*** Support "#delay <statement>;" with associated STMTDLY warning.
|
*** Support "#delay <statement>;" with associated STMTDLY warning.
|
||||||
|
|
||||||
@@ -20,7 +59,7 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
|
|
||||||
**** Fixed many internal memory leaks, and added leak detector.
|
**** Fixed many internal memory leaks, and added leak detector.
|
||||||
|
|
||||||
* Verilator 3.654 10/18/2007
|
* Verilator 3.654 2007/10/18
|
||||||
|
|
||||||
**** Don't exit early if many warnings but no errors are found. [Stan Mayer]
|
**** Don't exit early if many warnings but no errors are found. [Stan Mayer]
|
||||||
|
|
||||||
@@ -28,13 +67,13 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
|
|
||||||
**** Fixed parsing system functions with empty parens. [Oleg Rodionov]
|
**** Fixed parsing system functions with empty parens. [Oleg Rodionov]
|
||||||
|
|
||||||
* Verilator 3.653 8/1/2007
|
* Verilator 3.653 2007/8/1
|
||||||
|
|
||||||
**** Support SystemVerilog ==? and !=? operators.
|
**** Support SystemVerilog ==? and !=? operators.
|
||||||
|
|
||||||
**** Fixed SC_LIBS missing from generated makefiles. [Ding Xiaoliang]
|
**** Fixed SC_LIBS missing from generated makefiles. [Ding Xiaoliang]
|
||||||
|
|
||||||
* Verilator 3.652 6/21/2007
|
* Verilator 3.652 2007/6/21
|
||||||
|
|
||||||
**** Report as many warning types as possible before exiting.
|
**** Report as many warning types as possible before exiting.
|
||||||
|
|
||||||
@@ -46,7 +85,7 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
|
|
||||||
**** Fixed Preprocessor dropping some `line directives. [Mark Nodine]
|
**** Fixed Preprocessor dropping some `line directives. [Mark Nodine]
|
||||||
|
|
||||||
* Verilator 3.651 5/22/2007
|
* Verilator 3.651 2007/5/22
|
||||||
|
|
||||||
*** Added verilator_profcfunc utility. [Gene Weber]
|
*** Added verilator_profcfunc utility. [Gene Weber]
|
||||||
|
|
||||||
@@ -60,7 +99,7 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
|
|
||||||
**** Allow empty case/endcase blocks.
|
**** Allow empty case/endcase blocks.
|
||||||
|
|
||||||
* Verilator 3.650 4/20/2007
|
* Verilator 3.650 2007/4/20
|
||||||
|
|
||||||
** Add --compiler msvc option. This is now required when Verilated code
|
** Add --compiler msvc option. This is now required when Verilated code
|
||||||
is to be run through MSVC++. This also enables fixing MSVC++ error
|
is to be run through MSVC++. This also enables fixing MSVC++ error
|
||||||
@@ -85,7 +124,7 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
|
|
||||||
**** Fixed 3.640 `verilog forcing IEEE 1364-1995 only. [David Hewson]
|
**** Fixed 3.640 `verilog forcing IEEE 1364-1995 only. [David Hewson]
|
||||||
|
|
||||||
* Verilator 3.640 3/12/2007
|
* Verilator 3.640 2007/3/12
|
||||||
|
|
||||||
*** Support Verilog 2005 `begin_keywords and `end_keywords.
|
*** Support Verilog 2005 `begin_keywords and `end_keywords.
|
||||||
|
|
||||||
@@ -103,7 +142,7 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
|
|
||||||
**** Fixed display %m names inside named blocks.
|
**** Fixed display %m names inside named blocks.
|
||||||
|
|
||||||
* Verilator 3.633 2/7/2007
|
* Verilator 3.633 2007/2/7
|
||||||
|
|
||||||
*** Add --trace-depth option for minimizing VCD file size. [Emerson Suguimoto]
|
*** Add --trace-depth option for minimizing VCD file size. [Emerson Suguimoto]
|
||||||
|
|
||||||
@@ -115,11 +154,11 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
|
|
||||||
**** Fixed $display's with array select followed by wide AND. [David Hewson]
|
**** Fixed $display's with array select followed by wide AND. [David Hewson]
|
||||||
|
|
||||||
* Verilator 3.632 1/17/2007
|
* Verilator 3.632 2007/1/17
|
||||||
|
|
||||||
*** Add /*verilator isolate_assignments*/ attribute. [Mike Shinkarovsky]
|
*** Add /*verilator isolate_assignments*/ attribute. [Mike Shinkarovsky]
|
||||||
|
|
||||||
* Verilator 3.631 1/2/2007
|
* Verilator 3.631 2007/1/2
|
||||||
|
|
||||||
** Support standard NAME[#] for cells created by arraying or generate for.
|
** Support standard NAME[#] for cells created by arraying or generate for.
|
||||||
This replaces the non-standard name__# syntax used in earlier versions.
|
This replaces the non-standard name__# syntax used in earlier versions.
|
||||||
@@ -130,7 +169,7 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
|
|
||||||
**** Fixed $readmem* with filenames < 8 characters. [Emerson Suguimoto]
|
**** Fixed $readmem* with filenames < 8 characters. [Emerson Suguimoto]
|
||||||
|
|
||||||
* Verilator 3.630 12/19/2006
|
* Verilator 3.630 2006/12/19
|
||||||
|
|
||||||
** Support $readmemb and $readmemh. [Eugene Weber, Arthur Kahlich]
|
** Support $readmemb and $readmemh. [Eugene Weber, Arthur Kahlich]
|
||||||
|
|
||||||
@@ -144,7 +183,7 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
|
|
||||||
**** Fixed missed split optimization points underneath other re-split blocks.
|
**** Fixed missed split optimization points underneath other re-split blocks.
|
||||||
|
|
||||||
* Verilator 3.623 12/05/2006
|
* Verilator 3.623 2006/12/05
|
||||||
|
|
||||||
*** Add --output-split-cfuncs for accelerating GCC compile. [Eugene Weber]
|
*** Add --output-split-cfuncs for accelerating GCC compile. [Eugene Weber]
|
||||||
|
|
||||||
@@ -152,11 +191,11 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
|
|
||||||
**** Add M32 make variable to support -m32 compiles. [Eugene Weber]
|
**** Add M32 make variable to support -m32 compiles. [Eugene Weber]
|
||||||
|
|
||||||
* Verilator 3.622 10/17/2006 Stable
|
* Verilator 3.622 2006/10/17 Stable
|
||||||
|
|
||||||
**** Fixed --skip-identical without --debug, broken in 3.621. [Andy Meier]
|
**** Fixed --skip-identical without --debug, broken in 3.621. [Andy Meier]
|
||||||
|
|
||||||
* Verilator 3.621 10/11/2006 Beta
|
* Verilator 3.621 2006/10/11 Beta
|
||||||
|
|
||||||
** Add /*verilator no_inline_task*/ to prevent over-expansion. [Eugene Weber]
|
** Add /*verilator no_inline_task*/ to prevent over-expansion. [Eugene Weber]
|
||||||
|
|
||||||
@@ -170,7 +209,7 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
|
|
||||||
**** Fixed core dump on printing error when not under --debug. [Allan Cochrane]
|
**** Fixed core dump on printing error when not under --debug. [Allan Cochrane]
|
||||||
|
|
||||||
* Verilator 3.620 10/04/2006 Stable
|
* Verilator 3.620 2006/10/04 Stable
|
||||||
|
|
||||||
*** Support simple inout task ports. [Eugene Weber]
|
*** Support simple inout task ports. [Eugene Weber]
|
||||||
|
|
||||||
@@ -187,7 +226,7 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
|
|
||||||
**** Fixed dotted variables in always sensitivity lists. [Allan Cochrane]
|
**** Fixed dotted variables in always sensitivity lists. [Allan Cochrane]
|
||||||
|
|
||||||
* Verilator 3.610 09/20/2006 Stable
|
* Verilator 3.610 2006/09/20 Stable
|
||||||
|
|
||||||
*** Verilator now works under DJGPP (Pentium GCC). [John Stroebel]
|
*** Verilator now works under DJGPP (Pentium GCC). [John Stroebel]
|
||||||
|
|
||||||
@@ -199,11 +238,11 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
|
|
||||||
**** Fixed printf format warnings on 64-bit linux.
|
**** Fixed printf format warnings on 64-bit linux.
|
||||||
|
|
||||||
* Verilator 3.602 09/11/2006 Stable
|
* Verilator 3.602 2006/09/11 Stable
|
||||||
|
|
||||||
**** Fixed function references under top inlined module. [David Hewson]
|
**** Fixed function references under top inlined module. [David Hewson]
|
||||||
|
|
||||||
* Verilator 3.601 09/06/2006 Beta
|
* Verilator 3.601 2006/09/06 Beta
|
||||||
|
|
||||||
*** Added --inhibit-sim flag for environments using old __Vm_inhibitSim.
|
*** Added --inhibit-sim flag for environments using old __Vm_inhibitSim.
|
||||||
|
|
||||||
@@ -226,7 +265,7 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
|
|
||||||
**** Declare optimized lookup tables as 'static', to reduce D-Cache miss rate.
|
**** Declare optimized lookup tables as 'static', to reduce D-Cache miss rate.
|
||||||
|
|
||||||
* Verilator 3.600 08/28/2006 Beta
|
* Verilator 3.600 2006/08/28 Beta
|
||||||
|
|
||||||
** Support dotted cross-hierarchy variable and task references.
|
** Support dotted cross-hierarchy variable and task references.
|
||||||
|
|
||||||
@@ -238,7 +277,7 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
|
|
||||||
**** Fixed redundant statements remaining after table optimization.
|
**** Fixed redundant statements remaining after table optimization.
|
||||||
|
|
||||||
* Verilator 3.542 08/11/2006 Stable
|
* Verilator 3.542 2006/08/11 Stable
|
||||||
|
|
||||||
**** Fixed extraneous UNSIGNED warning when comparing genvars. [David Hewson]
|
**** Fixed extraneous UNSIGNED warning when comparing genvars. [David Hewson]
|
||||||
|
|
||||||
@@ -248,7 +287,7 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
|
|
||||||
**** Add VL_CONST_W_24X macro. [Bernard Deadman]
|
**** Add VL_CONST_W_24X macro. [Bernard Deadman]
|
||||||
|
|
||||||
* Verilator 3.541 07/05/2006 Beta
|
* Verilator 3.541 2006/07/05 Beta
|
||||||
|
|
||||||
*** Fixed "// verilator lint_on" not re-enabling warnings. [David Hewson]
|
*** Fixed "// verilator lint_on" not re-enabling warnings. [David Hewson]
|
||||||
|
|
||||||
@@ -260,7 +299,7 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
|
|
||||||
**** Fixed GCC 4.0 header file warnings.
|
**** Fixed GCC 4.0 header file warnings.
|
||||||
|
|
||||||
* Verilator 3.540 06/27/2006 Beta
|
* Verilator 3.540 2006/06/27 Beta
|
||||||
|
|
||||||
**** Optimize combo assignments that are used only once, ~5-25% faster.
|
**** Optimize combo assignments that are used only once, ~5-25% faster.
|
||||||
|
|
||||||
@@ -270,7 +309,7 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
|
|
||||||
**** Fixed mis-width warning on dead generate-if branches. [Jae Hossell]
|
**** Fixed mis-width warning on dead generate-if branches. [Jae Hossell]
|
||||||
|
|
||||||
* Verilator 3.533 06/05/2006 Stable
|
* Verilator 3.533 2006/06/05 Stable
|
||||||
|
|
||||||
*** Add PDF user manual, verilator.pdf.
|
*** Add PDF user manual, verilator.pdf.
|
||||||
|
|
||||||
@@ -280,7 +319,7 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
|
|
||||||
**** Fixed Bison compile errors in verilog.y. [by Ben Jackson]
|
**** Fixed Bison compile errors in verilog.y. [by Ben Jackson]
|
||||||
|
|
||||||
* Verilator 3.531 05/10/2006 Stable
|
* Verilator 3.531 2006/05/10 Stable
|
||||||
|
|
||||||
*** Support $c routines which return 64 bit values.
|
*** Support $c routines which return 64 bit values.
|
||||||
|
|
||||||
@@ -288,12 +327,12 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
|
|
||||||
**** Fixed Verilator core dump when have empty public function. [David.Hewson]
|
**** Fixed Verilator core dump when have empty public function. [David.Hewson]
|
||||||
|
|
||||||
* Verilator 3.530 04/24/2006 Stable
|
* Verilator 3.530 2006/04/24 Stable
|
||||||
|
|
||||||
** $time is now 64 bits. The macro VL_TIME_I is now VL_TIME_Q, but calls
|
** $time is now 64 bits. The macro VL_TIME_I is now VL_TIME_Q, but calls
|
||||||
the same sc_time_stamp() function to get the current time.
|
the same sc_time_stamp() function to get the current time.
|
||||||
|
|
||||||
* Verilator 3.523 03/06/2006 Stable
|
* Verilator 3.523 2006/03/06 Stable
|
||||||
|
|
||||||
**** Fixed error line numbers being off due to multi-line defines. [Mat Zeno]
|
**** Fixed error line numbers being off due to multi-line defines. [Mat Zeno]
|
||||||
|
|
||||||
@@ -301,11 +340,11 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
|
|
||||||
**** Fixed `systemc_imp_header "undefined macro" error.
|
**** Fixed `systemc_imp_header "undefined macro" error.
|
||||||
|
|
||||||
* Verilator 3.522 02/23/2006 Beta
|
* Verilator 3.522 2006/02/23 Beta
|
||||||
|
|
||||||
**** Add UNUSED error message, for forward compatibility.
|
**** Add UNUSED error message, for forward compatibility.
|
||||||
|
|
||||||
* Verilator 3.521 02/14/2006 Beta
|
* Verilator 3.521 2006/02/14 Beta
|
||||||
|
|
||||||
*** Create new --coverage-line and --coverage-user options. [Peter Holmes]
|
*** Create new --coverage-line and --coverage-user options. [Peter Holmes]
|
||||||
|
|
||||||
@@ -313,12 +352,12 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
|
|
||||||
**** Fixed public module's parent still getting inlined.
|
**** Fixed public module's parent still getting inlined.
|
||||||
|
|
||||||
* Verilator 3.520 01/14/2006 Stable
|
* Verilator 3.520 2006/01/14 Stable
|
||||||
|
|
||||||
** Added support for $fopen, $fclose, $fwrite, $fdisplay.
|
** Added support for $fopen, $fclose, $fwrite, $fdisplay.
|
||||||
See documentation, as the file descriptors differ from the standard.
|
See documentation, as the file descriptors differ from the standard.
|
||||||
|
|
||||||
* Verilator 3.510 12/17/2005 Stable
|
* Verilator 3.510 2005/12/17 Stable
|
||||||
|
|
||||||
** Improve trace-on performance on large multi-clock designs by 2x or more.
|
** Improve trace-on performance on large multi-clock designs by 2x or more.
|
||||||
This adds a small ~2% performance penalty if traces are compiled in,
|
This adds a small ~2% performance penalty if traces are compiled in,
|
||||||
@@ -332,14 +371,14 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
|
|
||||||
**** Fixed VL_MULS_WWW compile error with MSVC++. [Wim Michiels]
|
**** Fixed VL_MULS_WWW compile error with MSVC++. [Wim Michiels]
|
||||||
|
|
||||||
* Verilator 3.502 11/30/2005 Stable
|
* Verilator 3.502 2005/11/30 Stable
|
||||||
|
|
||||||
**** Fixed local non-IO variables in public functions and tasks.
|
**** Fixed local non-IO variables in public functions and tasks.
|
||||||
|
|
||||||
**** Fixed bad lifetime optimization when same signal is assigned multiple
|
**** Fixed bad lifetime optimization when same signal is assigned multiple
|
||||||
times in both branch of a if. [Danny Ding]
|
times in both branch of a if. [Danny Ding]
|
||||||
|
|
||||||
* Verilator 3.501 11/16/2005 Stable
|
* Verilator 3.501 2005/11/16 Stable
|
||||||
|
|
||||||
*** Add --profile-cfuncs for correlating profiles back to Verilog.
|
*** Add --profile-cfuncs for correlating profiles back to Verilog.
|
||||||
|
|
||||||
@@ -347,7 +386,7 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
|
|
||||||
**** Fixed bad deep expressions with bit-selects and rotate. [Prabhat Gupta]
|
**** Fixed bad deep expressions with bit-selects and rotate. [Prabhat Gupta]
|
||||||
|
|
||||||
* Verilator 3.500 10/30/2005 Stable
|
* Verilator 3.500 2005/10/30 Stable
|
||||||
|
|
||||||
** Support signed numbers, >>>, $signed, $unsigned. [MANY!]
|
** Support signed numbers, >>>, $signed, $unsigned. [MANY!]
|
||||||
|
|
||||||
@@ -363,13 +402,13 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
|
|
||||||
**** Fixed generate for cell instantiations with same name. [Mat Zeno]
|
**** Fixed generate for cell instantiations with same name. [Mat Zeno]
|
||||||
|
|
||||||
* Verilator 3.481 10/12/2005 Stable
|
* Verilator 3.481 2005/10/12 Stable
|
||||||
|
|
||||||
*** Add /*verilator tracing_on/off*/ for waveform control.
|
*** Add /*verilator tracing_on/off*/ for waveform control.
|
||||||
|
|
||||||
**** Fixed split optimization reordering $display statements.
|
**** Fixed split optimization reordering $display statements.
|
||||||
|
|
||||||
* Verilator 3.480 9/27/2005 Beta
|
* Verilator 3.480 2005/9/27 Beta
|
||||||
|
|
||||||
** Allow coverage of flattened modules, and multiple points per line.
|
** Allow coverage of flattened modules, and multiple points per line.
|
||||||
Coverage analysis requires SystemPerl 1.230 or newer.
|
Coverage analysis requires SystemPerl 1.230 or newer.
|
||||||
@@ -384,7 +423,7 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
|
|
||||||
**** Optimize local variables from delayed array assignments.
|
**** Optimize local variables from delayed array assignments.
|
||||||
|
|
||||||
* Verilator 3.470 9/6/2005 Stable
|
* Verilator 3.470 2005/9/6 Stable
|
||||||
|
|
||||||
*** Optimize staging flops under reset blocks.
|
*** Optimize staging flops under reset blocks.
|
||||||
|
|
||||||
@@ -396,7 +435,7 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
|
|
||||||
**** Fixed preprocessor substitution of quoted parameterized defines.
|
**** Fixed preprocessor substitution of quoted parameterized defines.
|
||||||
|
|
||||||
* Verilator 3.464 8/24/2005 Stable
|
* Verilator 3.464 2005/8/24 Stable
|
||||||
|
|
||||||
*** Add `systemc_imp_header, for use when using --output-split.
|
*** Add `systemc_imp_header, for use when using --output-split.
|
||||||
|
|
||||||
@@ -404,11 +443,11 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
|
|
||||||
**** Fixed core dump with clock inversion optimizations.
|
**** Fixed core dump with clock inversion optimizations.
|
||||||
|
|
||||||
* Verilator 3.463 8/5/2005 Stable
|
* Verilator 3.463 2005/8/5 Stable
|
||||||
|
|
||||||
*** Fixed case defaults when not last statement in case list. [Wim Michiels]
|
*** Fixed case defaults when not last statement in case list. [Wim Michiels]
|
||||||
|
|
||||||
* Verilator 3.462 8/3/2005 Stable
|
* Verilator 3.462 2005/8/3 Stable
|
||||||
|
|
||||||
*** Fixed reordering of delayed assignments to same memory index. [Wim Michiels]
|
*** Fixed reordering of delayed assignments to same memory index. [Wim Michiels]
|
||||||
|
|
||||||
@@ -416,11 +455,11 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
|
|
||||||
**** Fixed multiply-instantiated public tasks generating non-compilable code.
|
**** Fixed multiply-instantiated public tasks generating non-compilable code.
|
||||||
|
|
||||||
* Verilator 3.461 7/28/2005 Beta
|
* Verilator 3.461 2005/7/28 Beta
|
||||||
|
|
||||||
**** Fixed compile error with older versions of bison. [Jeff Dutton]
|
**** Fixed compile error with older versions of bison. [Jeff Dutton]
|
||||||
|
|
||||||
* Verilator 3.460 7/27/2005 Beta
|
* Verilator 3.460 2005/7/27 Beta
|
||||||
|
|
||||||
** Add -output-split option to enable faster parallel GCC compiles.
|
** Add -output-split option to enable faster parallel GCC compiles.
|
||||||
To support --output-split, the makefiles now split VM_CLASSES
|
To support --output-split, the makefiles now split VM_CLASSES
|
||||||
@@ -441,7 +480,7 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
|
|
||||||
**** Internal tree dumps now indicate edit number that changed the node.
|
**** Internal tree dumps now indicate edit number that changed the node.
|
||||||
|
|
||||||
* Verilator 3.450 7/12/2005
|
* Verilator 3.450 2005/7/12
|
||||||
|
|
||||||
** $finish will no longer exit, but set Verilated::gotFinish().
|
** $finish will no longer exit, but set Verilated::gotFinish().
|
||||||
This enables support for final statements, and for other cleanup code.
|
This enables support for final statements, and for other cleanup code.
|
||||||
@@ -456,19 +495,19 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
|
|
||||||
**** Fixed "=== 1'bx" to always be false, instead of random.
|
**** Fixed "=== 1'bx" to always be false, instead of random.
|
||||||
|
|
||||||
* Verilator 3.440 6/28/2005 Stable
|
* Verilator 3.440 2005/6/28 Stable
|
||||||
|
|
||||||
** Add Verilog 2001 generate for/if/case statements.
|
** Add Verilog 2001 generate for/if/case statements.
|
||||||
|
|
||||||
* Verilator 3.431 6/24/2005 Stable
|
* Verilator 3.431 2005/6/24 Stable
|
||||||
|
|
||||||
*** Fixed selection bugs introduced in 3.430 beta.
|
*** Fixed selection bugs introduced in 3.430 beta.
|
||||||
|
|
||||||
* Verilator 3.430 6/22/2005 Beta
|
* Verilator 3.430 2005/6/22 Beta
|
||||||
|
|
||||||
** Add Verilog 2001 variable part selects [n+:m] and [n-:m]. [Wim Michiels]
|
** Add Verilog 2001 variable part selects [n+:m] and [n-:m]. [Wim Michiels]
|
||||||
|
|
||||||
* Verilator 3.422 6/10/2005 Stable
|
* Verilator 3.422 2005/6/10 Stable
|
||||||
|
|
||||||
*** Added Verilog 2001 power (**) operator. [Danny Ding]
|
*** Added Verilog 2001 power (**) operator. [Danny Ding]
|
||||||
|
|
||||||
@@ -476,13 +515,13 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
|
|
||||||
**** Fixed tracing of modules with public functions.
|
**** Fixed tracing of modules with public functions.
|
||||||
|
|
||||||
* Verilator 3.421 6/2/2005 Beta
|
* Verilator 3.421 2005/6/2 Beta
|
||||||
|
|
||||||
**** Fixed error about reserved word on non-public signals.
|
**** Fixed error about reserved word on non-public signals.
|
||||||
|
|
||||||
**** Fixed missing initialization compile errors in 3.420 beta. [Ralf Karge]
|
**** Fixed missing initialization compile errors in 3.420 beta. [Ralf Karge]
|
||||||
|
|
||||||
* Verilator 3.420 6/2/2005 Beta
|
* Verilator 3.420 2005/6/2 Beta
|
||||||
|
|
||||||
*** Fixed case defaults when not last statement in case list. [Ralf Karge]
|
*** Fixed case defaults when not last statement in case list. [Ralf Karge]
|
||||||
|
|
||||||
@@ -500,11 +539,11 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
|
|
||||||
**** Fixed gate optimization with top-flattened modules. [Mahesh Kumashikar]
|
**** Fixed gate optimization with top-flattened modules. [Mahesh Kumashikar]
|
||||||
|
|
||||||
* Verilator 3.411 5/30/2005 Stable
|
* Verilator 3.411 2005/5/30 Stable
|
||||||
|
|
||||||
**** Fixed compile error in GCC 2.96. [Jeff Dutton]
|
**** Fixed compile error in GCC 2.96. [Jeff Dutton]
|
||||||
|
|
||||||
* Verilator 3.410 5/25/2005 Beta
|
* Verilator 3.410 2005/5/25 Beta
|
||||||
|
|
||||||
** Allow functions and tasks to be declared public.
|
** Allow functions and tasks to be declared public.
|
||||||
They will become public C++ functions, with appropriate C++ types.
|
They will become public C++ functions, with appropriate C++ types.
|
||||||
@@ -520,7 +559,7 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
|
|
||||||
**** Fixed compile error in GCC 2.96, and with SystemC 1.2. [Jeff Dutton]
|
**** Fixed compile error in GCC 2.96, and with SystemC 1.2. [Jeff Dutton]
|
||||||
|
|
||||||
* Verilator 3.400 4/29/2005 Beta
|
* Verilator 3.400 2005/4/29 Beta
|
||||||
|
|
||||||
** Internal changes to support future clocking features.
|
** Internal changes to support future clocking features.
|
||||||
|
|
||||||
@@ -551,7 +590,7 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
|
|
||||||
**** Fixed crash with size mismatches on case items. [Gernot Koch]
|
**** Fixed crash with size mismatches on case items. [Gernot Koch]
|
||||||
|
|
||||||
* Verilator 3.340 2/18/2005 Stable
|
* Verilator 3.340 2005/2/18 Stable
|
||||||
|
|
||||||
*** Report misconnected pins across all modules, instead of just first error.
|
*** Report misconnected pins across all modules, instead of just first error.
|
||||||
|
|
||||||
@@ -561,7 +600,7 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
|
|
||||||
**** Added additional internal assertions.
|
**** Added additional internal assertions.
|
||||||
|
|
||||||
* Verilator 3.332 1/27/2005
|
* Verilator 3.332 2005/1/27
|
||||||
|
|
||||||
*** Added -E preprocess only flag, similar to GCC.
|
*** Added -E preprocess only flag, similar to GCC.
|
||||||
|
|
||||||
@@ -569,7 +608,7 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
|
|
||||||
**** Fixed loss of first -f file argument, introduced in 3.331.
|
**** Fixed loss of first -f file argument, introduced in 3.331.
|
||||||
|
|
||||||
* Verilator 3.331 1/18/2005
|
* Verilator 3.331 2005/1/18
|
||||||
|
|
||||||
** The Verilog::Perl preprocessor is now C++ code inside of Verilator.
|
** The Verilog::Perl preprocessor is now C++ code inside of Verilator.
|
||||||
This improves performance, makes compilation easier, and enables
|
This improves performance, makes compilation easier, and enables
|
||||||
@@ -579,7 +618,7 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
|
|
||||||
**** Fixed unlinked error with defparam. [Shawn Wang]
|
**** Fixed unlinked error with defparam. [Shawn Wang]
|
||||||
|
|
||||||
* Verilator 3.320 12/10/2004
|
* Verilator 3.320 2004/12/10
|
||||||
|
|
||||||
** NEWS is now renamed Changes, to support CPAN indexing.
|
** NEWS is now renamed Changes, to support CPAN indexing.
|
||||||
|
|
||||||
@@ -597,13 +636,13 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
|
|
||||||
**** Fixed compile warnings on Suse 9.1
|
**** Fixed compile warnings on Suse 9.1
|
||||||
|
|
||||||
* Verilator 3.311 11/29/2004
|
* Verilator 3.311 2004/11/29
|
||||||
|
|
||||||
** Support implicit wire declarations (as a warning). [Shawn Wang]
|
** Support implicit wire declarations (as a warning). [Shawn Wang]
|
||||||
|
|
||||||
**** Fixed over-shift difference in Verilog vs C++. [Ralf Karge]
|
**** Fixed over-shift difference in Verilog vs C++. [Ralf Karge]
|
||||||
|
|
||||||
* Verilator 3.310 11/15/2004
|
* Verilator 3.310 2004/11/15
|
||||||
|
|
||||||
** Support defparam.
|
** Support defparam.
|
||||||
|
|
||||||
@@ -611,7 +650,7 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
|
|
||||||
*** Ignore all specify blocks.
|
*** Ignore all specify blocks.
|
||||||
|
|
||||||
* Verilator 3.302 11/12/2004
|
* Verilator 3.302 2004/11/12
|
||||||
|
|
||||||
*** Support NAND and NOR operators.
|
*** Support NAND and NOR operators.
|
||||||
|
|
||||||
@@ -626,7 +665,7 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
|
|
||||||
**** Fixed runtime bit-selection of parameter constants.
|
**** Fixed runtime bit-selection of parameter constants.
|
||||||
|
|
||||||
* Verilator 3.301 11/04/2004
|
* Verilator 3.301 2004/11/04
|
||||||
|
|
||||||
**** Fixed 64 bit [31:0] = {#{}} mis-simulation. [Ralf Karge]
|
**** Fixed 64 bit [31:0] = {#{}} mis-simulation. [Ralf Karge]
|
||||||
|
|
||||||
@@ -634,7 +673,7 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
|
|
||||||
**** Work around GCC 2.96 negation bug.
|
**** Work around GCC 2.96 negation bug.
|
||||||
|
|
||||||
* Verilator 3.300 10/21/2004
|
* Verilator 3.300 2004/10/21
|
||||||
|
|
||||||
** New backend that eliminates most VL_ macros.
|
** New backend that eliminates most VL_ macros.
|
||||||
Improves performance 20%-50%, depending on frequency of use of signals
|
Improves performance 20%-50%, depending on frequency of use of signals
|
||||||
@@ -642,13 +681,13 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
|
|
||||||
**** Fixed "setting unsigned int from signed value" warning.
|
**** Fixed "setting unsigned int from signed value" warning.
|
||||||
|
|
||||||
* Verilator 3.271 10/21/2004
|
* Verilator 3.271 2004/10/21
|
||||||
|
|
||||||
**** Fixed "loops detected" error with some negedge clocks.
|
**** Fixed "loops detected" error with some negedge clocks.
|
||||||
|
|
||||||
**** Cleaned up some output code spacing issues.
|
**** Cleaned up some output code spacing issues.
|
||||||
|
|
||||||
* Verilator 3.270 10/15/2004
|
* Verilator 3.270 2004/10/15
|
||||||
|
|
||||||
*** Support Verilog 2001 parameters in module headers. [Ralf Karge]
|
*** Support Verilog 2001 parameters in module headers. [Ralf Karge]
|
||||||
|
|
||||||
@@ -656,7 +695,7 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
|
|
||||||
**** Faster code to support compilers not inlining all Verilated functions.
|
**** Faster code to support compilers not inlining all Verilated functions.
|
||||||
|
|
||||||
* Verilator 3.260 10/7/2004
|
* Verilator 3.260 2004/10/7
|
||||||
|
|
||||||
** Support Verilog 2001 named parameter instantiation. [Ralf Karge]
|
** Support Verilog 2001 named parameter instantiation. [Ralf Karge]
|
||||||
|
|
||||||
@@ -666,23 +705,23 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
|
|
||||||
**** Fixed incorrect dependency in .d file when setting VERILATOR_BIN.
|
**** Fixed incorrect dependency in .d file when setting VERILATOR_BIN.
|
||||||
|
|
||||||
* Verilator 3.251 9/9/2004
|
* Verilator 3.251 2004/9/9
|
||||||
|
|
||||||
**** Fixed parenthesis overflow in Microsoft Visual C++ [Renga Sundararajan]
|
**** Fixed parenthesis overflow in Microsoft Visual C++ [Renga Sundararajan]
|
||||||
|
|
||||||
* Verilator 3.250 8/30/2004
|
* Verilator 3.250 2004/8/30
|
||||||
|
|
||||||
** Support Microsoft Visual C++ [Renga Sundararajan]
|
** Support Microsoft Visual C++ [Renga Sundararajan]
|
||||||
|
|
||||||
*** SystemPerl 1.161+ is required.
|
*** SystemPerl 1.161+ is required.
|
||||||
|
|
||||||
* Verilator 3.241 8/17/2004
|
* Verilator 3.241 2004/8/17
|
||||||
|
|
||||||
** Support ,'s to separate multiple assignments. [Paul Nitza]
|
** Support ,'s to separate multiple assignments. [Paul Nitza]
|
||||||
|
|
||||||
**** Fixed shift sign extension problem using non-GCC compilers.
|
**** Fixed shift sign extension problem using non-GCC compilers.
|
||||||
|
|
||||||
* Verilator 3.240 8/13/2004
|
* Verilator 3.240 2004/8/13
|
||||||
|
|
||||||
** Verilator now uses 64 bit math where appropriate.
|
** Verilator now uses 64 bit math where appropriate.
|
||||||
Inputs and outputs of 33-64 bits wide to the C++ Verilated model must
|
Inputs and outputs of 33-64 bits wide to the C++ Verilated model must
|
||||||
@@ -695,7 +734,7 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
|
|
||||||
**** Fixed concat value error introduced in 3.230.
|
**** Fixed concat value error introduced in 3.230.
|
||||||
|
|
||||||
* Verilator 3.230 8/10/2004
|
* Verilator 3.230 2004/8/10
|
||||||
|
|
||||||
*** Added coverage output to test_sp example, SystemPerl 1.160+ is required.
|
*** Added coverage output to test_sp example, SystemPerl 1.160+ is required.
|
||||||
|
|
||||||
@@ -708,7 +747,7 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
**** Fixed wide signal width extension bug.
|
**** Fixed wide signal width extension bug.
|
||||||
Only applies when width mismatch warnings were overridden.
|
Only applies when width mismatch warnings were overridden.
|
||||||
|
|
||||||
* Verilator 3.220 6/22/2004
|
* Verilator 3.220 2004/6/22
|
||||||
|
|
||||||
** Many waveform tracing changes:
|
** Many waveform tracing changes:
|
||||||
|
|
||||||
@@ -722,7 +761,7 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
|
|
||||||
**** Various Cygwin compilation fixes. [John Brownlee]
|
**** Various Cygwin compilation fixes. [John Brownlee]
|
||||||
|
|
||||||
* Verilator 3.210 4/1/2004
|
* Verilator 3.210 2004/4/1
|
||||||
|
|
||||||
** Compiler optimization switches have changed
|
** Compiler optimization switches have changed
|
||||||
See the BENCHMARKING section of the documentation.
|
See the BENCHMARKING section of the documentation.
|
||||||
@@ -734,11 +773,11 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
|
|
||||||
*** Added warnings for SystemVerilog reserved words.
|
*** Added warnings for SystemVerilog reserved words.
|
||||||
|
|
||||||
* Verilator 3.203 3/10/2004
|
* Verilator 3.203 2004/3/10
|
||||||
|
|
||||||
*** Notes and repairs for Solaris. [Fred Ma]
|
*** Notes and repairs for Solaris. [Fred Ma]
|
||||||
|
|
||||||
* Verilator 3.202 1/27/2004
|
* Verilator 3.202 2004/1/27
|
||||||
|
|
||||||
** The beta version is now the primary release. See below for many changes.
|
** The beta version is now the primary release. See below for many changes.
|
||||||
If you have many problems, you may wish to try release 3.125.
|
If you have many problems, you may wish to try release 3.125.
|
||||||
@@ -751,7 +790,7 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
|
|
||||||
**** Added optimizations for common replication operations.
|
**** Added optimizations for common replication operations.
|
||||||
|
|
||||||
* Verilator 3.201-beta 12/10/2003
|
* Verilator 3.201-beta 2003/12/10
|
||||||
|
|
||||||
** BETA VERSION, USE 3.124 for stable release!
|
** BETA VERSION, USE 3.124 for stable release!
|
||||||
|
|
||||||
@@ -771,18 +810,18 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
This name will be used to prefix any $display %m arguments, so users may
|
This name will be used to prefix any $display %m arguments, so users may
|
||||||
distinguish between multiple Verilated modules in a single executable.
|
distinguish between multiple Verilated modules in a single executable.
|
||||||
|
|
||||||
* Verilator 3.125 1/27/2004
|
* Verilator 3.125 2004/1/27
|
||||||
|
|
||||||
**** Optimization of bit replications
|
**** Optimization of bit replications
|
||||||
|
|
||||||
* Verilator 3.124 12/05/2003
|
* Verilator 3.124 2003/12/05
|
||||||
|
|
||||||
*** A optimized executable will be made by default, in addition to a debug
|
*** A optimized executable will be made by default, in addition to a debug
|
||||||
executable. Invoking Verilator with --debug will pick the debug version.
|
executable. Invoking Verilator with --debug will pick the debug version.
|
||||||
|
|
||||||
**** Many minor invisible changes to support the next version.
|
**** Many minor invisible changes to support the next version.
|
||||||
|
|
||||||
* Verilator 3.123 11/10/2003
|
* Verilator 3.123 2003/11/10
|
||||||
|
|
||||||
**** Wide bus performance enhancements.
|
**** Wide bus performance enhancements.
|
||||||
|
|
||||||
@@ -790,7 +829,7 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
|
|
||||||
**** Fixed __DOT__ compile problem with funcs in last revision. [Leon Wildman]
|
**** Fixed __DOT__ compile problem with funcs in last revision. [Leon Wildman]
|
||||||
|
|
||||||
* Verilator 3.122 10/29/2003
|
* Verilator 3.122 2003/10/29
|
||||||
|
|
||||||
*** Modules which are accessed from external code now must be marked with
|
*** Modules which are accessed from external code now must be marked with
|
||||||
/*verilator public_module*/ unless they already contain public signals.
|
/*verilator public_module*/ unless they already contain public signals.
|
||||||
@@ -800,7 +839,7 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
|
|
||||||
**** Fixed function call bug when width warning suppressed. [Leon Wildman]
|
**** Fixed function call bug when width warning suppressed. [Leon Wildman]
|
||||||
|
|
||||||
* Verilator 3.121 09/29/2003
|
* Verilator 3.121 2003/09/29
|
||||||
|
|
||||||
*** Support multiplication over 32 bits. [Chris Boumenot]
|
*** Support multiplication over 32 bits. [Chris Boumenot]
|
||||||
Also improved speed of addition and subtraction over 32 bits.
|
Also improved speed of addition and subtraction over 32 bits.
|
||||||
@@ -811,7 +850,7 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
|
|
||||||
**** Fixed width problems on function arguments. [Robert A. Clark]
|
**** Fixed width problems on function arguments. [Robert A. Clark]
|
||||||
|
|
||||||
* Verilator 3.120 09/24/2003
|
* Verilator 3.120 2003/09/24
|
||||||
|
|
||||||
*** $finish now exits the model (via vl_finish function).
|
*** $finish now exits the model (via vl_finish function).
|
||||||
|
|
||||||
@@ -829,29 +868,29 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
|
|
||||||
**** Fixed $display("%x");
|
**** Fixed $display("%x");
|
||||||
|
|
||||||
* Verilator 3.112 09/16/2003
|
* Verilator 3.112 2003/09/16
|
||||||
|
|
||||||
**** Fixed functions in continuous assignments. [Robert A. Clark]
|
**** Fixed functions in continuous assignments. [Robert A. Clark]
|
||||||
|
|
||||||
**** Fixed inlining of modules with 2-level deep outputs.
|
**** Fixed inlining of modules with 2-level deep outputs.
|
||||||
|
|
||||||
* Verilator 3.111 09/15/2003
|
* Verilator 3.111 2003/09/15
|
||||||
|
|
||||||
**** Fixed declaration of functions before using that module. [Robert A. Clark]
|
**** Fixed declaration of functions before using that module. [Robert A. Clark]
|
||||||
|
|
||||||
**** Fixed module inlining bug with outputs.
|
**** Fixed module inlining bug with outputs.
|
||||||
|
|
||||||
* Verilator 3.110 09/12/2003
|
* Verilator 3.110 2003/09/12
|
||||||
|
|
||||||
** Support Verilog 2001 style input/output declarations. [Robert A. Clark]
|
** Support Verilog 2001 style input/output declarations. [Robert A. Clark]
|
||||||
|
|
||||||
*** Allow local vars in headers of function/tasks. [Leon Wildman]
|
*** Allow local vars in headers of function/tasks. [Leon Wildman]
|
||||||
|
|
||||||
* Verilator 3.109 08/28/2003
|
* Verilator 3.109 2003/08/28
|
||||||
|
|
||||||
** Added support for local variables in named begin blocks. [Leon Wildman]
|
** Added support for local variables in named begin blocks. [Leon Wildman]
|
||||||
|
|
||||||
* Verilator 3.108 08/11/2003
|
* Verilator 3.108 2003/08/11
|
||||||
|
|
||||||
** Added support for functions.
|
** Added support for functions.
|
||||||
|
|
||||||
@@ -863,7 +902,7 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
|
|
||||||
**** Many optimizations involving conditionals (?:)
|
**** Many optimizations involving conditionals (?:)
|
||||||
|
|
||||||
* Verilator 3.107 07/15/2003
|
* Verilator 3.107 2003/07/15
|
||||||
|
|
||||||
*** --private and --l2name are now the default,
|
*** --private and --l2name are now the default,
|
||||||
as this enables additional optimizations.
|
as this enables additional optimizations.
|
||||||
@@ -880,7 +919,7 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
|
|
||||||
**** Additional constant optimizations, ~5% speed improvement.
|
**** Additional constant optimizations, ~5% speed improvement.
|
||||||
|
|
||||||
* Verilator 3.106 06/17/2003
|
* Verilator 3.106 2003/06/17
|
||||||
|
|
||||||
** $c can now take multiple expressions as arguments.
|
** $c can now take multiple expressions as arguments.
|
||||||
For example $c("foo","bar(",32+1,");") will insert "foobar(33);"
|
For example $c("foo","bar(",32+1,");") will insert "foobar(33);"
|
||||||
@@ -904,11 +943,11 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
|
|
||||||
**** Several cleanups for Redhat 8.0.
|
**** Several cleanups for Redhat 8.0.
|
||||||
|
|
||||||
* Verilator 3.105 05/08/2003
|
* Verilator 3.105 2003/05/08
|
||||||
|
|
||||||
**** Fixed more GCC 3.2 errors. [David Black]
|
**** Fixed more GCC 3.2 errors. [David Black]
|
||||||
|
|
||||||
* Verilator 3.104 04/30/2003
|
* Verilator 3.104 2003/04/30
|
||||||
|
|
||||||
*** Indicate direction of ports with VL_IN and VL_OUT.
|
*** Indicate direction of ports with VL_IN and VL_OUT.
|
||||||
|
|
||||||
@@ -926,30 +965,30 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
|
|
||||||
**** Fixed GCC 3.2 compile errors. [Narayan Bhagavatula]
|
**** Fixed GCC 3.2 compile errors. [Narayan Bhagavatula]
|
||||||
|
|
||||||
* Verilator 3.103 01/28/2003
|
* Verilator 3.103 2003/01/28
|
||||||
|
|
||||||
**** Fixed missing model evaluation when clock generated several levels of
|
**** Fixed missing model evaluation when clock generated several levels of
|
||||||
hierarchy across from where it is used as a clock. [Richard Myers]
|
hierarchy across from where it is used as a clock. [Richard Myers]
|
||||||
|
|
||||||
**** Fixed sign-extension bug introduced in 3.102.
|
**** Fixed sign-extension bug introduced in 3.102.
|
||||||
|
|
||||||
* Verilator 3.102 01/24/2003
|
* Verilator 3.102 2003/01/24
|
||||||
|
|
||||||
**** Fixed sign-extension of X/Z's ("32'hx")
|
**** Fixed sign-extension of X/Z's ("32'hx")
|
||||||
|
|
||||||
* Verilator 3.101 01/13/2003
|
* Verilator 3.101 2003/01/13
|
||||||
|
|
||||||
**** Fixed 'parameter FOO=#'bXXXX' [Richard Myers]
|
**** Fixed 'parameter FOO=#'bXXXX' [Richard Myers]
|
||||||
|
|
||||||
**** Allow spaces inside numbers ("32'h 1234") [Sam Gladstone]
|
**** Allow spaces inside numbers ("32'h 1234") [Sam Gladstone]
|
||||||
|
|
||||||
* Verilator 3.100 12/23/2002
|
* Verilator 3.100 2002/12/23
|
||||||
|
|
||||||
** Support for simple tasks w/o vars or I/O. [Richard Myers]
|
** Support for simple tasks w/o vars or I/O. [Richard Myers]
|
||||||
|
|
||||||
**** Ignore DOS carriage returns in Linux files. [Richard Myers]
|
**** Ignore DOS carriage returns in Linux files. [Richard Myers]
|
||||||
|
|
||||||
* Verilator 3.012 12/18/2002
|
* Verilator 3.012 2002/12/18
|
||||||
|
|
||||||
**** Fixed parsing bug with casex statements containing case items
|
**** Fixed parsing bug with casex statements containing case items
|
||||||
with bit extracts of parameters. [Richard Myers]
|
with bit extracts of parameters. [Richard Myers]
|
||||||
@@ -962,20 +1001,20 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
|
|
||||||
**** Fixed compile with threaded Perl. [Ami Keren]
|
**** Fixed compile with threaded Perl. [Ami Keren]
|
||||||
|
|
||||||
* Verilator 3.010 11/3/2002
|
* Verilator 3.010 2002/11/3
|
||||||
|
|
||||||
*** Support SystemC 2.0.1. SystemPerl version 1.130 or newer is required.
|
*** Support SystemC 2.0.1. SystemPerl version 1.130 or newer is required.
|
||||||
|
|
||||||
**** Fixed bug with inlined modules under other inlined modules. [Scott
|
**** Fixed bug with inlined modules under other inlined modules. [Scott
|
||||||
Bleiweiss]
|
Bleiweiss]
|
||||||
|
|
||||||
* Verilator 3.005 10/21/2002
|
* Verilator 3.005 2002/10/21
|
||||||
|
|
||||||
**** Fixed X's in case (not casex/z) to constant propagate correctly.
|
**** Fixed X's in case (not casex/z) to constant propagate correctly.
|
||||||
|
|
||||||
**** Fixed missing include. [Kurachi]
|
**** Fixed missing include. [Kurachi]
|
||||||
|
|
||||||
* Verilator 3.004 10/10/2002
|
* Verilator 3.004 2002/10/10
|
||||||
|
|
||||||
*** Added /* verilator module_inline */ and associated optimizations.
|
*** Added /* verilator module_inline */ and associated optimizations.
|
||||||
|
|
||||||
@@ -990,7 +1029,7 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
|
|
||||||
**** Additional concatenation optimizations.
|
**** Additional concatenation optimizations.
|
||||||
|
|
||||||
* Verilator 3.003 09/13/2002
|
* Verilator 3.003 2002/09/13
|
||||||
|
|
||||||
*** Now compiles on Windows 2000 with Cygwin.
|
*** Now compiles on Windows 2000 with Cygwin.
|
||||||
|
|
||||||
@@ -998,11 +1037,11 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
|
|
||||||
**** Optimize wire assignments to constants.
|
**** Optimize wire assignments to constants.
|
||||||
|
|
||||||
* Verilator 3.002 08/19/2002
|
* Verilator 3.002 2002/08/19
|
||||||
|
|
||||||
** First public release of version 3.
|
** First public release of version 3.
|
||||||
|
|
||||||
* Verilator 3.000 08/03/2002
|
* Verilator 3.000 2002/08/03
|
||||||
|
|
||||||
** All new code base. Many changes too numerous to mention.
|
** All new code base. Many changes too numerous to mention.
|
||||||
|
|
||||||
@@ -1012,7 +1051,7 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
*** Supports `defines across multiple modules
|
*** Supports `defines across multiple modules
|
||||||
*** Optimizes call ordering, constant propagation, and dead code elimination.
|
*** Optimizes call ordering, constant propagation, and dead code elimination.
|
||||||
|
|
||||||
* Verilator 2.1.8 04/03/2002
|
* Verilator 2.1.8 2002/04/03
|
||||||
|
|
||||||
** All applications must now link against include/verilated.cpp
|
** All applications must now link against include/verilated.cpp
|
||||||
|
|
||||||
@@ -1028,7 +1067,7 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
|
|
||||||
**** Split evaluation function into clocked and non-clocked, 20% perf gain.
|
**** Split evaluation function into clocked and non-clocked, 20% perf gain.
|
||||||
|
|
||||||
* Verilator 2.1.5 12/1/2001
|
* Verilator 2.1.5 2001/12/1
|
||||||
|
|
||||||
** Added coverage analysis. In conjunction with SystemC provide line
|
** Added coverage analysis. In conjunction with SystemC provide line
|
||||||
coverage reports, without SystemC, provide a hook to user written
|
coverage reports, without SystemC, provide a hook to user written
|
||||||
@@ -1046,15 +1085,15 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
|
|
||||||
**** Fixed corruption of assignments of signal over 32 bits with non-0 lsb.
|
**** Fixed corruption of assignments of signal over 32 bits with non-0 lsb.
|
||||||
|
|
||||||
* Verilator 2.1.4 11/16/2001
|
* Verilator 2.1.4 2001/11/16
|
||||||
|
|
||||||
** Added $c("c_commands();"); for embedding arbitrary C code in Verilog.
|
** Added $c("c_commands();"); for embedding arbitrary C code in Verilog.
|
||||||
|
|
||||||
* Verilator 2.1.3 11/03/2001
|
* Verilator 2.1.3 2001/11/03
|
||||||
|
|
||||||
** Support for parameters.
|
** Support for parameters.
|
||||||
|
|
||||||
* Verilator 2.1.2 10/25/2001
|
* Verilator 2.1.2 2001/10/25
|
||||||
|
|
||||||
** Verilog Errors now reference the .v file rather then the .vpp file.
|
** Verilog Errors now reference the .v file rather then the .vpp file.
|
||||||
|
|
||||||
@@ -1069,7 +1108,7 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
|
|
||||||
**** Fixed bug where XNOR on odd-bit-widths (~^ or ^~) had bad value.
|
**** Fixed bug where XNOR on odd-bit-widths (~^ or ^~) had bad value.
|
||||||
|
|
||||||
* Verilator 2.1.1 5/17/2001
|
* Verilator 2.1.1 2001/5/17
|
||||||
|
|
||||||
** New test_sp directory for System-Perl (SystemC) top level instantiation
|
** New test_sp directory for System-Perl (SystemC) top level instantiation
|
||||||
of the Verilated code, lower modules are still C++ code. (Experimental).
|
of the Verilated code, lower modules are still C++ code. (Experimental).
|
||||||
@@ -1084,42 +1123,42 @@ of input ports exists for tracing.
|
|||||||
|
|
||||||
**** Many code cleanups towards standard C++ style conventions.
|
**** Many code cleanups towards standard C++ style conventions.
|
||||||
|
|
||||||
* Verilator 2.1.0 5/8/2001
|
* Verilator 2.1.0 2001/5/8
|
||||||
|
|
||||||
**** Many code cleanups towards standard C++ style conventions.
|
**** Many code cleanups towards standard C++ style conventions.
|
||||||
|
|
||||||
* {Version history lost}
|
* {Version history lost}
|
||||||
|
|
||||||
* Verilator 1.8 7/8/1996
|
* Verilator 1.8 1996/7/8
|
||||||
|
|
||||||
** [Versions 0 to 1.8 were by Paul Wasson]
|
** [Versions 0 to 1.8 were by Paul Wasson]
|
||||||
|
|
||||||
**** Fixed single bit in concat from instance output incorrect offset bug.
|
**** Fixed single bit in concat from instance output incorrect offset bug.
|
||||||
|
|
||||||
* Verilator 1.7 5/20/1996
|
* Verilator 1.7 1996/5/20
|
||||||
|
|
||||||
**** Mask unused bits of DONTCAREs.
|
**** Mask unused bits of DONTCAREs.
|
||||||
|
|
||||||
* Verilator 1.6 5/13/1996
|
* Verilator 1.6 1996/5/13
|
||||||
|
|
||||||
*** Added fasttrace script
|
*** Added fasttrace script
|
||||||
|
|
||||||
* Verilator 1.5 1/9/1996
|
* Verilator 1.5 1996/1/9
|
||||||
|
|
||||||
*** Pass structure pointer into translated code,
|
*** Pass structure pointer into translated code,
|
||||||
so multiple instances can use same functions.
|
so multiple instances can use same functions.
|
||||||
|
|
||||||
**** Fixed static value concat on casex items.
|
**** Fixed static value concat on casex items.
|
||||||
|
|
||||||
* Verilator 1.1 3/30/1995
|
* Verilator 1.1 1995/3/30
|
||||||
|
|
||||||
*** Bug fixes, added verimake_partial script, performance improvements.
|
*** Bug fixes, added verimake_partial script, performance improvements.
|
||||||
|
|
||||||
* Verilator 1.0c 9/30/1994
|
* Verilator 1.0c 1994/9/30
|
||||||
|
|
||||||
*** Initial release of Verilator
|
*** Initial release of Verilator
|
||||||
|
|
||||||
* Verilator 0.0 7/8/1994
|
* Verilator 0.0 1994/7/8
|
||||||
|
|
||||||
**** First code written.
|
**** First code written.
|
||||||
|
|
||||||
@@ -1129,7 +1168,7 @@ $Id$
|
|||||||
|
|
||||||
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-2007 by Wilson Snyder. This program is free software;
|
Copyright 2001-2008 by Wilson Snyder. This program is free software;
|
||||||
you can redistribute it and/or modify it under the terms of either the GNU
|
you can redistribute it and/or modify it under the terms of either the GNU
|
||||||
General Public License or the Perl Artistic License.
|
General Public License or the Perl Artistic License.
|
||||||
|
|
||||||
|
|||||||
+19
-6
@@ -10,7 +10,7 @@
|
|||||||
#
|
#
|
||||||
#*****************************************************************************
|
#*****************************************************************************
|
||||||
#
|
#
|
||||||
# Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
# Copyright 2003-2008 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
|
||||||
# General Public License or the Perl Artistic License.
|
# General Public License or the Perl Artistic License.
|
||||||
#
|
#
|
||||||
@@ -78,6 +78,7 @@ datadir = @datadir@
|
|||||||
infodir = @infodir@
|
infodir = @infodir@
|
||||||
|
|
||||||
# Directory in which to install package specific files
|
# Directory in which to install package specific files
|
||||||
|
# Generally ${prefix}/share/verilator
|
||||||
pkgdatadir = @pkgdatadir@
|
pkgdatadir = @pkgdatadir@
|
||||||
|
|
||||||
#### End of system configuration section. ####
|
#### End of system configuration section. ####
|
||||||
@@ -140,6 +141,7 @@ msg_test:
|
|||||||
@echo "Type 'make test' to test."
|
@echo "Type 'make test' to test."
|
||||||
@echo
|
@echo
|
||||||
|
|
||||||
|
.PHONY:test
|
||||||
ifeq ($(VERILATOR_AUTHOR_SITE),1) # Local... Else don't burden users
|
ifeq ($(VERILATOR_AUTHOR_SITE),1) # Local... Else don't burden users
|
||||||
test: test_vcs test_c test_sc test_sp test_verilated test_regress
|
test: test_vcs test_c test_sc test_sp test_verilated test_regress
|
||||||
else
|
else
|
||||||
@@ -203,21 +205,31 @@ README: readme.texi
|
|||||||
$(MAKEINFO) -I$(srcdir) $(srcdir)/readme.texi --output=$@ \
|
$(MAKEINFO) -I$(srcdir) $(srcdir)/readme.texi --output=$@ \
|
||||||
--no-headers --no-validate
|
--no-headers --no-validate
|
||||||
|
|
||||||
installdirs:
|
|
||||||
$(SHELL) ${srcdir}/mkinstalldirs $(bindir) $(infodir)
|
|
||||||
|
|
||||||
# See uninstall also
|
# See uninstall also
|
||||||
VL_INST_BIN_FILES = verilator
|
VL_INST_BIN_FILES = verilator verilator_bin verilator_bin_dbg
|
||||||
installbin:
|
installbin:
|
||||||
|
$(SHELL) ${srcdir}/mkinstalldirs $(bindir)
|
||||||
( cd bin ; $(INSTALL_PROGRAM) verilator $(bindir)/verilator )
|
( cd bin ; $(INSTALL_PROGRAM) verilator $(bindir)/verilator )
|
||||||
|
( $(INSTALL_PROGRAM) verilator_bin $(bindir)/verilator_bin )
|
||||||
|
( $(INSTALL_PROGRAM) verilator_bin_dbg $(bindir)/verilator_bin_dbg )
|
||||||
|
|
||||||
VL_INST_MAN_FILES = verilator.1
|
VL_INST_MAN_FILES = verilator.1
|
||||||
installman:
|
installman:
|
||||||
|
$(SHELL) ${srcdir}/mkinstalldirs $(mandir)
|
||||||
for p in $(VL_INST_MAN_FILES) ; do \
|
for p in $(VL_INST_MAN_FILES) ; do \
|
||||||
$(INSTALL_PROGRAM) $$p $(mandir)/man1/$$p; \
|
$(INSTALL_PROGRAM) $$p $(mandir)/man1/$$p; \
|
||||||
done
|
done
|
||||||
|
|
||||||
install: all_nomsg installdirs installbin installman install-msg
|
installdata:
|
||||||
|
$(SHELL) ${srcdir}/mkinstalldirs $(pkgdatadir)/examples
|
||||||
|
cp -r include $(pkgdatadir)
|
||||||
|
cp -r src $(pkgdatadir)
|
||||||
|
cp -r test_c $(pkgdatadir)/examples
|
||||||
|
cp -r test_sc $(pkgdatadir)/examples
|
||||||
|
cp -r test_sp $(pkgdatadir)/examples
|
||||||
|
|
||||||
|
VL_INST_DATA_FILES = verilator.1
|
||||||
|
install: all_nomsg installbin installman installdata install-msg
|
||||||
|
|
||||||
install-here: installman ftp
|
install-here: installman ftp
|
||||||
|
|
||||||
@@ -263,6 +275,7 @@ install-msg:
|
|||||||
uninstall:
|
uninstall:
|
||||||
-cd $(mandir)/man1 && rm -f $(VL_INST_MAN_FILES)
|
-cd $(mandir)/man1 && rm -f $(VL_INST_MAN_FILES)
|
||||||
-cd $(bindir) && rm -f $(VL_INST_BIN_FILES)
|
-cd $(bindir) && rm -f $(VL_INST_BIN_FILES)
|
||||||
|
-rm -f $(pkgdatadir)
|
||||||
|
|
||||||
# autoheader might not change config_build.h.in, so touch a stamp file.
|
# autoheader might not change config_build.h.in, so touch a stamp file.
|
||||||
IN_WILD := ${srcdir}/*.in ${srcdir}/*/*.in ${srcdir}/*/*/*.in \
|
IN_WILD := ${srcdir}/*.in ${srcdir}/*/*.in ${srcdir}/*/*/*.in \
|
||||||
|
|||||||
@@ -1,167 +0,0 @@
|
|||||||
1 Verilator
|
|
||||||
***********
|
|
||||||
|
|
||||||
This is the Verilator Package.
|
|
||||||
|
|
||||||
1.1 Copyright
|
|
||||||
=============
|
|
||||||
|
|
||||||
This package is Copyright 2003-2007 by Wilson Snyder
|
|
||||||
<[email protected]>.
|
|
||||||
|
|
||||||
You may distribute under the terms of either the GNU General Public
|
|
||||||
License or the Artistic License, as specified in the Perl README file.
|
|
||||||
|
|
||||||
This code is provided with no warranty of any kind, and is used
|
|
||||||
entirely at your own risk.
|
|
||||||
|
|
||||||
1.2 Description
|
|
||||||
===============
|
|
||||||
|
|
||||||
Verilator converts synthesizable (not behavioral) Verilog code into C++
|
|
||||||
or SystemC code. It is not a complete simulator, just a translator.
|
|
||||||
|
|
||||||
Verilator is invoked with parameters similar to GCC or Synopsys's
|
|
||||||
VCS. It reads the specified Verilog code, lints it, and optionally
|
|
||||||
adds coverage code. For C++ format, it outputs .cpp and .h files. For
|
|
||||||
SystemC format, it outputs .sp files for the SystemPerl preprocessor
|
|
||||||
available at http://veripool.com.
|
|
||||||
|
|
||||||
The resulting files are then compiled with C++. The user writes a
|
|
||||||
little C++ wrapper file, which instantiates the top level module. This
|
|
||||||
is compiled in C++, and linked with the Verilated files.
|
|
||||||
|
|
||||||
The resulting executable will perform the actual simulation.
|
|
||||||
|
|
||||||
1.3 Obtaining Distribution
|
|
||||||
==========================
|
|
||||||
|
|
||||||
The latest version is available at `http://veripool.com/verilator.htm'
|
|
||||||
|
|
||||||
Download the latest package from that site, and decompress. `gunzip
|
|
||||||
verilator_version.tar.gz ; tar xvf verilator_version.tar'
|
|
||||||
|
|
||||||
1.4 Directory Structure
|
|
||||||
=======================
|
|
||||||
|
|
||||||
The directories after de-taring are as follows:
|
|
||||||
|
|
||||||
* bin/verilator => Compiler Wrapper invoked on user Verilog code
|
|
||||||
|
|
||||||
* include/ => Files that should be in your -I compiler
|
|
||||||
path
|
|
||||||
|
|
||||||
* include/verilated.cpp => Global routines to link into your
|
|
||||||
simulator
|
|
||||||
|
|
||||||
* include/verilated.h => Global headers
|
|
||||||
|
|
||||||
* include/verilated.v => Stub defines for linting
|
|
||||||
|
|
||||||
* include/verilated.mk => Common makefile
|
|
||||||
|
|
||||||
* src/ => Translator source code
|
|
||||||
|
|
||||||
* test_v => Example Verilog code for other test dirs
|
|
||||||
|
|
||||||
* test_c => Example Verilog->C++ conversion
|
|
||||||
|
|
||||||
* test_sc => Example Verilog->SystemC conversion
|
|
||||||
|
|
||||||
* test_sp => Example Verilog->SystemPerl conversion
|
|
||||||
|
|
||||||
* test_vcs => Example Verilog->VCS conversion (test the
|
|
||||||
test)
|
|
||||||
|
|
||||||
* test_verilated => Internal tests
|
|
||||||
|
|
||||||
* test_regress => Internal tests
|
|
||||||
|
|
||||||
1.5 Supported Systems
|
|
||||||
=====================
|
|
||||||
|
|
||||||
This version of verilator has been built and tested on:
|
|
||||||
|
|
||||||
* SuSE AMD64 i686-linux-2.6.5
|
|
||||||
|
|
||||||
Other users report success with Redhat Linux 2.4, Windows under
|
|
||||||
Cygwin, HPUX and Solaris. It should run with minor porting on any Unix
|
|
||||||
system.
|
|
||||||
|
|
||||||
1.6 Installation
|
|
||||||
================
|
|
||||||
|
|
||||||
1. If you will be using SystemC (vs straight C++ output), download
|
|
||||||
SystemC 2.0.1 from `http://www.systemc.org'. Follow their
|
|
||||||
installation instructions. As described in the System-Perl README,
|
|
||||||
you will need to set SYSTEMC and/or SYSTEMC_KIT to point to this
|
|
||||||
download. Also, set SYSTEMC_ARCH to the architecture name you used
|
|
||||||
with SystemC, generally 'linux' or 'cygwin'.
|
|
||||||
|
|
||||||
2. If you will be using SystemC, download and install Verilog-Perl,
|
|
||||||
`http://search.cpan.org/search?module=Verilog::Language'.
|
|
||||||
|
|
||||||
3. If you will be using SystemC, download and install System-Perl,
|
|
||||||
`http://search.cpan.org/search?module=SystemC::Netlist'. Note
|
|
||||||
you'll need to set a `SYSTEMPERL' environment variable to point to
|
|
||||||
the downloaded kit (not the installed files.) Also, make sure to
|
|
||||||
do a `make sc_patch'.
|
|
||||||
|
|
||||||
4. `cd' to the Verilator directory containing this README.
|
|
||||||
|
|
||||||
5. Type `./configure' to configure Verilator for your system.
|
|
||||||
|
|
||||||
6. Type `make' to compile Verilator.
|
|
||||||
|
|
||||||
On Cygwin (Windows) you may get a error about libperl.a not being
|
|
||||||
found. You need to copy your perl libraries as follows.
|
|
||||||
|
|
||||||
1. Type `perl -MExtUtils::Embed -e ldopts'
|
|
||||||
|
|
||||||
2. It will show a directory name ending in /CORE. cd to that
|
|
||||||
directory.
|
|
||||||
|
|
||||||
3. `cp libperl5_6_1.a libperl.a'
|
|
||||||
|
|
||||||
4. `cp libperl5_6_1.dll libperl.dll'
|
|
||||||
|
|
||||||
5. `cp libperl5_6_1.def libperl.def'
|
|
||||||
|
|
||||||
7. Type `make test' to check the compilation.
|
|
||||||
|
|
||||||
You may get a error about the Bit::Vector perl package. You will
|
|
||||||
need to install it if you want the tests to pass. (Try `make
|
|
||||||
test_c' for a smaller test that doesn't require it.)
|
|
||||||
|
|
||||||
You may get a error about a typedef conflict for uint32_t. Edit
|
|
||||||
verilated.h to change the typedef to work, probably to `typedef
|
|
||||||
unsigned long uint32_t;'.
|
|
||||||
|
|
||||||
If you get warnings, you might want to edit `include/verilated.mk'
|
|
||||||
to delete the lines that define VK_CPPFLAGS_WALL.
|
|
||||||
|
|
||||||
8. There is no installation at present; this package runs from the
|
|
||||||
distribution directory. Programs should set the environment
|
|
||||||
variable VERILATOR_ROOT to point to this distribution, then execute
|
|
||||||
$VERILATOR_ROOT/bin/verilator, which will find the path to all
|
|
||||||
needed files.
|
|
||||||
|
|
||||||
Verilator assumes you did a make in the SystemC kit directory. If
|
|
||||||
not, you will need to populate `$SYSTEMC/include' and
|
|
||||||
`$SYSTEMC/lib-linux' appropriately.
|
|
||||||
|
|
||||||
If you will be modifying Verilator, you will probably want a second
|
|
||||||
stable copy of this kit for others to use while you experiment.
|
|
||||||
|
|
||||||
9. Detailed documentation and the man page can be seen by running:
|
|
||||||
|
|
||||||
bin/verilator -help
|
|
||||||
|
|
||||||
or reading verilator.txt in the same directory as this README.
|
|
||||||
|
|
||||||
|
|
||||||
1.7 Limitations
|
|
||||||
===============
|
|
||||||
|
|
||||||
See verilator.txt (or execute `bin/verilator --help') for limitations.
|
|
||||||
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
// $Id$
|
// $Id$
|
||||||
// DESCRIPTION: Verilator: List of To Do issues.
|
// DESCRIPTION: Verilator: List of To Do issues.
|
||||||
//
|
//
|
||||||
// Copyright 2004-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2004-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
|
|
||||||
@@ -52,6 +52,10 @@ Usability:
|
|||||||
Better reporting of unopt problems, including what lines of code
|
Better reporting of unopt problems, including what lines of code
|
||||||
Report more errors (all of them?) before exiting [Eugene Weber]
|
Report more errors (all of them?) before exiting [Eugene Weber]
|
||||||
|
|
||||||
|
Internal Code:
|
||||||
|
Eliminate the AstNUser* passed to all visitors; its only needed in V3Width,
|
||||||
|
and removing it will speed up and simplify all the other code.
|
||||||
|
|
||||||
Performance:
|
Performance:
|
||||||
Constant propagation
|
Constant propagation
|
||||||
Extra cleaning AND: 1 & ((VARREF >> 1) | ((&VARREF >> 1) & VARREF))
|
Extra cleaning AND: 1 & ((VARREF >> 1) | ((&VARREF >> 1) & VARREF))
|
||||||
|
|||||||
+78
-78
@@ -4,7 +4,7 @@ eval 'exec perl -wS $0 ${1+"$@"}'
|
|||||||
# $Id$
|
# $Id$
|
||||||
######################################################################
|
######################################################################
|
||||||
#
|
#
|
||||||
# Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
# Copyright 2003-2008 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
|
||||||
# General Public License or the Perl Artistic License.
|
# General Public License or the Perl Artistic License.
|
||||||
#
|
#
|
||||||
@@ -34,27 +34,7 @@ use Config;
|
|||||||
use Cwd qw(abs_path getcwd);
|
use Cwd qw(abs_path getcwd);
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use vars qw ($Debug %Vars $Opt $Opt_Make_Dir $Opt_Sp @Opt_Verilator_Sw
|
use vars qw ($Debug @Opt_Verilator_Sw);
|
||||||
$Opt_Trace
|
|
||||||
%Modules
|
|
||||||
);
|
|
||||||
|
|
||||||
#######################################################################
|
|
||||||
# Global constants -- Configuration info
|
|
||||||
|
|
||||||
# Where to find real executables
|
|
||||||
# We could find it by using $RealBin, but we require this path
|
|
||||||
# so that when the user runs make, they will have it and not get strange error.
|
|
||||||
$ENV{VERILATOR_ROOT} or die "%Error: verilator: VERILATOR_ROOT needs to be in environment\n";
|
|
||||||
print "export VERILATOR_ROOT=$ENV{VERILATOR_ROOT}\n" if $Debug;
|
|
||||||
|
|
||||||
# Read by verilator for populating makefile
|
|
||||||
if (!defined $ENV{SYSTEMC_ARCH}) {
|
|
||||||
$ENV{SYSTEMC_ARCH} ||= (($Config{osname} =~ /solaris/i && "gccsparcOS5")
|
|
||||||
|| ($Config{osname} =~ /cygwin/i && "cygwin")
|
|
||||||
|| "linux");
|
|
||||||
print "export SYSTEMC_ARCH=$ENV{SYSTEMC_ARCH}\n" if $Debug;
|
|
||||||
}
|
|
||||||
|
|
||||||
#######################################################################
|
#######################################################################
|
||||||
#######################################################################
|
#######################################################################
|
||||||
@@ -65,7 +45,6 @@ autoflush STDERR 1;
|
|||||||
|
|
||||||
$Debug = 0;
|
$Debug = 0;
|
||||||
my $opt_gdb;
|
my $opt_gdb;
|
||||||
$Opt_Sp = undef;
|
|
||||||
|
|
||||||
# No arguments can't do anything useful. Give help
|
# No arguments can't do anything useful. Give help
|
||||||
if ($#ARGV < 0) {
|
if ($#ARGV < 0) {
|
||||||
@@ -84,33 +63,15 @@ if (! GetOptions (
|
|||||||
# Major operating modes
|
# Major operating modes
|
||||||
"help" => \&usage,
|
"help" => \&usage,
|
||||||
"debug:s" => \&debug,
|
"debug:s" => \&debug,
|
||||||
"version!" => \&version,
|
# "version!" => \&version, # Also passthru'ed
|
||||||
# Switches
|
# Switches
|
||||||
"gdb=s" => \$opt_gdb, # Undocumented debugging
|
"gdb=s" => \$opt_gdb, # Undocumented debugging
|
||||||
"trace!" => \$Opt_Trace,
|
|
||||||
"sp!" => sub {$Opt_Sp = 'sp';},
|
|
||||||
"sc!" => sub {$Opt_Sp = 'sc';},
|
|
||||||
"cc!" => sub {$Opt_Sp = 0;},
|
|
||||||
#"ignc!" => ..., # Undocumented debugging, disable $c but don't complain
|
|
||||||
# Additional parameters
|
# Additional parameters
|
||||||
"<>" => sub {}, # Ignored
|
"<>" => sub {}, # Ignored
|
||||||
)) {
|
)) {
|
||||||
pod2usage(-exitstatus=>2, -verbose=>0);
|
pod2usage(-exitstatus=>2, -verbose=>0);
|
||||||
}
|
}
|
||||||
|
|
||||||
# Check configuration
|
|
||||||
if ($Opt_Sp) {
|
|
||||||
(defined $ENV{SYSTEMC}) or die "%Error: verilator: Need \$SYSTEMC in environment\nProbably System-C isn't installed, see http://www.systemc.org\n";
|
|
||||||
}
|
|
||||||
if ($Opt_Sp eq 'sp' || $Opt_Trace) {
|
|
||||||
if (!defined $ENV{SYSTEMPERL}) {
|
|
||||||
my $try = "$ENV{W}/hw/utils/perltools/SystemC";
|
|
||||||
$ENV{SYSTEMPERL} = $try if -d $try;
|
|
||||||
}
|
|
||||||
(defined $ENV{SYSTEMPERL}) or die "%Error: verilator: Need \$SYSTEMPERL in environment for --sp or --trace\nProbably System-Perl isn't installed, see http://www.veripool.com/systemperl.html\n";
|
|
||||||
(-d "$ENV{SYSTEMPERL}/src") or die "%Error: verilator: \$SYSTEMPERL environment var doesn't seem to point to System-Perl kit\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
# Determine runtime flags
|
# Determine runtime flags
|
||||||
my $vcmd =(($opt_gdb?"$opt_gdb ":"")
|
my $vcmd =(($opt_gdb?"$opt_gdb ":"")
|
||||||
.verilator_bin()
|
.verilator_bin()
|
||||||
@@ -123,7 +84,6 @@ run ($vcmd);
|
|||||||
#----------------------------------------------------------------------
|
#----------------------------------------------------------------------
|
||||||
|
|
||||||
sub usage {
|
sub usage {
|
||||||
bin_version();
|
|
||||||
print '$Revision$$Date$ ', "\n";
|
print '$Revision$$Date$ ', "\n";
|
||||||
pod2usage(-exitstatus=>2, -verbose=>2);
|
pod2usage(-exitstatus=>2, -verbose=>2);
|
||||||
}
|
}
|
||||||
@@ -134,23 +94,16 @@ sub debug {
|
|||||||
$Debug = $level||3;
|
$Debug = $level||3;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub version {
|
|
||||||
bin_version();
|
|
||||||
exit (0);
|
|
||||||
}
|
|
||||||
|
|
||||||
sub bin_version {
|
|
||||||
($ENV{VERILATOR_ROOT}) or print "%Warning: Unknown rev: VERILATOR_ROOT undefined\n";
|
|
||||||
run (verilator_bin()." --version");
|
|
||||||
}
|
|
||||||
|
|
||||||
#######################################################################
|
#######################################################################
|
||||||
#######################################################################
|
#######################################################################
|
||||||
# Builds
|
# Builds
|
||||||
|
|
||||||
sub verilator_bin {
|
sub verilator_bin {
|
||||||
my $bin = "$ENV{VERILATOR_ROOT}/".($ENV{VERILATOR_BIN}||"verilator_bin");
|
my $bin = "";
|
||||||
if ($Debug && -x "${bin}_dbg") { $bin = "${bin}_dbg"; }
|
# Use VERILATOR_ROOT if defined, else assume verilator_bin is in the search path
|
||||||
|
$bin .= $ENV{VERILATOR_ROOT}."/" if defined($ENV{VERILATOR_ROOT});
|
||||||
|
$bin .= ($ENV{VERILATOR_BIN}||"verilator_bin");
|
||||||
|
if ($Debug) { $bin = "${bin}_dbg"; }
|
||||||
return $bin;
|
return $bin;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -165,8 +118,11 @@ sub run {
|
|||||||
system($command);
|
system($command);
|
||||||
my $status = $?;
|
my $status = $?;
|
||||||
if ($status) {
|
if ($status) {
|
||||||
|
if ($! =~ /no such file or directory/i) {
|
||||||
|
warn "%Error: verilator: Misinstalled, or VERILATOR_ROOT might need to be in environment\n";
|
||||||
|
}
|
||||||
if ($Debug) { # For easy rerunning
|
if ($Debug) { # For easy rerunning
|
||||||
warn "%Error: export VERILATOR_ROOT=$ENV{VERILATOR_ROOT}\n";
|
warn "%Error: export VERILATOR_ROOT=".($ENV{VERILATOR_ROOT}||"")."\n";
|
||||||
warn "%Error: $command\n";
|
warn "%Error: $command\n";
|
||||||
}
|
}
|
||||||
die "%Error: Command Failed $command\n";
|
die "%Error: Command Failed $command\n";
|
||||||
@@ -234,6 +190,7 @@ descriptions in the next sections for more information.
|
|||||||
--debug-check Enable debugging assertions
|
--debug-check Enable debugging assertions
|
||||||
--dump-tree Enable dumping .tree files
|
--dump-tree Enable dumping .tree files
|
||||||
-E Preprocess, but do not compile
|
-E Preprocess, but do not compile
|
||||||
|
--error-limit <value> Abort after this number of errors
|
||||||
--exe Link to create executable
|
--exe Link to create executable
|
||||||
-f <file> Parse options from a file
|
-f <file> Parse options from a file
|
||||||
--help Display this help.
|
--help Display this help.
|
||||||
@@ -392,6 +349,11 @@ Preprocess the source code, but do not compile, as with 'gcc -E'. Output
|
|||||||
is written to standard out. Beware of enabling debugging messages, as they
|
is written to standard out. Beware of enabling debugging messages, as they
|
||||||
will also go to standard out.
|
will also go to standard out.
|
||||||
|
|
||||||
|
=item --error-limit <value>
|
||||||
|
|
||||||
|
After this number of errors or warnings are encountered, exit. Defaults to
|
||||||
|
50.
|
||||||
|
|
||||||
=item --exe
|
=item --exe
|
||||||
|
|
||||||
Generate a executable. You will also need to pass additional .cpp files on
|
Generate a executable. You will also need to pass additional .cpp files on
|
||||||
@@ -434,7 +396,7 @@ to gcc -MP option.
|
|||||||
=item --Mdir I<directory>
|
=item --Mdir I<directory>
|
||||||
|
|
||||||
Specifies the name of the Make object directory. All generated files will
|
Specifies the name of the Make object directory. All generated files will
|
||||||
be placed in this directory.
|
be placed in this directory. If not specified, "obj_dir" is used.
|
||||||
|
|
||||||
=item --mod-prefix I<topname>
|
=item --mod-prefix I<topname>
|
||||||
|
|
||||||
@@ -489,8 +451,8 @@ the backward-compatible default of sc_bv's.
|
|||||||
|
|
||||||
=item --prefix I<topname>
|
=item --prefix I<topname>
|
||||||
|
|
||||||
Specifies the name of the top level class. Defaults to the name of the top
|
Specifies the name of the top level class. Defaults to the name of the first
|
||||||
level Verilog module.
|
Verilog file passed on the command line.
|
||||||
|
|
||||||
=item --profile-cfuncs
|
=item --profile-cfuncs
|
||||||
|
|
||||||
@@ -538,9 +500,12 @@ Creates a dump file with statistics on the design in {prefix}__stats.txt.
|
|||||||
|
|
||||||
=item --trace
|
=item --trace
|
||||||
|
|
||||||
Adds waveform tracing code to the model. Having tracing compiled in may
|
Adds waveform tracing code to the model, this will create additional
|
||||||
result in some small performance losses, even when waveforms are not turned
|
{prefix}__Trace*.cpp files you will need to add to your Makefiles, if
|
||||||
on during model execution.
|
you're not using the ones generated for you.
|
||||||
|
|
||||||
|
Having tracing compiled in may result in some small performance losses,
|
||||||
|
even when waveforms are not turned on during model execution.
|
||||||
|
|
||||||
=item --trace-depth I<levels>
|
=item --trace-depth I<levels>
|
||||||
|
|
||||||
@@ -868,14 +833,16 @@ After running Make, the C++ compiler should produce the following:
|
|||||||
|
|
||||||
Required for SystemC output mode. If set, specifies the directory
|
Required for SystemC output mode. If set, specifies the directory
|
||||||
containing the SystemC distribution. This is used to find the SystemC
|
containing the SystemC distribution. This is used to find the SystemC
|
||||||
include files.
|
include files. If not specified, it will come from a default optionally
|
||||||
|
specified at configure time (before Verilator was compiled).
|
||||||
|
|
||||||
=item SYSTEMC_ARCH
|
=item SYSTEMC_ARCH
|
||||||
|
|
||||||
Specifies the architecture name used by the SystemC kit. This is the part
|
Specifies the architecture name used by the SystemC kit. This is the part
|
||||||
after the dash in the lib-{...} directory name created by a 'make' in the
|
after the dash in the lib-{...} directory name created by a 'make' in the
|
||||||
SystemC distribution. If not set, Verilator will try to intuit the proper
|
SystemC distribution. If not set, Verilator will try to intuit the proper
|
||||||
setting.
|
setting, or use the default optionally specified at configure time (before
|
||||||
|
Verilator was compiled). .
|
||||||
|
|
||||||
=item SYSTEMC_CXX_FLAGS
|
=item SYSTEMC_CXX_FLAGS
|
||||||
|
|
||||||
@@ -885,7 +852,9 @@ building the SystemC model.
|
|||||||
=item SYSTEMPERL
|
=item SYSTEMPERL
|
||||||
|
|
||||||
Specifies the directory containing the Verilog-Perl distribution kit. This
|
Specifies the directory containing the Verilog-Perl distribution kit. This
|
||||||
is used to find the Verilog-Perl library and include files.
|
is used to find the Verilog-Perl library and include files. If not
|
||||||
|
specified, it will come from a default optionally specified at configure
|
||||||
|
time (before Verilator was compiled).
|
||||||
|
|
||||||
=item VCS_HOME
|
=item VCS_HOME
|
||||||
|
|
||||||
@@ -901,7 +870,9 @@ for debugging and selecting between multiple operating system builds.
|
|||||||
=item VERILATOR_ROOT
|
=item VERILATOR_ROOT
|
||||||
|
|
||||||
Specifies the directory containing the distribution kit. This is used to
|
Specifies the directory containing the distribution kit. This is used to
|
||||||
find the executable, Perl library, and include files.
|
find the executable, Perl library, and include files. If not specified, it
|
||||||
|
will come from a default optionally specified at configure time (before
|
||||||
|
Verilator was compiled).
|
||||||
|
|
||||||
=back
|
=back
|
||||||
|
|
||||||
@@ -1730,6 +1701,23 @@ not really needed. The best solution is to insure that each module is in a
|
|||||||
unique file by the same name. Otherwise, make sure all library files are
|
unique file by the same name. Otherwise, make sure all library files are
|
||||||
read in as libraries with -v, instead of automatically with -y.
|
read in as libraries with -v, instead of automatically with -y.
|
||||||
|
|
||||||
|
=item REDEFMACRO
|
||||||
|
|
||||||
|
Warns that you have redefined the same macro with a different value, for
|
||||||
|
example:
|
||||||
|
|
||||||
|
`define MACRO def1
|
||||||
|
//...
|
||||||
|
`define MACRO otherdef
|
||||||
|
|
||||||
|
The best solution is to use a different name for the second macro. If this
|
||||||
|
is not possible, add a undef to indicate the code is overriding the value:
|
||||||
|
|
||||||
|
`define MACRO def1
|
||||||
|
//...
|
||||||
|
`undef MACRO
|
||||||
|
`define MACRO otherdef
|
||||||
|
|
||||||
=item STMTDLY
|
=item STMTDLY
|
||||||
|
|
||||||
Warns that you have a statement with a delayed time in front of it, for
|
Warns that you have a statement with a delayed time in front of it, for
|
||||||
@@ -1940,11 +1928,14 @@ Visual C++ Version 7 or newer, but this is not tested by the author.
|
|||||||
|
|
||||||
=item Can you provide binaries?
|
=item Can you provide binaries?
|
||||||
|
|
||||||
At this time I'd prefer to get patches out quickly than have to generate
|
Verilator is available as a RPM for SuSE and perhaps other systems; this is
|
||||||
myriad binaries for many different OS flavors. People have generally
|
done by porters and may slightly lag the primary distribution. If there
|
||||||
requested binaries when they are having problems with their C++
|
isn't a binary build for your distribution, how about you set one up?
|
||||||
compiler. Alas, binaries won't help this, as in the end a fully working C++
|
Please contact the authors for assistance.
|
||||||
compiler is required to compile the output of Verilator.
|
|
||||||
|
Note people sometimes request binaries when they are having problems with
|
||||||
|
their C++ compiler. Alas, binaries won't help this, as in the end a fully
|
||||||
|
working C++ compiler is required to compile the output of Verilator.
|
||||||
|
|
||||||
=item How can it be faster than (name-the-simulator)?
|
=item How can it be faster than (name-the-simulator)?
|
||||||
|
|
||||||
@@ -1979,9 +1970,9 @@ using --debug), see if your machine is paging; most likely you need to run
|
|||||||
it on a machine with more memory. Verilator is a full 64 bit application
|
it on a machine with more memory. Verilator is a full 64 bit application
|
||||||
and may use more than 4GB, but about 1GB is the maximum typically needed.
|
and may use more than 4GB, but about 1GB is the maximum typically needed.
|
||||||
|
|
||||||
=item How do I generate waveforms (traces) in C++?
|
=item How do I generate waveforms (traces) in C++ or SystemC?
|
||||||
|
|
||||||
See the next question for tracing in SystemC mode.
|
See the next question for tracing in SystemPerl mode.
|
||||||
|
|
||||||
Add the --trace switch to Verilator, and make sure the SystemPerl package
|
Add the --trace switch to Verilator, and make sure the SystemPerl package
|
||||||
is installed. SystemC itself does not need to be installed for C++ only
|
is installed. SystemC itself does not need to be installed for C++ only
|
||||||
@@ -1998,7 +1989,7 @@ distribution.
|
|||||||
You also need to compile SpTraceVcdC.cpp and add it to your link. This is
|
You also need to compile SpTraceVcdC.cpp and add it to your link. This is
|
||||||
done for you if using the Verilator --exe flag.
|
done for you if using the Verilator --exe flag.
|
||||||
|
|
||||||
=item How do I generate waveforms (traces) in SystemC?
|
=item How do I generate waveforms (traces) in SystemPerl?
|
||||||
|
|
||||||
Add the --trace switch to Verilator, and make sure the SystemPerl package
|
Add the --trace switch to Verilator, and make sure the SystemPerl package
|
||||||
is installed.
|
is installed.
|
||||||
@@ -2027,15 +2018,24 @@ the "verilator" define for you, so just wrap the code in a ifndef region:
|
|||||||
|
|
||||||
=item Why do I get "unexpected `do'" or "unexpected `bit'" errors?
|
=item Why do I get "unexpected `do'" or "unexpected `bit'" errors?
|
||||||
|
|
||||||
Do, bit, ref, and other words are now SystemVerilog keywords. You should
|
Do, bit, ref, return, and other words are now SystemVerilog keywords. You
|
||||||
change your code to not use them to insure it works with newer tools.
|
should change your code to not use them to insure it works with newer
|
||||||
Alternatively, surround them by the Verilog 2005/SystemVerilog
|
tools. Alternatively, surround them by the Verilog 2005/SystemVerilog
|
||||||
begin_keywords pragma to indicate Verilog 2001 code.
|
begin_keywords pragma to indicate Verilog 2001 code.
|
||||||
|
|
||||||
`begin_keywords "1364-2001"
|
`begin_keywords "1364-2001"
|
||||||
integer bit; initial bit = 1;
|
integer bit; initial bit = 1;
|
||||||
`end_keywords
|
`end_keywords
|
||||||
|
|
||||||
|
If you want the whole file to be parsed as Verilog 2001, just create a
|
||||||
|
file with
|
||||||
|
|
||||||
|
`begin_keywords "1364-2001"
|
||||||
|
|
||||||
|
and add it before other Verilog files on the command line. (Note this will
|
||||||
|
also change the default for --prefix, so if you're not using --prefix, you
|
||||||
|
will now need to.)
|
||||||
|
|
||||||
=item How do I prevent my assertions from firing during reset?
|
=item How do I prevent my assertions from firing during reset?
|
||||||
|
|
||||||
Call Verilated::assertOn(false) before you first call the model, then turn
|
Call Verilated::assertOn(false) before you first call the model, then turn
|
||||||
@@ -2215,7 +2215,7 @@ Eugene Weber, Leon Wildman, and Mat Zeno.
|
|||||||
|
|
||||||
The latest version is available from L<http://www.veripool.com/>.
|
The latest version is available from L<http://www.veripool.com/>.
|
||||||
|
|
||||||
Copyright 2003-2007 by Wilson Snyder. Verilator is free software; you can
|
Copyright 2003-2008 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 or the Perl Artistic License.
|
General Public License or the Perl Artistic License.
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ eval 'exec perl -wS $0 ${1+"$@"}'
|
|||||||
# $Id$
|
# $Id$
|
||||||
######################################################################
|
######################################################################
|
||||||
#
|
#
|
||||||
# Copyright 2005-2007 by Wilson Snyder <[email protected]>. This
|
# Copyright 2005-2008 by Wilson Snyder <[email protected]>. This
|
||||||
# program is free software; you can redistribute it and/or modify it under
|
# program is free software; you can redistribute it and/or modify it under
|
||||||
# the terms of either the GNU Lesser General Public License or the Perl
|
# the terms of either the GNU Lesser General Public License or the Perl
|
||||||
# Artistic License.
|
# Artistic License.
|
||||||
@@ -180,7 +180,7 @@ Displays this message and program version and exits.
|
|||||||
|
|
||||||
The latest version is available from L<http://www.veripool.com/>.
|
The latest version is available from L<http://www.veripool.com/>.
|
||||||
|
|
||||||
Copyright 2005-2007 by Wilson Snyder. This package is free software; you
|
Copyright 2005-2008 by Wilson Snyder. This package 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 or the Perl Artistic License.
|
Lesser General Public License or the Perl Artistic License.
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ eval 'exec perl -wS $0 ${1+"$@"}'
|
|||||||
# $Id$
|
# $Id$
|
||||||
# DESCRIPTION: Print include statements for each ARGV
|
# DESCRIPTION: Print include statements for each ARGV
|
||||||
#
|
#
|
||||||
# Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
# Copyright 2003-2008 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
|
||||||
# General Public License or the Perl Artistic License.
|
# General Public License or the Perl Artistic License.
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ eval 'exec perl -wS $0 ${1+"$@"}'
|
|||||||
# $Id$
|
# $Id$
|
||||||
######################################################################
|
######################################################################
|
||||||
#
|
#
|
||||||
# Copyright 2007-2007 by Wilson Snyder <[email protected]>. This
|
# Copyright 2007-2008 by Wilson Snyder <[email protected]>. This
|
||||||
# program is free software; you can redistribute it and/or modify it under
|
# program is free software; you can redistribute it and/or modify it under
|
||||||
# the terms of either the GNU Lesser General Public License or the Perl
|
# the terms of either the GNU Lesser General Public License or the Perl
|
||||||
# Artistic License.
|
# Artistic License.
|
||||||
@@ -191,7 +191,7 @@ Displays this message and program version and exits.
|
|||||||
|
|
||||||
The latest version is available from L<http://www.veripool.com/>.
|
The latest version is available from L<http://www.veripool.com/>.
|
||||||
|
|
||||||
Copyright 2007-2007 by Wilson Snyder. This package is free software; you
|
Copyright 2007-2008 by Wilson Snyder. This package 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 or the Perl Artistic License.
|
Lesser General Public License or the Perl Artistic License.
|
||||||
|
|
||||||
|
|||||||
+5
-1
@@ -1,6 +1,6 @@
|
|||||||
dnl $Id$
|
dnl $Id$
|
||||||
dnl DESCRIPTION: Process this file with autoconf to produce a configure script.
|
dnl DESCRIPTION: Process this file with autoconf to produce a configure script.
|
||||||
dnl Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
dnl Copyright 2003-2008 by Wilson Snyder. This program is free software; you can
|
||||||
dnl redistribute it and/or modify it under the terms of either the GNU
|
dnl redistribute it and/or modify it under the terms of either the GNU
|
||||||
dnl General Public License or the Perl Artistic License.
|
dnl General Public License or the Perl Artistic License.
|
||||||
|
|
||||||
@@ -9,6 +9,10 @@ AC_INIT(src/Verilator.cpp)
|
|||||||
AC_CONFIG_HEADER(src/config_build.h)
|
AC_CONFIG_HEADER(src/config_build.h)
|
||||||
|
|
||||||
dnl Special Substitutions
|
dnl Special Substitutions
|
||||||
|
AC_ARG_ENABLE(defenv,
|
||||||
|
[AS_HELP_STRING([--enable-defenv], [hardcode default environment variables])],
|
||||||
|
CFG_WITH_DEFENV=1,)
|
||||||
|
AC_SUBST(CFG_WITH_DEFENV)
|
||||||
|
|
||||||
dnl Checks for programs.
|
dnl Checks for programs.
|
||||||
CXX=g++
|
CXX=g++
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// $Id$ -*- C++ -*-
|
// $Id$ -*- C++ -*-
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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 or the Perl Artistic License.
|
// Lesser General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
// $Id$ -*- C++ -*-
|
// $Id$ -*- C++ -*-
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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 or the Perl Artistic License.
|
// Lesser General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
+13
-2
@@ -2,7 +2,7 @@
|
|||||||
######################################################################
|
######################################################################
|
||||||
# DESCRIPTION: Makefile commands for all verilated target files
|
# DESCRIPTION: Makefile commands for all verilated target files
|
||||||
#
|
#
|
||||||
# Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
# Copyright 2003-2008 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 or the Perl Artistic License.
|
# Lesser General Public License or the Perl Artistic License.
|
||||||
######################################################################
|
######################################################################
|
||||||
@@ -77,7 +77,6 @@ VM_SUPPORT += $(VM_SUPPORT_FAST) $(VM_SUPPORT_SLOW)
|
|||||||
ifeq ($(VM_SP_OR_SC),1)
|
ifeq ($(VM_SP_OR_SC),1)
|
||||||
CPPFLAGS += $(SYSTEMC_CXX_FLAGS) -I$(SYSTEMC)/include
|
CPPFLAGS += $(SYSTEMC_CXX_FLAGS) -I$(SYSTEMC)/include
|
||||||
LDFLAGS += $(SYSTEMC_CXX_FLAGS) -L$(SYSTEMC)/lib-$(VM_SC_TARGET_ARCH)
|
LDFLAGS += $(SYSTEMC_CXX_FLAGS) -L$(SYSTEMC)/lib-$(VM_SC_TARGET_ARCH)
|
||||||
LIBS += -lm -lstdc++
|
|
||||||
SC_LIBS = -lsystemc
|
SC_LIBS = -lsystemc
|
||||||
ifneq ($(wildcard $(SYSTEMC)/lib-$(VM_SC_TARGET_ARCH)/*numeric_bit*),)
|
ifneq ($(wildcard $(SYSTEMC)/lib-$(VM_SC_TARGET_ARCH)/*numeric_bit*),)
|
||||||
# Systemc 1.2.1beta
|
# Systemc 1.2.1beta
|
||||||
@@ -91,6 +90,7 @@ endif
|
|||||||
ifeq ($(VM_SP),1)
|
ifeq ($(VM_SP),1)
|
||||||
CPPFLAGS += -I$(SYSTEMPERL)/src -DSYSTEMPERL
|
CPPFLAGS += -I$(SYSTEMPERL)/src -DSYSTEMPERL
|
||||||
VPATH += $(SYSTEMPERL)/src
|
VPATH += $(SYSTEMPERL)/src
|
||||||
|
LIBS += -lm -lstdc++
|
||||||
|
|
||||||
VK_CLASSES_SP = $(addsuffix .sp, $(VM_CLASSES))
|
VK_CLASSES_SP = $(addsuffix .sp, $(VM_CLASSES))
|
||||||
|
|
||||||
@@ -103,6 +103,17 @@ else
|
|||||||
preproc:
|
preproc:
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
#######################################################################
|
||||||
|
##### SystemC w/o SystemPerl builds
|
||||||
|
|
||||||
|
ifeq ($(VM_SC),1)
|
||||||
|
LIBS += -lm -lstdc++
|
||||||
|
ifeq ($(VM_TRACE),1)
|
||||||
|
CPPFLAGS += -I$(SYSTEMPERL)/src
|
||||||
|
VPATH += $(SYSTEMPERL)/src
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
#######################################################################
|
#######################################################################
|
||||||
##### C/H builds
|
##### C/H builds
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -5,7 +5,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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 or the Perl Artistic License.
|
// Lesser General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// $Id$ -*- C++ -*-
|
// $Id$ -*- C++ -*-
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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 or the Perl Artistic License.
|
// Lesser General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
#$Id$
|
#$Id$
|
||||||
######################################################################
|
######################################################################
|
||||||
#
|
#
|
||||||
# Copyright 2007-2007 by Wilson Snyder.
|
# Copyright 2007-2008 by Wilson Snyder.
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of either the GNU General Public License or the
|
# it under the terms of either the GNU General Public License or the
|
||||||
|
|||||||
+2
-2
@@ -2,7 +2,7 @@
|
|||||||
# $Id$
|
# $Id$
|
||||||
######################################################################
|
######################################################################
|
||||||
#
|
#
|
||||||
# Copyright 2005-2007 by Wilson Snyder <[email protected]>. This
|
# Copyright 2005-2008 by Wilson Snyder <[email protected]>. This
|
||||||
# program is free software; you can redistribute it and/or modify it under
|
# program is free software; you can redistribute it and/or modify it under
|
||||||
# the terms of either the GNU Lesser General Public License or the Perl
|
# the terms of either the GNU Lesser General Public License or the Perl
|
||||||
# Artistic License.
|
# Artistic License.
|
||||||
@@ -156,7 +156,7 @@ Displays this message and program version and exits.
|
|||||||
|
|
||||||
=head1 DISTRIBUTION
|
=head1 DISTRIBUTION
|
||||||
|
|
||||||
Copyright 2005-2007 by Wilson Snyder. This package is free software; you
|
Copyright 2005-2008 by Wilson Snyder. This package 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 or the Perl Artistic License.
|
Lesser General Public License or the Perl Artistic License.
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -2,7 +2,7 @@
|
|||||||
# $Id$
|
# $Id$
|
||||||
######################################################################
|
######################################################################
|
||||||
#
|
#
|
||||||
# Copyright 2005-2007 by Wilson Snyder <[email protected]>. This
|
# Copyright 2005-2008 by Wilson Snyder <[email protected]>. This
|
||||||
# program is free software; you can redistribute it and/or modify it under
|
# program is free software; you can redistribute it and/or modify it under
|
||||||
# the terms of either the GNU Lesser General Public License or the Perl
|
# the terms of either the GNU Lesser General Public License or the Perl
|
||||||
# Artistic License.
|
# Artistic License.
|
||||||
@@ -197,7 +197,7 @@ Displays this message and program version and exits.
|
|||||||
|
|
||||||
=head1 DISTRIBUTION
|
=head1 DISTRIBUTION
|
||||||
|
|
||||||
Copyright 2005-2007 by Wilson Snyder. This package is free software; you
|
Copyright 2005-2008 by Wilson Snyder. This package 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 or the Perl Artistic License.
|
Lesser General Public License or the Perl Artistic License.
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
# $Id$
|
# $Id$
|
||||||
######################################################################
|
######################################################################
|
||||||
#
|
#
|
||||||
# Copyright 2007-2007 by Wilson Snyder <[email protected]>. This
|
# Copyright 2007-2008 by Wilson Snyder <[email protected]>. This
|
||||||
# program is free software; you can redistribute it and/or modify it under
|
# program is free software; you can redistribute it and/or modify it under
|
||||||
# the terms of either the GNU Lesser General Public License or the Perl
|
# the terms of either the GNU Lesser General Public License or the Perl
|
||||||
# Artistic License.
|
# Artistic License.
|
||||||
@@ -52,7 +52,7 @@ invoke_ncverilog - Invoke tool under "modules" command
|
|||||||
|
|
||||||
=head1 DISTRIBUTION
|
=head1 DISTRIBUTION
|
||||||
|
|
||||||
Copyright 2007-2007 by Wilson Snyder. This package is free software; you
|
Copyright 2007-2008 by Wilson Snyder. This package 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 or the Perl Artistic License.
|
Lesser General Public License or the Perl Artistic License.
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
# $Id$
|
# $Id$
|
||||||
######################################################################
|
######################################################################
|
||||||
#
|
#
|
||||||
# Copyright 2005-2007 by Wilson Snyder <[email protected]>. This
|
# Copyright 2005-2008 by Wilson Snyder <[email protected]>. This
|
||||||
# program is free software; you can redistribute it and/or modify it under
|
# program is free software; you can redistribute it and/or modify it under
|
||||||
# the terms of either the GNU Lesser General Public License or the Perl
|
# the terms of either the GNU Lesser General Public License or the Perl
|
||||||
# Artistic License.
|
# Artistic License.
|
||||||
@@ -344,7 +344,7 @@ Displays this message and program version and exits.
|
|||||||
|
|
||||||
=head1 DISTRIBUTION
|
=head1 DISTRIBUTION
|
||||||
|
|
||||||
Copyright 2005-2007 by Wilson Snyder. This package is free software; you
|
Copyright 2005-2008 by Wilson Snyder. This package 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 or the Perl Artistic License.
|
Lesser General Public License or the Perl Artistic License.
|
||||||
|
|
||||||
|
|||||||
+7
-1
@@ -27,7 +27,7 @@ This is the Verilator Package.
|
|||||||
@node Copyright, Description, Top, Top
|
@node Copyright, Description, Top, Top
|
||||||
@section Copyright
|
@section Copyright
|
||||||
|
|
||||||
This package is Copyright 2003-2007 by Wilson Snyder @email{wsnyder@@wsnyder.org}.
|
This package is Copyright 2003-2008 by Wilson Snyder @email{wsnyder@@wsnyder.org}.
|
||||||
|
|
||||||
You may distribute under the terms of either the GNU General Public License
|
You may distribute under the terms of either the GNU General Public License
|
||||||
or the Artistic License, as specified in the Perl README file.
|
or the Artistic License, as specified in the Perl README file.
|
||||||
@@ -126,6 +126,12 @@ do a @code{make sc_patch}.
|
|||||||
@item
|
@item
|
||||||
Type @samp{./configure} to configure Verilator for your system.
|
Type @samp{./configure} to configure Verilator for your system.
|
||||||
|
|
||||||
|
If you are configuring Verilator to be part of a RPM or other
|
||||||
|
distribution package system, you may want to use the --enable-defenv
|
||||||
|
configure flag. This will take the current value of VERILATOR_ROOT,
|
||||||
|
SYSTEMC, SYSTEMC_ARCH, and SYSTEMPERL and build them as defaults into
|
||||||
|
the executable.
|
||||||
|
|
||||||
@item
|
@item
|
||||||
Type @samp{make} to compile Verilator.
|
Type @samp{make} to compile Verilator.
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -7,7 +7,7 @@
|
|||||||
#
|
#
|
||||||
#*****************************************************************************
|
#*****************************************************************************
|
||||||
#
|
#
|
||||||
# Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
# Copyright 2003-2008 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
|
||||||
# General Public License or the Perl Artistic License.
|
# General Public License or the Perl Artistic License.
|
||||||
#
|
#
|
||||||
|
|||||||
+22
-1
@@ -7,7 +7,7 @@
|
|||||||
#
|
#
|
||||||
#*****************************************************************************
|
#*****************************************************************************
|
||||||
#
|
#
|
||||||
# Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
# Copyright 2003-2008 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
|
||||||
# General Public License or the Perl Artistic License.
|
# General Public License or the Perl Artistic License.
|
||||||
#
|
#
|
||||||
@@ -30,6 +30,14 @@ LINK = @CXX@
|
|||||||
|
|
||||||
LDFLAGS += @LDFLAGS@
|
LDFLAGS += @LDFLAGS@
|
||||||
|
|
||||||
|
CFG_WITH_DEFENV = @CFG_WITH_DEFENV@
|
||||||
|
|
||||||
|
prefix = @prefix@
|
||||||
|
|
||||||
|
# Directory in which to install package specific files
|
||||||
|
# Generally ${prefix}/share/verilator
|
||||||
|
pkgdatadir = @pkgdatadir@
|
||||||
|
|
||||||
#### End of system configuration section. ####
|
#### End of system configuration section. ####
|
||||||
|
|
||||||
VPATH += . $(srcdir)
|
VPATH += . $(srcdir)
|
||||||
@@ -70,6 +78,19 @@ CPPFLAGS += -W -Wall -Wno-unused-parameter -Wno-char-subscripts -Werror
|
|||||||
#CPPFLAGS += -pedantic-errors
|
#CPPFLAGS += -pedantic-errors
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# Allow RPM builds to specify hardcoded data directories
|
||||||
|
# To do this:
|
||||||
|
ifneq ($(CFG_WITH_DEFENV),)
|
||||||
|
CPPFLAGS += -DDEFENV_SYSTEMC=\"$(SYSTEMC)\"
|
||||||
|
CPPFLAGS += -DDEFENV_SYSTEMC_ARCH=\"$(SYSTEMC_ARCH)\"
|
||||||
|
CPPFLAGS += -DDEFENV_SYSTEMPERL=\"$(SYSTEMPERL)\"
|
||||||
|
ifeq ($(VERILATOR_ROOT),) # Use what we're given, or intuit
|
||||||
|
CPPFLAGS += -DDEFENV_VERILATOR_ROOT=\"$(pkgdatadir)\"
|
||||||
|
else
|
||||||
|
CPPFLAGS += -DDEFENV_VERILATOR_ROOT=\"$(VERILATOR_ROOT)\"
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
HEADERS = $(wildcard V*.h v*.h)
|
HEADERS = $(wildcard V*.h v*.h)
|
||||||
|
|
||||||
ASTGEN = $(srcdir)/astgen
|
ASTGEN = $(srcdir)/astgen
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2005-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2005-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2005-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2005-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2005-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2005-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2005-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2005-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
+18
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
@@ -83,6 +83,20 @@ void AstNode::init() {
|
|||||||
m_user5Cnt = 0;
|
m_user5Cnt = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
string AstNode::encodeName(const string& namein) {
|
||||||
|
string name2 = namein;
|
||||||
|
string out;
|
||||||
|
for (string::iterator pos = name2.begin(); pos != name2.end(); pos++) {
|
||||||
|
if (pos[0]=='_' && pos[1]=='_') {
|
||||||
|
out += "__ULUL_";
|
||||||
|
pos++;
|
||||||
|
} else {
|
||||||
|
out += pos[0];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return out;
|
||||||
|
}
|
||||||
|
|
||||||
string AstNode::shortName() const {
|
string AstNode::shortName() const {
|
||||||
string pretty = name();
|
string pretty = name();
|
||||||
string::size_type pos;
|
string::size_type pos;
|
||||||
@@ -114,6 +128,9 @@ string AstNode::prettyName(const string& namein) {
|
|||||||
while ((pos=pretty.find("__PVT__")) != string::npos) {
|
while ((pos=pretty.find("__PVT__")) != string::npos) {
|
||||||
pretty.replace(pos, 7, "");
|
pretty.replace(pos, 7, "");
|
||||||
}
|
}
|
||||||
|
while ((pos=pretty.find("__ULUL_")) != string::npos) {
|
||||||
|
pretty.replace(pos, 7, "");
|
||||||
|
}
|
||||||
return AstNode::dedotName(pretty);
|
return AstNode::dedotName(pretty);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
@@ -558,6 +558,7 @@ public:
|
|||||||
string shortName() const; // Name with __PVT__ removed for concatenating scopes
|
string shortName() const; // Name with __PVT__ removed for concatenating scopes
|
||||||
static string dedotName(const string& namein); // Name with dots removed
|
static string dedotName(const string& namein); // Name with dots removed
|
||||||
static string prettyName(const string& namein); // Name for printing out to the user
|
static string prettyName(const string& namein); // Name for printing out to the user
|
||||||
|
static string encodeName(const string& namein); // Encode user name into internal C representation
|
||||||
string prettyName() const { return prettyName(name()); }
|
string prettyName() const { return prettyName(name()); }
|
||||||
FileLine* fileline() const { return m_fileline; }
|
FileLine* fileline() const { return m_fileline; }
|
||||||
int width() const { return m_width; }
|
int width() const { return m_width; }
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2004-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2004-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2004-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2004-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
+116
-12
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
@@ -39,11 +39,63 @@
|
|||||||
#include "V3Width.h"
|
#include "V3Width.h"
|
||||||
#include "V3Signed.h"
|
#include "V3Signed.h"
|
||||||
|
|
||||||
|
//######################################################################
|
||||||
|
// Utilities
|
||||||
|
|
||||||
|
class ConstVarMarkVisitor : public AstNVisitor {
|
||||||
|
// NODE STATE
|
||||||
|
// AstVar::userp -> bool, Var marked, 0=not set yet
|
||||||
|
private:
|
||||||
|
// VISITORS
|
||||||
|
virtual void visit(AstVarRef* nodep, AstNUser*) {
|
||||||
|
if (nodep->varp()) nodep->varp()->user(1);
|
||||||
|
}
|
||||||
|
virtual void visit(AstNode* nodep, AstNUser*) {
|
||||||
|
nodep->iterateChildren(*this);
|
||||||
|
}
|
||||||
|
public:
|
||||||
|
// CONSTUCTORS
|
||||||
|
ConstVarMarkVisitor(AstNode* nodep) {
|
||||||
|
AstNode::userClearTree();
|
||||||
|
nodep->iterateAndNext(*this, NULL);
|
||||||
|
}
|
||||||
|
virtual ~ConstVarMarkVisitor() {}
|
||||||
|
};
|
||||||
|
|
||||||
|
class ConstVarFindVisitor : public AstNVisitor {
|
||||||
|
// NODE STATE
|
||||||
|
// AstVar::userp -> bool, input from ConstVarMarkVisitor
|
||||||
|
// MEMBERS
|
||||||
|
bool m_found;
|
||||||
|
private:
|
||||||
|
// VISITORS
|
||||||
|
virtual void visit(AstVarRef* nodep, AstNUser*) {
|
||||||
|
if (nodep->varp() && nodep->varp()->user()) m_found = true;
|
||||||
|
}
|
||||||
|
virtual void visit(AstNode* nodep, AstNUser*) {
|
||||||
|
nodep->iterateChildren(*this);
|
||||||
|
}
|
||||||
|
public:
|
||||||
|
// CONSTUCTORS
|
||||||
|
ConstVarFindVisitor(AstNode* nodep) {
|
||||||
|
m_found = false;
|
||||||
|
nodep->iterateAndNext(*this, NULL);
|
||||||
|
}
|
||||||
|
virtual ~ConstVarFindVisitor() {}
|
||||||
|
// METHODS
|
||||||
|
bool found() const { return m_found; }
|
||||||
|
};
|
||||||
|
|
||||||
//######################################################################
|
//######################################################################
|
||||||
// Const state, as a visitor of each AstNode
|
// Const state, as a visitor of each AstNode
|
||||||
|
|
||||||
class ConstVisitor : public AstNVisitor {
|
class ConstVisitor : public AstNVisitor {
|
||||||
private:
|
private:
|
||||||
|
// NODE STATE
|
||||||
|
// ** only when m_warn is set. If state is needed other times,
|
||||||
|
// ** must track down everywhere V3Const is called and make sure no overlaps.
|
||||||
|
// AstVar::userp -> Used by ConstVarMarkVisitor/ConstVarFindVisitor
|
||||||
|
|
||||||
// STATE
|
// STATE
|
||||||
bool m_params; // If true, propogate parameterized and true numbers only
|
bool m_params; // If true, propogate parameterized and true numbers only
|
||||||
bool m_required; // If true, must become a constant
|
bool m_required; // If true, must become a constant
|
||||||
@@ -494,10 +546,26 @@ private:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (!m_cpp && nodep->lhsp()->castConcat()) {
|
else if (!m_cpp && nodep->lhsp()->castConcat()) {
|
||||||
UINFO(4," ASSI "<<nodep<<endl);
|
bool need_temp = false;
|
||||||
|
if (m_warn && !nodep->castAssignDly()) { // Is same var on LHS and RHS?
|
||||||
|
ConstVarMarkVisitor mark(nodep->lhsp());
|
||||||
|
ConstVarFindVisitor find(nodep->rhsp());
|
||||||
|
if (find.found()) need_temp = true;
|
||||||
|
}
|
||||||
|
if (need_temp) {
|
||||||
|
// The first time we constify, there may be the same variable on the LHS
|
||||||
|
// and RHS. In that case, we must use temporaries, or {a,b}={b,a} will break.
|
||||||
|
UINFO(4," ASSITEMP "<<nodep<<endl);
|
||||||
|
// ASSIGN(CONCAT(lc1,lc2),rhs) -> ASSIGN(temp1,SEL(rhs,{size})),
|
||||||
|
// ASSIGN(temp2,SEL(newrhs,{size}))
|
||||||
|
// ASSIGN(lc1,temp1),
|
||||||
|
// ASSIGN(lc2,temp2)
|
||||||
|
} else {
|
||||||
|
UINFO(4," ASSI "<<nodep<<endl);
|
||||||
|
// ASSIGN(CONCAT(lc1,lc2),rhs) -> ASSIGN(lc1,SEL(rhs,{size})),
|
||||||
|
// ASSIGN(lc2,SEL(newrhs,{size}))
|
||||||
|
}
|
||||||
if (debug()>=9) nodep->dumpTree(cout," Ass_old: ");
|
if (debug()>=9) nodep->dumpTree(cout," Ass_old: ");
|
||||||
// ASSIGN(CONCAT(lc1,lc2),rhs) -> ASSIGN(lc1,SEL(rhs,{size})),
|
|
||||||
// ASSIGN(lc2,SEL(newrhs,{size}))
|
|
||||||
// Unlink the stuff
|
// Unlink the stuff
|
||||||
AstNode* lc1p = nodep->lhsp()->castConcat()->lhsp()->unlinkFrBack();
|
AstNode* lc1p = nodep->lhsp()->castConcat()->lhsp()->unlinkFrBack();
|
||||||
AstNode* lc2p = nodep->lhsp()->castConcat()->rhsp()->unlinkFrBack();
|
AstNode* lc2p = nodep->lhsp()->castConcat()->rhsp()->unlinkFrBack();
|
||||||
@@ -517,14 +585,50 @@ private:
|
|||||||
sel2p->width(msb2-lsb2+1,msb2-lsb2+1);
|
sel2p->width(msb2-lsb2+1,msb2-lsb2+1);
|
||||||
// Make new assigns of same flavor as old one
|
// Make new assigns of same flavor as old one
|
||||||
//*** Not cloneTree; just one node.
|
//*** Not cloneTree; just one node.
|
||||||
AstNodeAssign* asn1p=nodep->cloneType(lc1p, sel1p)->castNodeAssign();
|
AstNode* newp = NULL;
|
||||||
AstNodeAssign* asn2p=nodep->cloneType(lc2p, sel2p)->castNodeAssign();
|
if (!need_temp) {
|
||||||
asn1p->width(msb1-lsb1+1,msb1-lsb1+1);
|
AstNodeAssign* asn1ap=nodep->cloneType(lc1p, sel1p)->castNodeAssign();
|
||||||
asn2p->width(msb2-lsb2+1,msb2-lsb2+1);
|
AstNodeAssign* asn2ap=nodep->cloneType(lc2p, sel2p)->castNodeAssign();
|
||||||
nodep->addNextHere(asn1p);
|
asn1ap->width(msb1-lsb1+1,msb1-lsb1+1);
|
||||||
nodep->addNextHere(asn2p);
|
asn2ap->width(msb2-lsb2+1,msb2-lsb2+1);
|
||||||
if (debug()>=9) asn1p->dumpTree(cout," _new: ");
|
newp = newp->addNext(asn1ap);
|
||||||
if (debug()>=9) asn2p->dumpTree(cout," _new: ");
|
newp = newp->addNext(asn2ap);
|
||||||
|
} else {
|
||||||
|
if (!m_modp) nodep->v3fatalSrc("Not under module");
|
||||||
|
// We could create just one temp variable, but we'll get better optimization
|
||||||
|
// if we make one per term.
|
||||||
|
string name1 = ((string)"__Vconcswap__"+cvtToStr(m_modp->varNumGetInc()));
|
||||||
|
string name2 = ((string)"__Vconcswap__"+cvtToStr(m_modp->varNumGetInc()));
|
||||||
|
AstVar* temp1p = new AstVar(sel1p->fileline(), AstVarType::BLOCKTEMP, name1,
|
||||||
|
new AstRange(sel1p->fileline(), msb1-lsb1, 0));
|
||||||
|
AstVar* temp2p = new AstVar(sel2p->fileline(), AstVarType::BLOCKTEMP, name2,
|
||||||
|
new AstRange(sel2p->fileline(), msb2-lsb2, 0));
|
||||||
|
m_modp->addStmtp(temp1p);
|
||||||
|
m_modp->addStmtp(temp2p);
|
||||||
|
AstNodeAssign* asn1ap=nodep->cloneType
|
||||||
|
(new AstVarRef(sel1p->fileline(), temp1p, true),
|
||||||
|
sel1p)->castNodeAssign();
|
||||||
|
AstNodeAssign* asn2ap=nodep->cloneType
|
||||||
|
(new AstVarRef(sel2p->fileline(), temp2p, true),
|
||||||
|
sel2p)->castNodeAssign();
|
||||||
|
AstNodeAssign* asn1bp=nodep->cloneType
|
||||||
|
(lc1p, new AstVarRef(sel1p->fileline(), temp1p, false))
|
||||||
|
->castNodeAssign();
|
||||||
|
AstNodeAssign* asn2bp=nodep->cloneType
|
||||||
|
(lc2p, new AstVarRef(sel2p->fileline(), temp2p, false))
|
||||||
|
->castNodeAssign();
|
||||||
|
asn1ap->width(msb1-lsb1+1,msb1-lsb1+1);
|
||||||
|
asn1bp->width(msb1-lsb1+1,msb1-lsb1+1);
|
||||||
|
asn2ap->width(msb2-lsb2+1,msb2-lsb2+1);
|
||||||
|
asn2bp->width(msb2-lsb2+1,msb2-lsb2+1);
|
||||||
|
// This order matters
|
||||||
|
newp = newp->addNext(asn1ap);
|
||||||
|
newp = newp->addNext(asn2ap);
|
||||||
|
newp = newp->addNext(asn1bp);
|
||||||
|
newp = newp->addNext(asn2bp);
|
||||||
|
}
|
||||||
|
if (debug()>=9) newp->dumpTreeAndNext(cout," _new: ");
|
||||||
|
nodep->addNextHere(newp);
|
||||||
// Cleanup
|
// Cleanup
|
||||||
nodep->unlinkFrBack()->deleteTree(); nodep=NULL;
|
nodep->unlinkFrBack()->deleteTree(); nodep=NULL;
|
||||||
conp->deleteTree(); conp=NULL;
|
conp->deleteTree(); conp=NULL;
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
+14
-7
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
@@ -1439,6 +1439,13 @@ void EmitCImp::emitInt(AstModule* modp) {
|
|||||||
puts("class "+modClassName(cellp->modp())+";\n");
|
puts("class "+modClassName(cellp->modp())+";\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (v3Global.opt.trace()) {
|
||||||
|
if (optSystemPerl()) {
|
||||||
|
puts("class SpTraceVcd;\n");
|
||||||
|
} else {
|
||||||
|
puts("class SpTraceVcdCFile;\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
puts("\n//----------\n\n");
|
puts("\n//----------\n\n");
|
||||||
emitTextSection(AstType::SCHDR);
|
emitTextSection(AstType::SCHDR);
|
||||||
@@ -1529,9 +1536,9 @@ void EmitCImp::emitInt(AstModule* modp) {
|
|||||||
} else {
|
} else {
|
||||||
puts(modClassName(modp)+"(const char* name=\"TOP\");\n");
|
puts(modClassName(modp)+"(const char* name=\"TOP\");\n");
|
||||||
puts("~"+modClassName(modp)+"();\n");
|
puts("~"+modClassName(modp)+"();\n");
|
||||||
if (v3Global.opt.trace()) {
|
}
|
||||||
puts("void\ttrace (SpTraceVcdCFile* tfp, int levels, int options=0);\n");
|
if (v3Global.opt.trace() && !optSystemPerl()) {
|
||||||
}
|
puts("void\ttrace (SpTraceVcdCFile* tfp, int levels, int options=0);\n");
|
||||||
}
|
}
|
||||||
puts("void\t__Vconfigure("+symClassName()+"* symsp);\n");
|
puts("void\t__Vconfigure("+symClassName()+"* symsp);\n");
|
||||||
if (optSystemPerl()) puts("/*AUTOMETHODS*/\n");
|
if (optSystemPerl()) puts("/*AUTOMETHODS*/\n");
|
||||||
@@ -1617,7 +1624,7 @@ void EmitCImp::emitImp(AstModule* modp) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (m_fast && m_splitFilenum==0) {
|
if (m_fast && m_splitFilenum==0) {
|
||||||
if (v3Global.opt.trace() && optSystemC() && m_modp->isTop()) {
|
if (v3Global.opt.trace() && optSystemPerl() && m_modp->isTop()) {
|
||||||
puts("\n");
|
puts("\n");
|
||||||
puts("\n/*AUTOTRACE(__MODULE__,recurse,activity,exists)*/\n\n");
|
puts("\n/*AUTOTRACE(__MODULE__,recurse,activity,exists)*/\n\n");
|
||||||
}
|
}
|
||||||
@@ -1704,7 +1711,7 @@ class EmitCTrace : EmitCStmts {
|
|||||||
// METHODS
|
// METHODS
|
||||||
void emitTraceHeader() {
|
void emitTraceHeader() {
|
||||||
// Includes
|
// Includes
|
||||||
if (optSystemC()) {
|
if (optSystemPerl()) {
|
||||||
puts("#include \"SpTraceVcd.h\"\n");
|
puts("#include \"SpTraceVcd.h\"\n");
|
||||||
}
|
}
|
||||||
puts("#include \"SpTraceVcdC.h\"\n");
|
puts("#include \"SpTraceVcdC.h\"\n");
|
||||||
@@ -1716,7 +1723,7 @@ class EmitCTrace : EmitCStmts {
|
|||||||
puts("\n//======================\n\n");
|
puts("\n//======================\n\n");
|
||||||
|
|
||||||
puts("void "+topClassName()+"::trace (");
|
puts("void "+topClassName()+"::trace (");
|
||||||
if (optSystemC()) {
|
if (optSystemPerl()) {
|
||||||
puts("SpTraceFile* tfp, int, int) {\n");
|
puts("SpTraceFile* tfp, int, int) {\n");
|
||||||
} else {
|
} else {
|
||||||
puts("SpTraceVcdCFile* tfp, int, int) {\n");
|
puts("SpTraceVcdCFile* tfp, int, int) {\n");
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
+5
-5
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2004-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2004-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
@@ -79,16 +79,16 @@ public:
|
|||||||
of.puts("default: "+v3Global.opt.prefix()+"__ALL.a\n");
|
of.puts("default: "+v3Global.opt.prefix()+"__ALL.a\n");
|
||||||
}
|
}
|
||||||
of.puts("\n# Constants...\n");
|
of.puts("\n# Constants...\n");
|
||||||
of.puts("PERL = "+V3Options::getenvStr("PERL","perl")+"\n");
|
of.puts("PERL = "+V3Options::getenvPERL()+"\n");
|
||||||
of.puts("VERILATOR_ROOT = "+V3Options::getenvStr("VERILATOR_ROOT","")+"\n");
|
of.puts("VERILATOR_ROOT = "+V3Options::getenvVERILATOR_ROOT()+"\n");
|
||||||
of.puts("SYSTEMPERL = "+V3Options::getenvStr("SYSTEMPERL","")+"\n");
|
of.puts("SYSTEMPERL = "+V3Options::getenvSYSTEMPERL()+"\n");
|
||||||
|
|
||||||
of.puts("\n# Switches...\n");
|
of.puts("\n# Switches...\n");
|
||||||
of.puts(string("VM_SP = ")+(v3Global.opt.systemPerl()?"1":"0")+"\n");
|
of.puts(string("VM_SP = ")+(v3Global.opt.systemPerl()?"1":"0")+"\n");
|
||||||
of.puts(string("VM_SC = ")+((v3Global.opt.systemC()&&!v3Global.opt.systemPerl())?"1":"0")+"\n");
|
of.puts(string("VM_SC = ")+((v3Global.opt.systemC()&&!v3Global.opt.systemPerl())?"1":"0")+"\n");
|
||||||
of.puts(string("VM_SP_OR_SC = ")+(v3Global.opt.systemC()?"1":"0")+"\n");
|
of.puts(string("VM_SP_OR_SC = ")+(v3Global.opt.systemC()?"1":"0")+"\n");
|
||||||
of.puts(string("VM_PCLI = ")+(v3Global.opt.systemC()?"0":"1")+"\n");
|
of.puts(string("VM_PCLI = ")+(v3Global.opt.systemC()?"0":"1")+"\n");
|
||||||
of.puts(string("VM_SC_TARGET_ARCH = ")+V3Options::getenvStr("SYSTEMC_ARCH","")+"\n");
|
of.puts(string("VM_SC_TARGET_ARCH = ")+V3Options::getenvSYSTEMC_ARCH()+"\n");
|
||||||
|
|
||||||
of.puts("\n# Vars...\n");
|
of.puts("\n# Vars...\n");
|
||||||
of.puts(string("VM_PREFIX = ")+v3Global.opt.prefix()+"\n");
|
of.puts(string("VM_PREFIX = ")+v3Global.opt.prefix()+"\n");
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2004-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2004-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
+3
-3
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
@@ -243,8 +243,8 @@ void V3Error::incWarnings() {
|
|||||||
|
|
||||||
void V3Error::incErrors() {
|
void V3Error::incErrors() {
|
||||||
s_errCount++;
|
s_errCount++;
|
||||||
if (errorCount() == MAX_ERRORS) { // Not >= as would otherwise recurse
|
if (errorCount() == v3Global.opt.errorLimit()) { // Not >= as would otherwise recurse
|
||||||
v3fatal ("Exiting due to too many errors encountered\n");
|
v3fatal ("Exiting due to too many errors encountered; --error-limit="<<errorCount()<<endl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+3
-2
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
@@ -53,6 +53,7 @@ public:
|
|||||||
IMPLICIT, // Implicit wire
|
IMPLICIT, // Implicit wire
|
||||||
IMPURE, // Impure function not being inlined
|
IMPURE, // Impure function not being inlined
|
||||||
MULTIDRIVEN, // Driven from multiple blocks
|
MULTIDRIVEN, // Driven from multiple blocks
|
||||||
|
REDEFMACRO, // Redefining existing define macro
|
||||||
UNDRIVEN, // No drivers
|
UNDRIVEN, // No drivers
|
||||||
UNOPT, // Unoptimizable block
|
UNOPT, // Unoptimizable block
|
||||||
UNOPTFLAT, // Unoptimizable block after flattening
|
UNOPTFLAT, // Unoptimizable block after flattening
|
||||||
@@ -78,7 +79,7 @@ public:
|
|||||||
"BLKANDNBLK",
|
"BLKANDNBLK",
|
||||||
"CASEINCOMPLETE", "CASEOVERLAP", "CASEX", "CMPCONST",
|
"CASEINCOMPLETE", "CASEOVERLAP", "CASEX", "CMPCONST",
|
||||||
"COMBDLY", "STMTDLY", "GENCLK", "IMPLICIT", "IMPURE",
|
"COMBDLY", "STMTDLY", "GENCLK", "IMPLICIT", "IMPURE",
|
||||||
"MULTIDRIVEN",
|
"MULTIDRIVEN", "REDEFMACRO",
|
||||||
"UNDRIVEN", "UNOPT", "UNOPTFLAT", "UNSIGNED", "UNUSED",
|
"UNDRIVEN", "UNOPT", "UNOPTFLAT", "UNSIGNED", "UNUSED",
|
||||||
"VARHIDDEN", "WIDTH",
|
"VARHIDDEN", "WIDTH",
|
||||||
" MAX"
|
" MAX"
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2004-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2004-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
+10
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
@@ -23,6 +23,7 @@
|
|||||||
#include "verilatedos.h"
|
#include "verilatedos.h"
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
#include <sys/types.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
@@ -232,6 +233,14 @@ bool V3File::checkTimes(const string& filename, const string& cmdline) {
|
|||||||
return dependImp.checkTimes(filename, cmdline);
|
return dependImp.checkTimes(filename, cmdline);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void V3File::createMakeDir() {
|
||||||
|
static bool created = false;
|
||||||
|
if (!created) {
|
||||||
|
created = true;
|
||||||
|
mkdir(v3Global.opt.makeDir().c_str(), 0777);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//######################################################################
|
//######################################################################
|
||||||
// V3OutFile: A class for printing to a file, with automatic indentation of C++ code.
|
// V3OutFile: A class for printing to a file, with automatic indentation of C++ code.
|
||||||
|
|
||||||
|
|||||||
+7
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
@@ -46,6 +46,7 @@ public:
|
|||||||
return new_ofstream_nodepend (filename, append);
|
return new_ofstream_nodepend (filename, append);
|
||||||
}
|
}
|
||||||
static ofstream* new_ofstream_nodepend(const string& filename, bool append=false) {
|
static ofstream* new_ofstream_nodepend(const string& filename, bool append=false) {
|
||||||
|
if (filename != "/dev/null") createMakeDir();
|
||||||
if (append) {
|
if (append) {
|
||||||
return new ofstream(filename.c_str(), ios::app);
|
return new ofstream(filename.c_str(), ios::app);
|
||||||
} else {
|
} else {
|
||||||
@@ -53,15 +54,20 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
static FILE* new_fopen_w(const string& filename) {
|
static FILE* new_fopen_w(const string& filename) {
|
||||||
|
if (filename != "/dev/null") createMakeDir();
|
||||||
addTgtDepend(filename);
|
addTgtDepend(filename);
|
||||||
return fopen(filename.c_str(),"w");
|
return fopen(filename.c_str(),"w");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Dependencies
|
// Dependencies
|
||||||
static void addSrcDepend(const string& filename);
|
static void addSrcDepend(const string& filename);
|
||||||
static void addTgtDepend(const string& filename);
|
static void addTgtDepend(const string& filename);
|
||||||
static void writeDepend(const string& filename);
|
static void writeDepend(const string& filename);
|
||||||
static void writeTimes(const string& filename, const string& cmdline);
|
static void writeTimes(const string& filename, const string& cmdline);
|
||||||
static bool checkTimes(const string& filename, const string& cmdline);
|
static bool checkTimes(const string& filename, const string& cmdline);
|
||||||
|
|
||||||
|
// Directory utilities
|
||||||
|
static void createMakeDir();
|
||||||
};
|
};
|
||||||
|
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
+95
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2005-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2005-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
@@ -480,3 +480,97 @@ public:
|
|||||||
void DfaGraph::dfaReduce() {
|
void DfaGraph::dfaReduce() {
|
||||||
DfaGraphReduce (this, &V3GraphEdge::followAlwaysTrue);
|
DfaGraphReduce (this, &V3GraphEdge::followAlwaysTrue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//######################################################################
|
||||||
|
//######################################################################
|
||||||
|
// Algorithms - complement a DFA
|
||||||
|
//
|
||||||
|
// The traditional algorithm is to make a rejecting state, add edges to
|
||||||
|
// reject from all missing values, then swap accept and reject. Rather
|
||||||
|
// than swap at the end, it's faster if we swap up front, then do the edge
|
||||||
|
// changes.
|
||||||
|
//
|
||||||
|
// 1. Since we didn't log rejecting states, make a temp state (this will be
|
||||||
|
// the old accept, and new reject).
|
||||||
|
//
|
||||||
|
// 2. All vertexes except start/accept get edges to NEW accept for any
|
||||||
|
// non-existing case. Weedely we don't have a nice way of representing
|
||||||
|
// this so we just create a edge for each case and mark it "complemented."
|
||||||
|
//
|
||||||
|
// 3. Delete temp vertex (old accept/new reject) and related edges.
|
||||||
|
// The user's old accept is now the new accept. This is imporant as
|
||||||
|
// we want the virtual type of it to be intact.
|
||||||
|
|
||||||
|
class DfaGraphComplement : GraphAlg {
|
||||||
|
private:
|
||||||
|
// MEMBERS
|
||||||
|
DfaVertex* m_tempNewerReject;
|
||||||
|
|
||||||
|
// METHODS
|
||||||
|
int debug() { return 9; }
|
||||||
|
DfaGraph* graphp() { return static_cast<DfaGraph*>(m_graphp); }
|
||||||
|
|
||||||
|
void add_complement_edges() {
|
||||||
|
// Find accepting vertex
|
||||||
|
DfaVertex* acceptp = NULL;
|
||||||
|
for (V3GraphVertex* vertexp = m_graphp->verticesBeginp(); vertexp; vertexp=vertexp->verticesNextp()) {
|
||||||
|
if (DfaVertex* vvertexp = dynamic_cast<DfaVertex*>(vertexp)) {
|
||||||
|
if (vvertexp->accepting()) {
|
||||||
|
acceptp = vvertexp;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!acceptp) v3fatalSrc("No accepting vertex in DFA\n");
|
||||||
|
|
||||||
|
// Remap edges
|
||||||
|
for (V3GraphVertex* vertexp = m_graphp->verticesBeginp(); vertexp; vertexp=vertexp->verticesNextp()) {
|
||||||
|
if (DfaVertex* vvertexp = dynamic_cast<DfaVertex*>(vertexp)) {
|
||||||
|
//UINFO(9, " on vertex "<<vvertexp->name()<<endl);
|
||||||
|
if (!vvertexp->accepting() && vvertexp != m_tempNewerReject) {
|
||||||
|
for (V3GraphEdge* nextp, *edgep = vertexp->outBeginp(); edgep; edgep=nextp) {
|
||||||
|
nextp = edgep->outNextp();
|
||||||
|
if (!edgep->user()) { // Not processed
|
||||||
|
// Old edges to accept now go to new reject
|
||||||
|
DfaEdge* vedgep = static_cast<DfaEdge*>(edgep);
|
||||||
|
DfaVertex* tovertexp = static_cast<DfaVertex*>(edgep->top());
|
||||||
|
if (tovertexp->accepting()) {
|
||||||
|
new DfaEdge(graphp(), vvertexp, m_tempNewerReject, vedgep);
|
||||||
|
edgep->unlinkDelete(); edgep=NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
// NOT of all values goes to accept
|
||||||
|
// We make a edge for each value to OR, IE
|
||||||
|
// edge(complemented,a) edge(complemented,b) means !(a | b)
|
||||||
|
if (!tovertexp->accepting()) { // Note we must include edges moved above to reject
|
||||||
|
DfaEdge* newp = new DfaEdge (graphp(), vvertexp, acceptp, vedgep);
|
||||||
|
newp->complement(!newp->complement());
|
||||||
|
newp->user(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public:
|
||||||
|
DfaGraphComplement(V3Graph* dfagraphp, V3EdgeFuncP edgeFuncp)
|
||||||
|
: GraphAlg(dfagraphp, edgeFuncp) {
|
||||||
|
if (debug()>=6) m_graphp->dumpDotFilePrefixed("comp_in");
|
||||||
|
|
||||||
|
// Vertex::m_user begin: 1 indicates new edge, no more processing
|
||||||
|
m_graphp->userClearEdges();
|
||||||
|
|
||||||
|
m_tempNewerReject = new DfaVertex(graphp());
|
||||||
|
add_complement_edges();
|
||||||
|
if (debug()>=6) m_graphp->dumpDotFilePrefixed("comp_preswap");
|
||||||
|
|
||||||
|
m_tempNewerReject->unlinkDelete(graphp()); m_tempNewerReject=NULL;
|
||||||
|
if (debug()>=6) m_graphp->dumpDotFilePrefixed("comp_out");
|
||||||
|
}
|
||||||
|
~DfaGraphComplement() {}
|
||||||
|
};
|
||||||
|
|
||||||
|
void DfaGraph::dfaComplement() {
|
||||||
|
DfaGraphComplement (this, &V3GraphEdge::followAlwaysTrue);
|
||||||
|
}
|
||||||
|
|||||||
+25
-7
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
@@ -43,7 +43,9 @@ class DfaEdge;
|
|||||||
/// or epsilon, represented as a empty list of inputs.
|
/// or epsilon, represented as a empty list of inputs.
|
||||||
///
|
///
|
||||||
/// We're only looking for matches, so the only accepting states are
|
/// We're only looking for matches, so the only accepting states are
|
||||||
/// at the end of the transformations.
|
/// at the end of the transformations. (If we want the complement, we
|
||||||
|
/// call complement and the algorithm makes a REJECT state, then flips
|
||||||
|
/// accept and reject for you.)
|
||||||
///
|
///
|
||||||
/// Common transforms:
|
/// Common transforms:
|
||||||
///
|
///
|
||||||
@@ -51,8 +53,8 @@ class DfaEdge;
|
|||||||
///
|
///
|
||||||
/// "L": ...->[ON_L]-->DfaVtx-->[epsilon]-->DfaVtx(ACCEPT)
|
/// "L": ...->[ON_L]-->DfaVtx-->[epsilon]-->DfaVtx(ACCEPT)
|
||||||
///
|
///
|
||||||
/// "LR": ...->[ON_L]-->DfaVtx-->[epsilon]-->DfaVtx()
|
/// "LR": ...->[ON_L]-->DfaVtx-->[epsilon]-->DfaVtx(ACCEPT)
|
||||||
/// ->[ON_R]-->DfaVtx-->[epsilon]-->DfaVtx(ACCEPT)
|
/// ->[ON_R]-->DfaVtx-->[epsilon]-/
|
||||||
///
|
///
|
||||||
/// "L|R": ...->DfaVtx-->[epsilon]-->DfaVtx-->[ON_L]-->DfaVtx()->[epsilon]-->DfaVtx(ACCEPT)
|
/// "L|R": ...->DfaVtx-->[epsilon]-->DfaVtx-->[ON_L]-->DfaVtx()->[epsilon]-->DfaVtx(ACCEPT)
|
||||||
/// \->[epsilon]-->DfaVtx-->[ON_R]-->DfaVtx()->[epsilon]-/
|
/// \->[epsilon]-->DfaVtx-->[ON_R]-->DfaVtx()->[epsilon]-/
|
||||||
@@ -76,6 +78,9 @@ public:
|
|||||||
|
|
||||||
/// Simplify a DFA automata
|
/// Simplify a DFA automata
|
||||||
void dfaReduce();
|
void dfaReduce();
|
||||||
|
|
||||||
|
/// Complement result (must already be dfa)
|
||||||
|
void dfaComplement();
|
||||||
};
|
};
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
@@ -113,20 +118,33 @@ typedef AstNUser* DfaInput;
|
|||||||
|
|
||||||
class DfaEdge : public V3GraphEdge {
|
class DfaEdge : public V3GraphEdge {
|
||||||
DfaInput m_input;
|
DfaInput m_input;
|
||||||
|
bool m_complement; // Invert value when doing compare
|
||||||
public:
|
public:
|
||||||
static DfaInput EPSILON() { return NULL; }
|
static DfaInput EPSILON() { return NULL; }
|
||||||
static DfaInput NA() { return AstNUser::fromInt(1); } // as in not-applicable
|
static DfaInput NA() { return AstNUser::fromInt(1); } // as in not-applicable
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
DfaEdge(DfaGraph* graphp, DfaVertex* fromp, DfaVertex* top, DfaInput input)
|
DfaEdge(DfaGraph* graphp, DfaVertex* fromp, DfaVertex* top, DfaInput input)
|
||||||
: V3GraphEdge(graphp, fromp, top, 1)
|
: V3GraphEdge(graphp, fromp, top, 1)
|
||||||
, m_input(input) {}
|
, m_input(input), m_complement(false) {}
|
||||||
|
DfaEdge(DfaGraph* graphp, DfaVertex* fromp, DfaVertex* top, const DfaEdge* copyfrom)
|
||||||
|
: V3GraphEdge(graphp, fromp, top, copyfrom->weight())
|
||||||
|
, m_input(copyfrom->input()), m_complement(copyfrom->complement()) {}
|
||||||
virtual ~DfaEdge() {}
|
virtual ~DfaEdge() {}
|
||||||
// METHODS
|
// METHODS
|
||||||
virtual string dotColor() const { return na()?"yellow":epsilon()?"green":"black"; }
|
virtual string dotColor() const {
|
||||||
virtual string dotLabel() const { return na()?"":epsilon()?"e":cvtToStr((void*)(input())); }
|
return (na() ? "yellow"
|
||||||
|
: epsilon() ? "green"
|
||||||
|
: "black"); }
|
||||||
|
virtual string dotLabel() const {
|
||||||
|
return (na() ? ""
|
||||||
|
: epsilon() ? "e"
|
||||||
|
: complement() ? ("not "+cvtToStr((void*)(input())))
|
||||||
|
: cvtToStr((void*)(input()))); }
|
||||||
virtual string dotStyle() const { return (na()||cutable())?"dashed":""; }
|
virtual string dotStyle() const { return (na()||cutable())?"dashed":""; }
|
||||||
bool epsilon() const { return input()==EPSILON(); }
|
bool epsilon() const { return input()==EPSILON(); }
|
||||||
bool na() const { return input()==NA(); }
|
bool na() const { return input()==NA(); }
|
||||||
|
bool complement() const { return m_complement; }
|
||||||
|
void complement(bool value) { m_complement=value; }
|
||||||
DfaInput input() const { return m_input; }
|
DfaInput input() const { return m_input; }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
+7
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
@@ -309,6 +309,12 @@ public:
|
|||||||
gp->nfaToDfa();
|
gp->nfaToDfa();
|
||||||
dump();
|
dump();
|
||||||
gp->dfaReduce();
|
gp->dfaReduce();
|
||||||
|
dump();
|
||||||
|
|
||||||
|
gp->dfaComplement();
|
||||||
|
dump();
|
||||||
|
gp->dfaReduce();
|
||||||
|
dump();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2005-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2005-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2007 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2008 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
|
||||||
// General Public License or the Perl Artistic License.
|
// General Public License or the Perl Artistic License.
|
||||||
//
|
//
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user