diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..d960295 --- /dev/null +++ b/.clang-format @@ -0,0 +1,111 @@ +--- +Language: Cpp +# BasedOnStyle: LLVM +AccessModifierOffset: -4 +AlignAfterOpenBracket: Align +AlignConsecutiveAssignments: false +AlignConsecutiveDeclarations: false +AlignEscapedNewlines: DontAlign +AlignOperands: true +AlignTrailingComments: false +AllowAllParametersOfDeclarationOnNextLine: true +AllowShortBlocksOnASingleLine: true +AllowShortCaseLabelsOnASingleLine: true +AllowShortFunctionsOnASingleLine: All +AllowShortIfStatementsOnASingleLine: true +AllowShortLoopsOnASingleLine: true +AlwaysBreakAfterDefinitionReturnType: None +AlwaysBreakAfterReturnType: None +AlwaysBreakBeforeMultilineStrings: false +AlwaysBreakTemplateDeclarations: false +BinPackArguments: true +BinPackParameters: true +BraceWrapping: + AfterClass: false + AfterControlStatement: false + AfterEnum: false + AfterFunction: false + AfterNamespace: false + AfterObjCDeclaration: false + AfterStruct: false + AfterUnion: false + AfterExternBlock: false + BeforeCatch: false + BeforeElse: false + IndentBraces: false + SplitEmptyFunction: true + SplitEmptyRecord: true + SplitEmptyNamespace: true +BreakBeforeBinaryOperators: All +BreakBeforeBraces: Attach +BreakBeforeInheritanceComma: false +BreakBeforeTernaryOperators: true +BreakConstructorInitializersBeforeComma: false +BreakConstructorInitializers: BeforeComma +BreakAfterJavaFieldAnnotations: false +BreakStringLiterals: true +ColumnLimit: 99 +CommentPragmas: '^ IWYU pragma:' +CompactNamespaces: false +ConstructorInitializerAllOnOneLineOrOnePerLine: false +ConstructorInitializerIndentWidth: 4 +ContinuationIndentWidth: 4 +Cpp11BracedListStyle: true +DerivePointerAlignment: false +DisableFormat: false +ExperimentalAutoDetectBinPacking: false +FixNamespaceComments: true +ForEachMacros: + - foreach + - Q_FOREACH + - BOOST_FOREACH +IncludeBlocks: Preserve +IncludeCategories: + - Regex: '^"(llvm|llvm-c|clang|clang-c)/' + Priority: 2 + - Regex: '^(<|"(gtest|gmock|isl|json)/)' + Priority: 3 + - Regex: '.*' + Priority: 1 +IncludeIsMainRegex: '(Test)?$' +IndentCaseLabels: false +IndentPPDirectives: None +IndentWidth: 4 +IndentWrappedFunctionNames: false +JavaScriptQuotes: Leave +JavaScriptWrapImports: true +KeepEmptyLinesAtTheStartOfBlocks: true +MacroBlockBegin: '' +MacroBlockEnd: '' +MaxEmptyLinesToKeep: 1 +NamespaceIndentation: None +ObjCBlockIndentWidth: 2 +ObjCSpaceAfterProperty: false +ObjCSpaceBeforeProtocolList: true +PenaltyBreakAssignment: 2 +PenaltyBreakBeforeFirstCallParameter: 19 +PenaltyBreakComment: 300 +PenaltyBreakFirstLessLess: 120 +PenaltyBreakString: 1000 +PenaltyExcessCharacter: 1000000 +PenaltyReturnTypeOnItsOwnLine: 60 +PointerAlignment: Left +ReflowComments: true +SortIncludes: false +SortUsingDeclarations: true +SpaceAfterCStyleCast: false +SpaceAfterTemplateKeyword: true +SpaceBeforeAssignmentOperators: true +SpaceBeforeParens: ControlStatements +SpaceInEmptyParentheses: false +SpacesBeforeTrailingComments: 2 +SpacesInAngles: false +SpacesInContainerLiterals: true +SpacesInCStyleCastParentheses: false +SpacesInParentheses: false +SpacesInSquareBrackets: false +Standard: Cpp03 +TabWidth: 8 +UseTab: Never +... + diff --git a/Changes b/Changes index f4a8800..153e0ca 100644 --- a/Changes +++ b/Changes @@ -4,7 +4,31 @@ The contributors that suggested a given feature are shown in []. [by ...] indicates the contributor was also the author of the fix; Thanks! -* Verilog-Perl 3.475 devel +* Verilog-Perl 3.483 devel + + +* Verilog-Perl 3.482 2024-01-22 + +*** Support IEEE 1800-2023 language keywords. (No other 2023 support yet.) + +**** Fix t/03_spaces.t test for Debian (#1675). [Gregor Herrmann] + +**** Fix GCC 11 false free-nonheap-obj warning. + + +* Verilog-Perl 3.480 2022-09-01 + +**** Fix vrename ignoring % (#1674). [Wenjun] + + +* Verilog-Perl 3.478 2021-06-06 + +**** Fix ${ENVVAR} expansion (#1671). [Henry Hsieh] + + +* Verilog-Perl 3.476 2021-04-13 + +**** Fix parameter type = struct. [Nathan Chrisman] * Verilog-Perl 3.474 2020-10-29 @@ -1466,7 +1490,7 @@ DESCRIPTION: Documentation on change history for this package This uses outline mode in Emacs. See C-h m [M-x describe-mode]. -Copyright 2001-2020 by Wilson Snyder. This program is free software; +Copyright 2001-2024 by Wilson Snyder. This program is free software; you can redistribute it and/or modify it under the terms of either the GNU Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. diff --git a/EditFiles.pm b/EditFiles.pm index c13855f..2b8fd73 100644 --- a/EditFiles.pm +++ b/EditFiles.pm @@ -13,7 +13,7 @@ use vars qw($VERSION $Debug); ###################################################################### #### Configuration Section -$VERSION = '3.475'; +$VERSION = '3.483'; ####################################################################### # CONSTRUCTORS @@ -382,7 +382,7 @@ Verilog-Perl is part of the L free Verilog EDA software tool suite. The latest version is available from CPAN and from L. -Copyright 2006-2020 by Wilson Snyder. This package is free software; you +Copyright 2006-2024 by Wilson Snyder. This package is free software; you can redistribute it and/or modify it under the terms of either the GNU Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. diff --git a/Getopt.pm b/Getopt.pm index eb4e65f..ecb5967 100644 --- a/Getopt.pm +++ b/Getopt.pm @@ -16,7 +16,7 @@ use Cwd; ###################################################################### #### Configuration Section -$VERSION = '3.475'; +$VERSION = '3.483'; # Basenames we should ignore when recursing directories, # Because they contain large files of no relevance @@ -386,12 +386,13 @@ sub file_substitute { my $self = shift; my $filename = shift; my $out = $filename; - while ($filename =~ /\$([A-Za-z_0-9]+)\b/g - || $filename =~ /\$\{[A-Za-z_0-9]+\}\b/g) { + while ($filename =~ /\$([A-Za-z_0-9]+)\b/g) { my $var = $1; - if (defined $ENV{$var}) { - $out =~ s/\$$var\b/$ENV{$var}/g; - } + $out =~ s/\$$var\b/$ENV{$var}/g if defined $ENV{$var}; + } + while ($filename =~ /\$\{([A-Za-z_0-9]+)\}/g) { + my $var = $1; + $out =~ s/\$\{$var\}/$ENV{$var}/g if defined $ENV{$var}; } $out =~ s!^~!$ENV{HOME}/!; return $out; @@ -813,7 +814,7 @@ Verilog-Perl is part of the L free Verilog EDA software tool suite. The latest version is available from CPAN and from L. -Copyright 2000-2020 by Wilson Snyder. This package is free software; you +Copyright 2000-2024 by Wilson Snyder. This package is free software; you can redistribute it and/or modify it under the terms of either the GNU Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. diff --git a/Language.pm b/Language.pm index cd5da48..50b514d 100644 --- a/Language.pm +++ b/Language.pm @@ -35,7 +35,7 @@ General functions will be added as needed. Return true if the given symbol string is a Verilog reserved keyword. Value indicates the language standard as per the `begin_keywords macro, '1364-1995', '1364-2001', '1364-2005', '1800-2005', '1800-2009', -'1800-2012', '1800-2017' or 'VAMS'. +'1800-2012', '1800-2017', '1800-2023', or 'VAMS'. =item Verilog::Language::is_compdirect($symbol_string) @@ -56,12 +56,12 @@ value of the hash is the standard in which it was defined. Sets the language standard to indicate what are keywords. If undef, all standards apply. The year is indicates the language standard as per the `begin_keywords macro, '1364-1995', '1364-2001', '1364-2005', '1800-2005' -'1800-2009', '1800-2012' or '1800-2017'. +'1800-2009', '1800-2012', '1800-2017', or '1800-2023'. =item Verilog::Language::language_maximum Returns the greatest language currently standardized, presently -'1800-2017'. +'1800-2023'. =item Verilog::Language::number_bigint($number_string) @@ -119,7 +119,7 @@ Verilog-Perl is part of the L free Verilog EDA software tool suite. The latest version is available from CPAN and from L. -Copyright 2000-2020 by Wilson Snyder. This package is free software; you +Copyright 2000-2024 by Wilson Snyder. This package is free software; you can redistribute it and/or modify it under the terms of either the GNU Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. @@ -151,7 +151,7 @@ use Carp; ###################################################################### #### Configuration Section -$VERSION = '3.475'; +$VERSION = '3.483'; ###################################################################### #### Internal Variables @@ -219,6 +219,9 @@ foreach my $kwd (qw( foreach my $kwd (qw( )) { $Keywords{'1800-2017'}{$kwd} = '1800-2017'; } +foreach my $kwd (qw( + )) { $Keywords{'1800-2023'}{$kwd} = '1800-2023'; } + foreach my $kwd (qw( above abs absdelay abstol ac_stim access acos acosh aliasparam analog analysis asin asinh assert atan atan2 @@ -304,7 +307,7 @@ foreach my $kwd (qw( #### Keyword utilities sub language_maximum { - return "1800-2017"; + return "1800-2023"; } sub _language_kwd_hash { @@ -333,10 +336,14 @@ sub _language_kwd_hash { $Standard = '1800-2012'; @subsets = ('1800-2012', '1800-2009', '1800-2005', '1364-2005', '1364-2001', '1364-1995'); - } elsif ($standard eq 'latest' || $standard eq '1800-2017') { + } elsif ($standard eq '1800-2017') { $Standard = '1800-2017'; @subsets = ('1800-2017', '1800-2012', '1800-2009', '1800-2005', '1364-2005', '1364-2001', '1364-1995'); + } elsif ($standard eq 'latest' || $standard eq '1800-2023') { + $Standard = '1800-2023'; + @subsets = ('1800-2023', '1800-2017', '1800-2012', '1800-2009', '1800-2005', + '1364-2005', '1364-2001', '1364-1995'); } elsif ($standard =~ /^V?AMS/) { $Standard = 'VAMS'; @subsets = ('VAMS', diff --git a/MANIFEST b/MANIFEST index a29c36f..f117cf8 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1,3 +1,4 @@ +.clang-format .gitignore Changes COPYING diff --git a/META.yml b/META.yml index 616bed5..fdd82ab 100644 --- a/META.yml +++ b/META.yml @@ -1,6 +1,6 @@ --- #YAML:1.0 name: Verilog-Perl -version: 3.475 +version: 3.483 version_from: Language.pm abstract: Verilog language utilities and parsing license: perl diff --git a/Makefile.PL b/Makefile.PL index a6b7498..39de6b5 100755 --- a/Makefile.PL +++ b/Makefile.PL @@ -1,6 +1,6 @@ # DESCRIPTION: Perl ExtUtils: Type 'perl Makefile.PL' to create a Makefile for this package # -# Copyright 2000-2020 by Wilson Snyder. This program is free software; +# Copyright 2000-2024 by Wilson Snyder. This program is free software; # you can redistribute it and/or modify it under the terms of either the GNU # Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. diff --git a/Netlist.pm b/Netlist.pm index d7d4b25..a808d50 100644 --- a/Netlist.pm +++ b/Netlist.pm @@ -14,7 +14,7 @@ use base qw(Verilog::Netlist::Subclass); use strict; use vars qw($Debug $Verbose $VERSION); -$VERSION = '3.475'; +$VERSION = '3.483'; ###################################################################### #### Error Handling @@ -698,7 +698,7 @@ Verilog-Perl is part of the L free Verilog EDA software tool suite. The latest version is available from CPAN and from L. -Copyright 2000-2020 by Wilson Snyder. This package is free software; you +Copyright 2000-2024 by Wilson Snyder. This package is free software; you can redistribute it and/or modify it under the terms of either the GNU Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. diff --git a/Netlist/Cell.pm b/Netlist/Cell.pm index 3190bbe..5bdd519 100644 --- a/Netlist/Cell.pm +++ b/Netlist/Cell.pm @@ -11,7 +11,7 @@ use strict; @ISA = qw(Verilog::Netlist::Cell::Struct Verilog::Netlist::Subclass); -$VERSION = '3.475'; +$VERSION = '3.483'; structs('new', 'Verilog::Netlist::Cell::Struct' @@ -303,7 +303,7 @@ Verilog-Perl is part of the L free Verilog EDA software tool suite. The latest version is available from CPAN and from L. -Copyright 2000-2020 by Wilson Snyder. This package is free software; you +Copyright 2000-2024 by Wilson Snyder. This package is free software; you can redistribute it and/or modify it under the terms of either the GNU Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. diff --git a/Netlist/ContAssign.pm b/Netlist/ContAssign.pm index 67e5016..394f21d 100644 --- a/Netlist/ContAssign.pm +++ b/Netlist/ContAssign.pm @@ -11,7 +11,7 @@ use strict; @ISA = qw(Verilog::Netlist::ContAssign::Struct Verilog::Netlist::Subclass); -$VERSION = '3.475'; +$VERSION = '3.483'; structs('new', 'Verilog::Netlist::ContAssign::Struct' @@ -133,7 +133,7 @@ Verilog-Perl is part of the L free Verilog EDA software tool suite. The latest version is available from CPAN and from L. -Copyright 2000-2020 by Wilson Snyder. This package is free software; you +Copyright 2000-2024 by Wilson Snyder. This package is free software; you can redistribute it and/or modify it under the terms of either the GNU Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. diff --git a/Netlist/Defparam.pm b/Netlist/Defparam.pm index 2246382..000e4f9 100644 --- a/Netlist/Defparam.pm +++ b/Netlist/Defparam.pm @@ -11,7 +11,7 @@ use strict; @ISA = qw(Verilog::Netlist::Defparam::Struct Verilog::Netlist::Subclass); -$VERSION = '3.475'; +$VERSION = '3.483'; structs('new', 'Verilog::Netlist::Defparam::Struct' @@ -133,7 +133,7 @@ Verilog-Perl is part of the L free Verilog EDA software tool suite. The latest version is available from CPAN and from L. -Copyright 2000-2020 by Wilson Snyder. This package is free software; you +Copyright 2000-2024 by Wilson Snyder. This package is free software; you can redistribute it and/or modify it under the terms of either the GNU Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. diff --git a/Netlist/File.pm b/Netlist/File.pm index 3a37d3b..13af30d 100644 --- a/Netlist/File.pm +++ b/Netlist/File.pm @@ -12,7 +12,7 @@ use strict; @ISA = qw(Verilog::Netlist::File::Struct Verilog::Netlist::Subclass); -$VERSION = '3.475'; +$VERSION = '3.483'; structs('new', 'Verilog::Netlist::File::Struct' @@ -561,7 +561,7 @@ Verilog-Perl is part of the L free Verilog EDA software tool suite. The latest version is available from CPAN and from L. -Copyright 2000-2020 by Wilson Snyder. This package is free software; you +Copyright 2000-2024 by Wilson Snyder. This package is free software; you can redistribute it and/or modify it under the terms of either the GNU Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. diff --git a/Netlist/Interface.pm b/Netlist/Interface.pm index 049a85a..28ef33c 100644 --- a/Netlist/Interface.pm +++ b/Netlist/Interface.pm @@ -14,7 +14,7 @@ use strict; @ISA = qw(Verilog::Netlist::Interface::Struct Verilog::Netlist::Subclass); -$VERSION = '3.475'; +$VERSION = '3.483'; structs('new', 'Verilog::Netlist::Interface::Struct' @@ -395,7 +395,7 @@ Verilog-Perl is part of the L free Verilog EDA software tool suite. The latest version is available from CPAN and from L. -Copyright 2000-2020 by Wilson Snyder. This package is free software; you +Copyright 2000-2024 by Wilson Snyder. This package is free software; you can redistribute it and/or modify it under the terms of either the GNU Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. diff --git a/Netlist/Logger.pm b/Netlist/Logger.pm index b349295..090f9b7 100644 --- a/Netlist/Logger.pm +++ b/Netlist/Logger.pm @@ -7,7 +7,7 @@ require Exporter; use vars qw($VERSION); use strict; -$VERSION = '3.475'; +$VERSION = '3.483'; # We don't use Verilog::Netlist::Subclass, as this is called from it! @@ -167,7 +167,7 @@ Verilog-Perl is part of the L free Verilog EDA software tool suite. The latest version is available from CPAN and from L. -Copyright 2000-2020 by Wilson Snyder. This package is free software; you +Copyright 2000-2024 by Wilson Snyder. This package is free software; you can redistribute it and/or modify it under the terms of either the GNU Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. diff --git a/Netlist/ModPort.pm b/Netlist/ModPort.pm index 6245fe0..e60f2c9 100644 --- a/Netlist/ModPort.pm +++ b/Netlist/ModPort.pm @@ -12,7 +12,7 @@ use strict; @ISA = qw(Verilog::Netlist::ModPort::Struct Verilog::Netlist::Subclass); -$VERSION = '3.475'; +$VERSION = '3.483'; structs('new', 'Verilog::Netlist::ModPort::Struct' @@ -275,7 +275,7 @@ Verilog-Perl is part of the L free Verilog EDA software tool suite. The latest version is available from CPAN and from L. -Copyright 2000-2020 by Wilson Snyder. This package is free software; you +Copyright 2000-2024 by Wilson Snyder. This package is free software; you can redistribute it and/or modify it under the terms of either the GNU Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. diff --git a/Netlist/Module.pm b/Netlist/Module.pm index e90663a..b84183f 100644 --- a/Netlist/Module.pm +++ b/Netlist/Module.pm @@ -17,7 +17,7 @@ use strict; @ISA = qw(Verilog::Netlist::Module::Struct Verilog::Netlist::Subclass); -$VERSION = '3.475'; +$VERSION = '3.483'; structs('new', 'Verilog::Netlist::Module::Struct' @@ -533,7 +533,7 @@ Verilog-Perl is part of the L free Verilog EDA software tool suite. The latest version is available from CPAN and from L. -Copyright 2000-2020 by Wilson Snyder. This package is free software; you +Copyright 2000-2024 by Wilson Snyder. This package is free software; you can redistribute it and/or modify it under the terms of either the GNU Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. diff --git a/Netlist/Net.pm b/Netlist/Net.pm index 7b97c57..62095dc 100644 --- a/Netlist/Net.pm +++ b/Netlist/Net.pm @@ -11,7 +11,7 @@ use strict; @ISA = qw(Verilog::Netlist::Net::Struct Verilog::Netlist::Subclass); -$VERSION = '3.475'; +$VERSION = '3.483'; my %_Type_Widths = ( 'bit' => 1, @@ -408,7 +408,7 @@ Verilog-Perl is part of the L free Verilog EDA software tool suite. The latest version is available from CPAN and from L. -Copyright 2000-2020 by Wilson Snyder. This package is free software; you +Copyright 2000-2024 by Wilson Snyder. This package is free software; you can redistribute it and/or modify it under the terms of either the GNU Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. diff --git a/Netlist/Pin.pm b/Netlist/Pin.pm index 67bca39..0b044d6 100644 --- a/Netlist/Pin.pm +++ b/Netlist/Pin.pm @@ -17,7 +17,7 @@ use strict; @ISA = qw(Verilog::Netlist::Pin::Struct Verilog::Netlist::Subclass); -$VERSION = '3.475'; +$VERSION = '3.483'; structs('_new_base', 'Verilog::Netlist::Pin::Struct' @@ -384,7 +384,7 @@ Verilog-Perl is part of the L free Verilog EDA software tool suite. The latest version is available from CPAN and from L. -Copyright 2000-2020 by Wilson Snyder. This package is free software; you +Copyright 2000-2024 by Wilson Snyder. This package is free software; you can redistribute it and/or modify it under the terms of either the GNU Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. diff --git a/Netlist/PinSelection.pm b/Netlist/PinSelection.pm index 9869d37..87e6aee 100644 --- a/Netlist/PinSelection.pm +++ b/Netlist/PinSelection.pm @@ -118,7 +118,7 @@ Verilog-Perl is part of the L free Verilog EDA software tool suite. The latest version is available from CPAN and from L. -Copyright 2000-2020 by Wilson Snyder. This package is free software; you +Copyright 2000-2024 by Wilson Snyder. This package is free software; you can redistribute it and/or modify it under the terms of either the GNU Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. diff --git a/Netlist/Port.pm b/Netlist/Port.pm index 0c4a0a4..0f9d933 100644 --- a/Netlist/Port.pm +++ b/Netlist/Port.pm @@ -11,7 +11,7 @@ use strict; @ISA = qw(Verilog::Netlist::Port::Struct Verilog::Netlist::Subclass); -$VERSION = '3.475'; +$VERSION = '3.483'; structs('_new_base', 'Verilog::Netlist::Port::Struct' @@ -197,7 +197,7 @@ Verilog-Perl is part of the L free Verilog EDA software tool suite. The latest version is available from CPAN and from L. -Copyright 2000-2020 by Wilson Snyder. This package is free software; you +Copyright 2000-2024 by Wilson Snyder. This package is free software; you can redistribute it and/or modify it under the terms of either the GNU Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. diff --git a/Netlist/Subclass.pm b/Netlist/Subclass.pm index ccbbe9f..0625dae 100644 --- a/Netlist/Subclass.pm +++ b/Netlist/Subclass.pm @@ -12,7 +12,7 @@ use base qw(Exporter); use vars qw($VERSION @EXPORT); use strict; -$VERSION = '3.475'; +$VERSION = '3.483'; @EXPORT = qw(structs); # Maybe in the future. For now all users of this must do it themselves @@ -320,7 +320,7 @@ Verilog-Perl is part of the L free Verilog EDA software tool suite. The latest version is available from CPAN and from L. -Copyright 2000-2020 by Wilson Snyder. This package is free software; you +Copyright 2000-2024 by Wilson Snyder. This package is free software; you can redistribute it and/or modify it under the terms of either the GNU Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. diff --git a/Parser/Makefile.PL b/Parser/Makefile.PL index 26b214c..d28f424 100644 --- a/Parser/Makefile.PL +++ b/Parser/Makefile.PL @@ -1,6 +1,6 @@ # DESCRIPTION: Perl ExtUtils: Type 'perl Makefile.PL' to create a Makefile for this package # -# Copyright 2000-2020 by Wilson Snyder. This program is free software; +# Copyright 2000-2024 by Wilson Snyder. This program is free software; # you can redistribute it and/or modify it under the terms of either the GNU # Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. diff --git a/Parser/Parser.pm b/Parser/Parser.pm index 97b5e43..3124f12 100644 --- a/Parser/Parser.pm +++ b/Parser/Parser.pm @@ -14,7 +14,7 @@ use base qw(DynaLoader); use strict; use vars qw($VERSION $Debug); -$VERSION = '3.475'; +$VERSION = '3.483'; #$Debug sets the default value for debug. You're better off with the object method though. @@ -527,7 +527,7 @@ Verilog-Perl is part of the L free Verilog EDA software tool suite. The latest version is available from CPAN and from L. -Copyright 2000-2020 by Wilson Snyder. This package is free software; you +Copyright 2000-2024 by Wilson Snyder. This package is free software; you can redistribute it and/or modify it under the terms of either the GNU Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. diff --git a/Parser/Parser.xs b/Parser/Parser.xs index ca664fa..78f4b33 100644 --- a/Parser/Parser.xs +++ b/Parser/Parser.xs @@ -9,7 +9,7 @@ #* #********************************************************************* #* -#* Copyright 2000-2020 by Wilson Snyder. This program is free software; +#* Copyright 2000-2024 by Wilson Snyder. This program is free software; #* you can redistribute it and/or modify it under the terms of either the GNU #* Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. #* diff --git a/Parser/SigParser.pm b/Parser/SigParser.pm index 5f3c080..f21ab61 100644 --- a/Parser/SigParser.pm +++ b/Parser/SigParser.pm @@ -14,7 +14,7 @@ use base qw(Verilog::Parser); ###################################################################### #### Configuration Section -$VERSION = '3.475'; +$VERSION = '3.483'; our @_Callback_Names = qw( attribute @@ -526,7 +526,7 @@ Verilog-Perl is part of the L free Verilog EDA software tool suite. The latest version is available from CPAN and from L. -Copyright 2000-2020 by Wilson Snyder. This package is free software; you +Copyright 2000-2024 by Wilson Snyder. This package is free software; you can redistribute it and/or modify it under the terms of either the GNU Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. diff --git a/Parser/VAst.cpp b/Parser/VAst.cpp index 08db8f0..162123b 100644 --- a/Parser/VAst.cpp +++ b/Parser/VAst.cpp @@ -1,7 +1,7 @@ // -*- C++ -*- //************************************************************************* // -// Copyright 2009-2020 by Wilson Snyder. This program is free software; +// Copyright 2009-2024 by Wilson Snyder. This program is free software; // you can redistribute it and/or modify it under the terms of either the // GNU Lesser General Public License Version 3 or the Perl Artistic License // Version 2.0. diff --git a/Parser/VAst.h b/Parser/VAst.h index c4258ee..21316df 100644 --- a/Parser/VAst.h +++ b/Parser/VAst.h @@ -1,7 +1,7 @@ // -*- C++ -*- //************************************************************************* // -// Copyright 2009-2020 by Wilson Snyder. This program is free software; +// Copyright 2009-2024 by Wilson Snyder. This program is free software; // you can redistribute it and/or modify it under the terms of either the // GNU Lesser General Public License Version 3 or the Perl Artistic License // Version 2.0. diff --git a/Parser/VParse.cpp b/Parser/VParse.cpp index 53485ce..a006344 100644 --- a/Parser/VParse.cpp +++ b/Parser/VParse.cpp @@ -1,7 +1,7 @@ // -*- C++ -*- //************************************************************************* // -// Copyright 2000-2020 by Wilson Snyder. This program is free software; +// Copyright 2000-2024 by Wilson Snyder. This program is free software; // you can redistribute it and/or modify it under the terms of either the GNU // Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. // diff --git a/Parser/VParse.h b/Parser/VParse.h index f7a386a..8c4c21f 100644 --- a/Parser/VParse.h +++ b/Parser/VParse.h @@ -1,7 +1,7 @@ // -*- C++ -*- //************************************************************************* // -// Copyright 2000-2020 by Wilson Snyder. This program is free software; +// Copyright 2000-2024 by Wilson Snyder. This program is free software; // you can redistribute it and/or modify it under the terms of either the GNU // Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. // diff --git a/Parser/VParseBison.y b/Parser/VParseBison.y index 73e7662..ab65691 100644 --- a/Parser/VParseBison.y +++ b/Parser/VParseBison.y @@ -10,7 +10,7 @@ // //************************************************************************* // -// Copyright 2001-2020 by Wilson Snyder. This program is free software; +// Copyright 2001-2024 by Wilson Snyder. This program is free software; // you can redistribute it and/or modify it under the terms of either the GNU // Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. // @@ -53,15 +53,22 @@ #define NEWSTRING(text) (string((text))) #define SPACED(a,b) ((a)+(((a)=="" || (b)=="")?"":" ")+(b)) +#define VARS_PUSH() { GRAMMARP->m_varStack.push_back(GRAMMARP->m_var); } +#define VARS_POP() { GRAMMARP->m_var = GRAMMARP->m_varStack.back(); GRAMMARP->m_varStack.pop_back(); } + #define VARRESET_LIST(decl) { GRAMMARP->pinNum(1); VARRESET(); VARDECL(decl); } // Start of pinlist #define VARRESET_NONLIST(decl) { GRAMMARP->pinNum(0); VARRESET(); VARDECL(decl); } // Not in a pinlist #define VARRESET() { VARDECL(""); VARIO(""); VARNET(""); VARDTYPE(""); } // Start of one variable decl // VARDECL("") indicates inside a port list or IO list and we shouldn't declare the variable -#define VARDECL(type) { GRAMMARP->m_varDecl = (type); } // genvar, parameter, localparam -#define VARIO(type) { GRAMMARP->m_varIO = (type); } // input, output, inout, ref, const ref -#define VARNET(type) { GRAMMARP->m_varNet = (type); } // supply*,wire,tri -#define VARDTYPE(type) { GRAMMARP->m_varDType = (type); } // "signed", "int", etc +#define VARDECL(type) \ + { GRAMMARP->m_var.m_decl = (type); } // genvar, parameter, localparam +#define VARIO(type) \ + { GRAMMARP->m_var.m_io = (type); } // input, output, inout, ref, const ref +#define VARNET(type) \ + { GRAMMARP->m_var.m_net = (type); } // supply*,wire,tri +#define VARDTYPE(type) \ + { GRAMMARP->m_var.m_dtype = (type); } // "signed", "int", etc #define PINNUMINC() { GRAMMARP->pinNumInc(); } @@ -70,18 +77,19 @@ enum net_idx {NI_NETNAME = 0, NI_MSB, NI_LSB}; -static void VARDONE(VFileLine* fl, const string& name, const string& array, const string& value) { - if (GRAMMARP->m_varIO!="" && GRAMMARP->m_varDecl=="") GRAMMARP->m_varDecl="port"; - if (GRAMMARP->m_varDecl!="") { - PARSEP->varCb(fl, GRAMMARP->m_varDecl, name, PARSEP->symObjofUpward(), GRAMMARP->m_varNet, - GRAMMARP->m_varDType, array, value); +static void VARDONE(VFileLine * fl, const string& name, const string& array, const string& value) { + if (GRAMMARP->m_var.m_io != "" && GRAMMARP->m_var.m_decl == "") + GRAMMARP->m_var.m_decl = "port"; + if (GRAMMARP->m_var.m_decl != "") { + PARSEP->varCb(fl, GRAMMARP->m_var.m_decl, name, PARSEP->symObjofUpward(), + GRAMMARP->m_var.m_net, GRAMMARP->m_var.m_dtype, array, value); } - if (GRAMMARP->m_varIO!="" || GRAMMARP->pinNum()) { - PARSEP->portCb(fl, name, PARSEP->symObjofUpward(), - GRAMMARP->m_varIO, GRAMMARP->m_varDType, array, GRAMMARP->pinNum()); + if (GRAMMARP->m_var.m_io != "" || GRAMMARP->pinNum()) { + PARSEP->portCb(fl, name, PARSEP->symObjofUpward(), GRAMMARP->m_var.m_io, + GRAMMARP->m_var.m_dtype, array, GRAMMARP->pinNum()); } - if (GRAMMARP->m_varDType == "type") { - PARSEP->syms().replaceInsert(VAstType::TYPE,name); + if (GRAMMARP->m_var.m_dtype == "type") { + PARSEP->syms().replaceInsert(VAstType::TYPE, name); } } @@ -89,7 +97,7 @@ static void VARDONETYPEDEF(VFileLine* fl, const string& name, const string& type VARRESET(); VARDECL("typedef"); VARDTYPE(type); VARDONE(fl,name,array,""); // TYPE shouldn't override a more specific node type, as often is forward reference - PARSEP->syms().replaceInsert(VAstType::TYPE,name); + PARSEP->syms().replaceInsert(VAstType::TYPE, name); } static void parse_net_constants(VFileLine* fl, VParseHashElem nets[][3]) { @@ -317,6 +325,11 @@ static void NEED_S09(VFileLine*, const string&) { //fileline->error((string)"Advanced feature: \""+tokname+"\" is a 1800-2009 construct, but used under --language 1800-2005 or earlier."); } +// gcc-11 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98753 +#if defined(__GNUC__) && __GNUC__ == 11 +#pragma GCC diagnostic ignored "-Wfree-nonheap-object" +#endif + %} BISONPRE_VERSION(0.0, 2.999, %pure_parser) @@ -1543,8 +1556,11 @@ struct_union_memberList: // IEEE: { struct_union_member } ; struct_union_member: // ==IEEE: struct_union_member - random_qualifierE data_type_or_void { VARRESET_NONLIST("member"); VARDTYPE(SPACED($1,$2)); } - /*cont*/ list_of_variable_decl_assignments ';' { } + random_qualifierE data_type_or_void + { VARS_PUSH(); // Structs can be recursive, or under a parameter typs + VARRESET_NONLIST("member"); VARDTYPE(SPACED($1,$2)); } + /*cont*/ list_of_variable_decl_assignments ';' + { VARS_POP(); } ; list_of_variable_decl_assignments: // ==IEEE: list_of_variable_decl_assignments @@ -1603,9 +1619,10 @@ variable_dimension: // ==IEEE: variable_dimension '[' ']' { $$=$1; $$=""; } // // IEEE: unpacked_dimension | anyrange { $$=$1; $$=$1; } - | '[' constExpr ']' { $$=$1; $$="["+$2+"]"; } - // // IEEE: associative_dimension - | '[' data_type ']' { $$=$1; $$="["+$2+"]"; } + // // IEEE: unpacked_dimension (if const_expr) + // // IEEE: associative_dimension (if data_type) + // // Can't tell which until see if expr is data type or not + | '[' exprOrDataType ']' { $$=$1; $$="["+$2+"]"; } | yP_BRASTAR ']' { $$=$1; $$="[*]"; } | '[' '*' ']' { $$=$1; $$="[*]"; } // // IEEE: queue_dimension @@ -1738,12 +1755,12 @@ data_declarationVarFrontClass: // IEEE: part of data_declaration (for class_prop // // VARRESET called before this rule // // yCONST is removed, added to memberQual rules // // implicit_type expanded into /*empty*/ or "signingE rangeList" - yVAR lifetimeE data_type { VARDECL("var"); VARDTYPE(SPACED(GRAMMARP->m_varDType,$3)); } - | yVAR lifetimeE { VARDECL("var"); VARDTYPE(GRAMMARP->m_varDType); } - | yVAR lifetimeE signingE rangeList { VARDECL("var"); VARDTYPE(SPACED(GRAMMARP->m_varDType,SPACED($3,$4))); } + yVAR lifetimeE data_type { VARDECL("var"); VARDTYPE(SPACED(GRAMMARP->m_var.m_dtype, $3)); } + | yVAR lifetimeE { VARDECL("var"); VARDTYPE(GRAMMARP->m_var.m_dtype); } + | yVAR lifetimeE signingE rangeList { VARDECL("var"); VARDTYPE(SPACED(GRAMMARP->m_var.m_dtype, SPACED($3, $4))); } // // // Expanded: "constE lifetimeE data_type" - | /**/ data_typeVar { VARDECL("var"); VARDTYPE(SPACED(GRAMMARP->m_varDType,$1)); } + | /**/ data_typeVar { VARDECL("var"); VARDTYPE(SPACED(GRAMMARP->m_var.m_dtype, $1)); } // // lifetime is removed, added to memberQual rules to avoid conflict // // yCONST is removed, added to memberQual rules to avoid conflict // // = class_new is in variable_decl_assignment diff --git a/Parser/VParseGrammar.h b/Parser/VParseGrammar.h index 7ebc839..2a94a5c 100644 --- a/Parser/VParseGrammar.h +++ b/Parser/VParseGrammar.h @@ -1,7 +1,7 @@ // -*- C++ -*- //************************************************************************* // -// Copyright 2000-2020 by Wilson Snyder. This program is free software; +// Copyright 2000-2024 by Wilson Snyder. This program is free software; // you can redistribute it and/or modify it under the terms of either the GNU // Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. // @@ -54,6 +54,14 @@ struct VParseNet { : m_name(net), m_msb(""), m_lsb("") {} }; +struct VParseVar { + string m_decl; + string m_net; + string m_io; + string m_dtype; + string m_range; +}; + //============================================================================ // We can't use bison's %union as the string type doesn't fit in a union. // It's fine to use a struct though! @@ -74,11 +82,8 @@ class VParseGrammar { public: // Only for VParseBison int m_pinNum; ///< Pin number being parsed - string m_varDecl; - string m_varNet; - string m_varIO; - string m_varDType; - string m_varRange; + + VParseVar m_var; string m_cellMod; bool m_cellParam; @@ -93,6 +98,7 @@ class VParseGrammar { deque m_pinStack; deque m_portStack; + deque m_varStack; public: // But for internal use only static VParseGrammar* staticGrammarp() { return s_grammarp; } diff --git a/Parser/VParseLex.h b/Parser/VParseLex.h index f0f89b2..96699a6 100644 --- a/Parser/VParseLex.h +++ b/Parser/VParseLex.h @@ -1,7 +1,7 @@ // -*- C++ -*- //************************************************************************* // -// Copyright 2000-2020 by Wilson Snyder. This program is free software; +// Copyright 2000-2024 by Wilson Snyder. This program is free software; // you can redistribute it and/or modify it under the terms of either the GNU // Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. // diff --git a/Parser/VParseLex.l b/Parser/VParseLex.l index 2ef0f61..79adc42 100644 --- a/Parser/VParseLex.l +++ b/Parser/VParseLex.l @@ -14,7 +14,7 @@ * ************************************************************************** * - * Copyright 2000-2020 by Wilson Snyder. This program is free software; + * Copyright 2000-2024 by Wilson Snyder. This program is free software; * you can redistribute it and/or modify it under the terms of either the * GNU Lesser General Public License Version 3 or the Perl Artistic License * Version 2.0. @@ -40,7 +40,7 @@ #define YY_SKIP_YYWRAP -#define STATE_VERILOG_RECENT S17 // State name for most recent Verilog Version +#define STATE_VERILOG_RECENT S23 // State name for most recent Verilog Version // Flex 2.5.35 has compile warning in ECHO, so we'll default our own rule #define ECHO yyerrorf("Missing VParseLex.l rule: ECHO rule invoked in state %d: %s", YY_START, yytext); @@ -88,7 +88,7 @@ void yyerrorf(const char* format, ...) { /**********************************************************************/ %} -%s V95 V01 V05 S05 S09 S12 S17 +%s V95 V01 V05 S05 S09 S12 S17 S23 %s STRING ATTRMODE %s CMTMODE PROTMODE %s DUMMY_TO_AVOID_WARNING @@ -114,7 +114,7 @@ vnum {vnum1}|{vnum2}|{vnum3}|{vnum4}|{vnum5} .|\n {BEGIN STATE_VERILOG_RECENT; yyless(0); } /* Verilog 1995 */ -{ +{ {ws} { StashPrefix; } /* otherwise ignore white-space */ {crnl} { StashPrefix; NEXTLINE(); } /* Count line numbers */ /* Keywords */ @@ -224,7 +224,7 @@ vnum {vnum1}|{vnum2}|{vnum3}|{vnum4}|{vnum5} } /* Verilog 2001 */ -{ +{ /* Keywords*/ "automatic" { FL; VALTEXT; CALLBACK(keywordCb); return yAUTOMATIC; } "endgenerate" { FL; VALTEXT; CALLBACK(keywordCb); return yENDGENERATE; } @@ -252,13 +252,13 @@ vnum {vnum1}|{vnum2}|{vnum3}|{vnum4}|{vnum5} } /* Verilog 2005 */ -{ +{ /* Keywords */ "uwire" { FL; VALTEXT; CALLBACK(keywordCb); return yWIRE; } } /* System Verilog 2005 */ -{ +{ /* System Tasks */ "$error" { FL; VALTEXT; CALLBACK(keywordCb); return yD_ERROR; } "$fatal" { FL; VALTEXT; CALLBACK(keywordCb); return yD_FATAL; } @@ -367,7 +367,7 @@ vnum {vnum1}|{vnum2}|{vnum3}|{vnum4}|{vnum5} } /* System Verilog 2009 */ -{ +{ /* Keywords */ "accept_on" { FL; VALTEXT; CALLBACK(keywordCb); return yACCEPT_ON; } "checker" { FL; VALTEXT; CALLBACK(keywordCb); return yCHECKER; } @@ -395,7 +395,7 @@ vnum {vnum1}|{vnum2}|{vnum3}|{vnum4}|{vnum5} } /* System Verilog 2012 */ -{ +{ /* Keywords */ "implements" { FL; VALTEXT; CALLBACK(keywordCb); return yIMPLEMENTS; } "interconnect" { FL; VALTEXT; CALLBACK(keywordCb); return yINTERCONNECT; } @@ -407,18 +407,18 @@ vnum {vnum1}|{vnum2}|{vnum3}|{vnum4}|{vnum5} /* No new keywords */ /* Default PLI rule */ -{ +{ "$"[a-zA-Z_$][a-zA-Z0-9_$]* { FL; VALTEXT; CALLBACK(sysfuncCb); return ygenSYSCALL; } } /************************************************************************/ /* Single character operator thingies */ -{ +{ "{" { FL; VALTEXT; CALLBACK(operatorCb); return yytext[0]; } "}" { FL; VALTEXT; CALLBACK(operatorCb); return yytext[0]; } } -{ +{ "!" { FL; VALTEXT; CALLBACK(operatorCb); return yytext[0]; } "#" { FL; VALTEXT; CALLBACK(operatorCb); return yytext[0]; } "$" { FL; VALTEXT; CALLBACK(operatorCb); return yytext[0]; } @@ -450,7 +450,7 @@ vnum {vnum1}|{vnum2}|{vnum3}|{vnum4}|{vnum5} /* Operators and multi-character symbols */ /* Verilog 1995 Operators */ -{ +{ "&&" { FL; VALTEXT; CALLBACK(operatorCb); return yP_ANDAND; } "||" { FL; VALTEXT; CALLBACK(operatorCb); return yP_OROR; } "<=" { FL; VALTEXT; CALLBACK(operatorCb); return yP_LTE; } @@ -472,7 +472,7 @@ vnum {vnum1}|{vnum2}|{vnum3}|{vnum4}|{vnum5} } /* Verilog 2001 Operators */ -{ +{ "<<<" { FL; VALTEXT; CALLBACK(operatorCb); return yP_SLEFT; } ">>>" { FL; VALTEXT; CALLBACK(operatorCb); return yP_SSRIGHT; } "**" { FL; VALTEXT; CALLBACK(operatorCb); return yP_POW; } @@ -482,7 +482,7 @@ vnum {vnum1}|{vnum2}|{vnum3}|{vnum4}|{vnum5} } /* SystemVerilog 2005 Operators */ -{ +{ "'" { FL; VALTEXT; CALLBACK(operatorCb); return yP_TICK; } "'{" { FL; VALTEXT; CALLBACK(operatorCb); return yP_TICKBRA; } "==?" { FL; VALTEXT; CALLBACK(operatorCb); return yP_WILDEQUAL; } @@ -517,12 +517,12 @@ vnum {vnum1}|{vnum2}|{vnum3}|{vnum4}|{vnum5} } /* SystemVerilog 2009 Operators */ -{ +{ "<->" { FL; VALTEXT; CALLBACK(operatorCb); return yP_LTMINUSGT; } } /* Identifiers and numbers */ -{ +{ /* Consume a following space, as we're going to add one to the symbol, we'd like to avoid inserting an extra */ {escid}{space} { if (VParseLex::symEscapeless(yytext+1,yyleng-1-1)) { string sym = string(yytext+1,yyleng-1-1); @@ -619,13 +619,13 @@ vnum {vnum1}|{vnum2}|{vnum3}|{vnum4}|{vnum5} /************************************************************************/ /* Attributes */ /* Note simulators vary in support for "(* /_*something*_/ foo*)" where _ doesn't exist */ -{ +{ "(*"({ws}|{crnl})*({id}|{escid}) { yymore(); yy_push_state(ATTRMODE); } /* Doesn't match (*), but (* attr_spec */ } /************************************************************************/ /* Preprocessor */ -{ +{ "`accelerate" { FL; VALTEXT; CALLBACK(preprocCb); } // Verilog-XL compatibility "`autoexpand_vectornets" { FL; VALTEXT; CALLBACK(preprocCb); } // Verilog-XL compatibility "`celldefine" { FL; VALTEXT; CALLBACK(preprocCb); LEXP->m_inCellDefine=true; } @@ -669,13 +669,14 @@ vnum {vnum1}|{vnum2}|{vnum3}|{vnum4}|{vnum5} "`begin_keywords"[ \t]*\"1800-2009\" { yy_push_state(S09); CALLBACK(preprocCb); } "`begin_keywords"[ \t]*\"1800-2012\" { yy_push_state(S12); CALLBACK(preprocCb); } "`begin_keywords"[ \t]*\"1800-2017\" { yy_push_state(S17); CALLBACK(preprocCb); } + "`begin_keywords"[ \t]*\"1800-2023\" { yy_push_state(S23); CALLBACK(preprocCb); } "`end_keywords" { yy_pop_state(); CALLBACK(preprocCb); } } /************************************************************************/ /* Default rules - leave last */ -{ +{ "`"[a-zA-Z_0-9]+ { FL; VALTEXT; if (LPARSEP->sigParser()) { yyerrorf("Define or directive not defined: %s",yytext); } else { CALLBACK(preprocCb); } } @@ -882,6 +883,7 @@ void VParseLex::language(const char* value) { else if (0==strcmp(value,"1800-2009")) { BEGIN S09; } else if (0==strcmp(value,"1800-2012")) { BEGIN S12; } else if (0==strcmp(value,"1800-2017")) { BEGIN S17; } + else if (0==strcmp(value,"1800-2023")) { BEGIN S23; } else yyerrorf("Unknown setLanguage code: %s", value); } diff --git a/Parser/VSymTable.cpp b/Parser/VSymTable.cpp index acda704..08468f6 100644 --- a/Parser/VSymTable.cpp +++ b/Parser/VSymTable.cpp @@ -1,7 +1,7 @@ // -*- C++ -*- //************************************************************************* // -// Copyright 2009-2020 by Wilson Snyder. This program is free software; +// Copyright 2009-2024 by Wilson Snyder. This program is free software; // you can redistribute it and/or modify it under the terms of either the // GNU Lesser General Public License Version 3 or the Perl Artistic License // Version 2.0. diff --git a/Parser/VSymTable.h b/Parser/VSymTable.h index cefab78..a33764a 100644 --- a/Parser/VSymTable.h +++ b/Parser/VSymTable.h @@ -1,7 +1,7 @@ // -*- C++ -*- //************************************************************************* // -// Copyright 2009-2020 by Wilson Snyder. This program is free software; +// Copyright 2009-2024 by Wilson Snyder. This program is free software; // you can redistribute it and/or modify it under the terms of either the // GNU Lesser General Public License Version 3 or the Perl Artistic License // Version 2.0. diff --git a/Parser/bisonpre b/Parser/bisonpre index 72eca00..58c8a65 100755 --- a/Parser/bisonpre +++ b/Parser/bisonpre @@ -9,7 +9,7 @@ use Pod::Usage; use strict; use vars qw($Debug $VERSION); -$VERSION = '3.475'; +$VERSION = '3.483'; our $Self; @@ -572,7 +572,7 @@ This is part of the L free Verilog EDA software tool suite. The latest version is available from CPAN and from L. -Copyright 2008-2020 by Wilson Snyder. This package is free software; you +Copyright 2008-2024 by Wilson Snyder. This package is free software; you can redistribute it and/or modify it under the terms of either the GNU Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. diff --git a/Parser/callbackgen b/Parser/callbackgen index 829af54..9f6974b 100755 --- a/Parser/callbackgen +++ b/Parser/callbackgen @@ -14,7 +14,7 @@ use vars qw($Debug $VERSION); require "../Language.pm"; package main; -$VERSION = '3.475'; +$VERSION = '3.483'; # xs_manual=>1, -> The .xs file makes the handler itself @@ -369,7 +369,7 @@ This is part of the L free Verilog EDA software tool suite. The latest version is available from CPAN and from L. -Copyright 2008-2020 by Wilson Snyder. This package is free software; you +Copyright 2008-2024 by Wilson Snyder. This package is free software; you can redistribute it and/or modify it under the terms of either the GNU Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. diff --git a/Preproc/Makefile.PL b/Preproc/Makefile.PL index fa72fef..191926e 100644 --- a/Preproc/Makefile.PL +++ b/Preproc/Makefile.PL @@ -1,6 +1,6 @@ # DESCRIPTION: Perl ExtUtils: Type 'perl Makefile.PL' to create a Makefile for this package # -# Copyright 2000-2020 by Wilson Snyder. This program is free software; +# Copyright 2000-2024 by Wilson Snyder. This program is free software; # you can redistribute it and/or modify it under the terms of either the GNU # Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. diff --git a/Preproc/Preproc.pm b/Preproc/Preproc.pm index 6f090ae..c8d269d 100644 --- a/Preproc/Preproc.pm +++ b/Preproc/Preproc.pm @@ -11,7 +11,7 @@ use base qw(DynaLoader); use strict; use vars qw($VERSION); -$VERSION = '3.475'; +$VERSION = '3.483'; ###################################################################### #### Configuration Section @@ -467,7 +467,7 @@ Verilog-Perl is part of the L free Verilog EDA software tool suite. The latest version is available from CPAN and from L. -Copyright 2000-2020 by Wilson Snyder. This package is free software; you +Copyright 2000-2024 by Wilson Snyder. This package is free software; you can redistribute it and/or modify it under the terms of either the GNU Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. diff --git a/Preproc/Preproc.xs b/Preproc/Preproc.xs index 00e441c..0771539 100644 --- a/Preproc/Preproc.xs +++ b/Preproc/Preproc.xs @@ -9,7 +9,7 @@ #* #********************************************************************* #* -#* Copyright 2000-2020 by Wilson Snyder. This program is free software; +#* Copyright 2000-2024 by Wilson Snyder. This program is free software; #* you can redistribute it and/or modify it under the terms of either the GNU #* Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. #* diff --git a/Preproc/VFileLine.cpp b/Preproc/VFileLine.cpp index dc31caa..9c06639 100644 --- a/Preproc/VFileLine.cpp +++ b/Preproc/VFileLine.cpp @@ -1,7 +1,7 @@ // -*- C++ -*- //************************************************************************* // -// Copyright 2000-2020 by Wilson Snyder. This program is free software; +// Copyright 2000-2024 by Wilson Snyder. This program is free software; // you can redistribute it and/or modify it under the terms of either the GNU // Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. // diff --git a/Preproc/VFileLine.h b/Preproc/VFileLine.h index 1c09e20..4b5bf31 100644 --- a/Preproc/VFileLine.h +++ b/Preproc/VFileLine.h @@ -1,7 +1,7 @@ // -*- C++ -*- //************************************************************************* // -// Copyright 2000-2020 by Wilson Snyder. This program is free software; +// Copyright 2000-2024 by Wilson Snyder. This program is free software; // you can redistribute it and/or modify it under the terms of either the GNU // Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. // diff --git a/Preproc/VPreLex.h b/Preproc/VPreLex.h index 676b8db..3f5b086 100644 --- a/Preproc/VPreLex.h +++ b/Preproc/VPreLex.h @@ -1,7 +1,7 @@ // -*- C++ -*- //************************************************************************* // -// Copyright 2000-2020 by Wilson Snyder. This program is free software; +// Copyright 2000-2024 by Wilson Snyder. This program is free software; // you can redistribute it and/or modify it under the terms of either the GNU // Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. // diff --git a/Preproc/VPreLex.l b/Preproc/VPreLex.l index 29bf451..99340c7 100644 --- a/Preproc/VPreLex.l +++ b/Preproc/VPreLex.l @@ -14,7 +14,7 @@ * ****************************************************************************** * - * Copyright 2000-2020 by Wilson Snyder. This program is free software; + * Copyright 2000-2024 by Wilson Snyder. This program is free software; * you can redistribute it and/or modify it under the terms of either the GNU * Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. * diff --git a/Preproc/VPreProc.cpp b/Preproc/VPreProc.cpp index 6c84303..f9a0726 100644 --- a/Preproc/VPreProc.cpp +++ b/Preproc/VPreProc.cpp @@ -1,7 +1,7 @@ // -*- C++ -*- //************************************************************************* // -// Copyright 2000-2020 by Wilson Snyder. This program is free software; +// Copyright 2000-2024 by Wilson Snyder. This program is free software; // you can redistribute it and/or modify it under the terms of either the GNU // Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. // diff --git a/Preproc/VPreProc.h b/Preproc/VPreProc.h index 8e88040..8661c76 100644 --- a/Preproc/VPreProc.h +++ b/Preproc/VPreProc.h @@ -1,7 +1,7 @@ // -*- C++ -*- //************************************************************************* // -// Copyright 2000-2020 by Wilson Snyder. This program is free software; +// Copyright 2000-2024 by Wilson Snyder. This program is free software; // you can redistribute it and/or modify it under the terms of either the GNU // Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. // diff --git a/Preproc/flexfix b/Preproc/flexfix index c815e3d..7376b55 100755 --- a/Preproc/flexfix +++ b/Preproc/flexfix @@ -1,7 +1,7 @@ #!/usr/bin/perl -w ###################################################################### # -# Copyright 2002-2020 by Wilson Snyder. This program is free software; you +# Copyright 2002-2024 by Wilson Snyder. This program is free software; you # can redistribute it and/or modify it under the terms of either the GNU # Lesser General Public License Version 3 or the Perl Artistic License # Version 2.0. diff --git a/Preproc/toolhash b/Preproc/toolhash index 544e0bb..d110805 100755 --- a/Preproc/toolhash +++ b/Preproc/toolhash @@ -266,7 +266,7 @@ This is part of the L free Verilog EDA software tool suite. The latest version is available from CPAN and from L. -Copyright 2010-2020 by Wilson Snyder. This package is free software; you +Copyright 2010-2024 by Wilson Snyder. This package is free software; you can redistribute it and/or modify it under the terms of either the GNU Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. diff --git a/Preproc/xsubppfix b/Preproc/xsubppfix index 6d48f90..07f19c2 100755 --- a/Preproc/xsubppfix +++ b/Preproc/xsubppfix @@ -1,6 +1,6 @@ #!/usr/bin/perl -w # -# Copyright 2008-2020 by Wilson Snyder. This program is free software; +# Copyright 2008-2024 by Wilson Snyder. This program is free software; # you can redistribute it and/or modify it under the terms of either the GNU # Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. # diff --git a/README.pod b/README.pod index bc0b10d..9d22771 100644 --- a/README.pod +++ b/README.pod @@ -154,7 +154,7 @@ It understands and implements all preprocessor features of SystemVerilog Verilog::Parser is useful when you need to tokenize or write source filters (where you need everything including whitespace). It can take raw files, or preprocessed input, and generates callbacks. It understands all -SystemVerilog 2017 keywords. +SystemVerilog 2023 keywords. =item Abstract Syntax Tree @@ -202,18 +202,45 @@ writing a parser from scratch). The Verilator program also contains a very similar front end as Verilog-Perl and can create XML output showing the abstract syntax tree. Verilator also understands how to elaborate and connect complex pins and -types, but supports mostly only the synthesis subset of SystemVerilog. - -If you're looking to parse only synthesizable code this is the recommended -route. +types, but supports a subset of SystemVerilog. =item Verilog-Mode for Emacs Although not a parser, a common requested use of Verilog-Perl is to automatically make shell modules and interconnect modules. Verilog-Mode is -a better solution to this problem, as it results in completely portable -code; the program (Verilog-Mode) isn't needed for others to update the -design. It's also in very common usage, including by many IP providers. +a project with a better solution to this problem, as it results in +completely portable code; the program (Verilog-Mode) isn't needed for +others to update the design. It's also in very common usage, including by +many IP providers. + +=item slang + +The SystemVerilog Language Services (slang) project L +provides various components for lexing, parsing, type checking, and +elaborating SystemVerilog code. It's fast and supports UVM. + +=item Surelog + +The Surelog project L is a +SystemVerilog 2017 Pre-processor, Parser, Elaborator, and UHDM Compiler. It +handles UVM and provides an IEEE Design/TB C/C++ VPI and Python AST API. + +=item SV-Parser + +The Sv-parser project L is a +SystemVerilog parser library fully compliant with IEEE 1800-2017. that +returns a concrete syntax tree. + +=item Tree-Sitter-Verilog + +The Tree-Sitter-Verilog project +L is a verilog grammar +for the JavaScript tree-sitter parser. + +=item Verible + +The Verible project L parses IEEE +1800-2017, with the ability to parse un-preprocessed source files. =back @@ -232,7 +259,7 @@ development on Verilog-Perl, use the sources. Option 1: Easiest installation is using the "CPAN" command line that comes with Perl. After configuring CPAN the first time, simply - cpan install Verilog-Perl + cpan install Verilog::Language # And see the documentation man Verilog-Perl # Or, sometimes the capitalization is changed @@ -298,7 +325,7 @@ Verilog-Perl is part of the L free Verilog EDA software tool suite. The latest version is available from CPAN and from L. -Copyright 2000-2020 by Wilson Snyder. This package is free software; you +Copyright 2000-2024 by Wilson Snyder. This package is free software; you can redistribute it and/or modify it under the terms of either the GNU Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. diff --git a/Std.pm b/Std.pm index a2e1e51..473854e 100644 --- a/Std.pm +++ b/Std.pm @@ -14,7 +14,7 @@ use vars qw($VERSION); ###################################################################### #### Configuration Section -$VERSION = '3.475'; +$VERSION = '3.483'; ####################################################################### # It's a PITRA to have pure datafiles get installed properly, so we have @@ -117,7 +117,7 @@ Verilog-Perl is part of the L free Verilog EDA software tool suite. The latest version is available from CPAN and from L. -Copyright 2009-2020 by Wilson Snyder. This package is free software; you +Copyright 2009-2024 by Wilson Snyder. This package is free software; you can redistribute it and/or modify it under the terms of either the GNU Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. diff --git a/t/00_pod.t b/t/00_pod.t index 26d2c33..4b4596d 100755 --- a/t/00_pod.t +++ b/t/00_pod.t @@ -1,7 +1,7 @@ #!/usr/bin/perl -w # DESCRIPTION: Perl ExtUtils: Type 'make test' to test this package # -# Copyright 2000-2020 by Wilson Snyder. This program is free software; +# Copyright 2000-2024 by Wilson Snyder. This program is free software; # you can redistribute it and/or modify it under the terms of either the GNU # Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. diff --git a/t/01_manifest.t b/t/01_manifest.t index 8936c6c..12e8e38 100755 --- a/t/01_manifest.t +++ b/t/01_manifest.t @@ -1,7 +1,7 @@ #!/usr/bin/perl -w # DESCRIPTION: Perl ExtUtils: Type 'make test' to test this package # -# Copyright 2007-2020 by Wilson Snyder. This program is free software; +# Copyright 2007-2024 by Wilson Snyder. This program is free software; # you can redistribute it and/or modify it under the terms of either the GNU # Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. diff --git a/t/02_help.t b/t/02_help.t index 6e77703..c5ce006 100755 --- a/t/02_help.t +++ b/t/02_help.t @@ -1,7 +1,7 @@ #!/usr/bin/perl -w # DESCRIPTION: Perl ExtUtils: Type 'make test' to test this package # -# Copyright 2007-2020 by Wilson Snyder. This program is free software; +# Copyright 2007-2024 by Wilson Snyder. This program is free software; # you can redistribute it and/or modify it under the terms of either the GNU # Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. diff --git a/t/03_spaces.t b/t/03_spaces.t index b0368b4..f0082d8 100755 --- a/t/03_spaces.t +++ b/t/03_spaces.t @@ -1,7 +1,7 @@ #!/usr/bin/perl -w # DESCRIPTION: Perl ExtUtils: Type 'make test' to test this package # -# Copyright 2007-2020 by Wilson Snyder. This program is free software; +# Copyright 2007-2024 by Wilson Snyder. This program is free software; # you can redistribute it and/or modify it under the terms of either the GNU # Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. @@ -15,6 +15,10 @@ plan tests => (1 + (keys %{$manifest})); ok(1); foreach my $filename (sort keys %{$manifest}) { + if (!$ENV{VERILATOR_AUTHOR_SITE}) { + skip("author only test (harmless)",1); + next; + } if ($filename =~ /README/) { # May not even exist skip("File doesn't need check (harmless)",1); next; @@ -28,8 +32,6 @@ foreach my $filename (sort keys %{$manifest}) { } elsif ($filename =~ m!\.out! || $filename =~ m!/gen/!) { skip("File doesn't need check (harmless)",1); - } elsif (!$ENV{VERILATOR_AUTHOR_SITE}) { - skip("author only test (harmless)",1); } else { warn "%Error: $filename: Bad indentation\n"; ok(0); diff --git a/t/04_critic.t b/t/04_critic.t index f6fe9c1..240d221 100755 --- a/t/04_critic.t +++ b/t/04_critic.t @@ -1,7 +1,7 @@ #!/usr/bin/perl -w # DESCRIPTION: Perl ExtUtils: Type 'make test' to test this package # -# Copyright 2000-2020 by Wilson Snyder. This program is free software; +# Copyright 2000-2024 by Wilson Snyder. This program is free software; # you can redistribute it and/or modify it under the terms of either the GNU # Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. diff --git a/t/05_yaml.t b/t/05_yaml.t index e726fd8..a82c9e0 100755 --- a/t/05_yaml.t +++ b/t/05_yaml.t @@ -1,7 +1,7 @@ #!/usr/bin/perl -w # DESCRIPTION: Perl ExtUtils: Type 'make test' to test this package # -# Copyright 2010-2020 by Wilson Snyder. This program is free software; +# Copyright 2010-2024 by Wilson Snyder. This program is free software; # you can redistribute it and/or modify it under the terms of either the GNU # Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. diff --git a/t/10_keywords.t b/t/10_keywords.t index d0f11fb..54ac11c 100755 --- a/t/10_keywords.t +++ b/t/10_keywords.t @@ -1,14 +1,14 @@ #!/usr/bin/perl -w # DESCRIPTION: Perl ExtUtils: Type 'make test' to test this package # -# Copyright 2000-2020 by Wilson Snyder. This program is free software; +# Copyright 2000-2024 by Wilson Snyder. This program is free software; # you can redistribute it and/or modify it under the terms of either the GNU # Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. use strict; use Test::More; -BEGIN { plan tests => 26 } +BEGIN { plan tests => 27 } BEGIN { require "./t/test_utils.pl"; } use Verilog::Language; @@ -18,7 +18,8 @@ ok (Verilog::Language::is_keyword("input")); ok (!Verilog::Language::is_keyword("not_input")); ok (Verilog::Language::is_compdirect("`define")); -is (Verilog::Language::language_standard(), '1800-2017'); +is (Verilog::Language::language_standard(), '1800-2023'); +is (Verilog::Language::language_standard('1800-2023'), '1800-2023'); is (Verilog::Language::language_standard('1800-2017'), '1800-2017'); is (Verilog::Language::language_standard('1800-2012'), '1800-2012'); is (Verilog::Language::language_standard('1800-2009'), '1800-2009'); @@ -34,7 +35,7 @@ ok (Verilog::Language::is_keyword("generate")); is (Verilog::Language::language_standard(1995), '1364-1995'); ok (!Verilog::Language::is_keyword("generate")); -is (Verilog::Language::language_maximum(), '1800-2017', 'language_maximum'); +is (Verilog::Language::language_maximum(), '1800-2023', 'language_maximum'); is (Verilog::Language::strip_comments("he/**/l/**/lo"), "hello"); is (Verilog::Language::strip_comments("he//xx/*\nllo"), "he\nllo"); diff --git a/t/12_splitbus.t b/t/12_splitbus.t index 4138c3d..5ce6279 100755 --- a/t/12_splitbus.t +++ b/t/12_splitbus.t @@ -1,7 +1,7 @@ #!/usr/bin/perl -w # DESCRIPTION: Perl ExtUtils: Type 'make test' to test this package # -# Copyright 2000-2020 by Wilson Snyder. This program is free software; +# Copyright 2000-2024 by Wilson Snyder. This program is free software; # you can redistribute it and/or modify it under the terms of either the GNU # Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. diff --git a/t/14_numbers.t b/t/14_numbers.t index 6cee699..cc29f11 100755 --- a/t/14_numbers.t +++ b/t/14_numbers.t @@ -1,7 +1,7 @@ #!/usr/bin/perl -w # DESCRIPTION: Perl ExtUtils: Type 'make test' to test this package # -# Copyright 2000-2020 by Wilson Snyder. This program is free software; +# Copyright 2000-2024 by Wilson Snyder. This program is free software; # you can redistribute it and/or modify it under the terms of either the GNU # Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. diff --git a/t/16_std.t b/t/16_std.t index 0d9d3ca..a6e6db9 100755 --- a/t/16_std.t +++ b/t/16_std.t @@ -1,7 +1,7 @@ #!/usr/bin/perl -w # DESCRIPTION: Perl ExtUtils: Type 'make test' to test this package # -# Copyright 2009-2020 by Wilson Snyder. This program is free software; +# Copyright 2009-2024 by Wilson Snyder. This program is free software; # you can redistribute it and/or modify it under the terms of either the GNU # Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. diff --git a/t/20_getopt.t b/t/20_getopt.t index 09f5d72..ad259e4 100755 --- a/t/20_getopt.t +++ b/t/20_getopt.t @@ -1,7 +1,7 @@ #!/usr/bin/perl -w # DESCRIPTION: Perl ExtUtils: Type 'make test' to test this package # -# Copyright 2000-2020 by Wilson Snyder. This program is free software; +# Copyright 2000-2024 by Wilson Snyder. This program is free software; # you can redistribute it and/or modify it under the terms of either the GNU # Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. diff --git a/t/30_preproc.t b/t/30_preproc.t index d900fa5..686954d 100755 --- a/t/30_preproc.t +++ b/t/30_preproc.t @@ -1,7 +1,7 @@ #!/usr/bin/perl -w # DESCRIPTION: Perl ExtUtils: Type 'make test' to test this package # -# Copyright 2000-2020 by Wilson Snyder. This program is free software; +# Copyright 2000-2024 by Wilson Snyder. This program is free software; # you can redistribute it and/or modify it under the terms of either the GNU # Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. diff --git a/t/32_noinc.t b/t/32_noinc.t index ebec24f..6dcd7fd 100755 --- a/t/32_noinc.t +++ b/t/32_noinc.t @@ -1,7 +1,7 @@ #!/usr/bin/perl -w # DESCRIPTION: Perl ExtUtils: Type 'make test' to test this package # -# Copyright 2000-2020 by Wilson Snyder. This program is free software; +# Copyright 2000-2024 by Wilson Snyder. This program is free software; # you can redistribute it and/or modify it under the terms of either the GNU # Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. diff --git a/t/33_gzip.t b/t/33_gzip.t index 300dd3e..ade4381 100755 --- a/t/33_gzip.t +++ b/t/33_gzip.t @@ -1,7 +1,7 @@ #!/usr/bin/perl -w # DESCRIPTION: Perl ExtUtils: Type 'make test' to test this package # -# Copyright 2000-2020 by Wilson Snyder. This program is free software; +# Copyright 2000-2024 by Wilson Snyder. This program is free software; # you can redistribute it and/or modify it under the terms of either the GNU # Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. diff --git a/t/34_parser.t b/t/34_parser.t index 442a927..b58cc66 100755 --- a/t/34_parser.t +++ b/t/34_parser.t @@ -1,7 +1,7 @@ #!/usr/bin/perl -w # DESCRIPTION: Perl ExtUtils: Type 'make test' to test this package # -# Copyright 2000-2020 by Wilson Snyder. This program is free software; +# Copyright 2000-2024 by Wilson Snyder. This program is free software; # you can redistribute it and/or modify it under the terms of either the GNU # Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. diff --git a/t/35_sigparser.out b/t/35_sigparser.out index b29caf6..e699175 100644 --- a/t/35_sigparser.out +++ b/t/35_sigparser.out @@ -947,7 +947,7 @@ verilog/parser_sv.v:348: VAR 'parameter' 'P1' 'module' '' 'logic [31:0]' '[3:0] verilog/parser_sv.v:348: COMMENT '// unpacked array' verilog/parser_sv.v:349: VAR 'member' 'ecc' 'struct' '' 'logic' '' '' verilog/parser_sv.v:349: VAR 'member' 'data' 'struct' '' 'logic [7:0]' '' '' -verilog/parser_sv.v:349: VAR 'member' 'memsig' 'module' '' 'struct' '' '' +verilog/parser_sv.v:349: VAR 'net' 'memsig' 'module' 'wire' 'struct' '' '' verilog/parser_sv.v:350: ENDMODULE 'endmodule' verilog/parser_sv.v:352: MODULE 'module' 'not_a_bug315' undef '0' verilog/parser_sv.v:353: VAR 'typedef' 'supply_net_t' 'module' '' 'int' '' '' @@ -1035,6 +1035,14 @@ verilog/parser_sv.v:417: PORT 'ifmp' 'module' '' '' '' '1' verilog/parser_sv.v:418: INSTANT 'if_bug777' 'ifmp' '' verilog/parser_sv.v:418: ENDCELL '' verilog/parser_sv.v:419: ENDMODULE 'endmodule' +verilog/parser_sv.v:421: MODULE 'module' 'bug_param_struct' undef '0' +verilog/parser_sv.v:422: VAR 'parameter' 'ROWS' 'module' '' 'int' '' '2' +verilog/parser_sv.v:422: PORT 'ROWS' 'module' '' 'int' '' '1' +verilog/parser_sv.v:423: VAR 'member' 'row_id' 'struct' '' 'logic [ROWS-1:0]' '' '' +verilog/parser_sv.v:423: VAR 'parameter' 'data_t' 'module' '' 'type' '' 'struct' +verilog/parser_sv.v:424: VAR 'port' 'd' 'module' '' 'data_t' '' '' +verilog/parser_sv.v:424: PORT 'd' 'module' 'input' 'data_t' '' '1' +verilog/parser_sv.v:425: ENDMODULE 'endmodule' verilog/parser_sv09.v:001: COMMENT '// 1800-2009 mantis1769' verilog/parser_sv09.v:002: MODULE 'module' 'mantis1769' undef '0' verilog/parser_sv09.v:002: VAR 'parameter' 'N' 'module' '' '' '' '1' diff --git a/t/35_sigparser.t b/t/35_sigparser.t index cdfab50..7063733 100755 --- a/t/35_sigparser.t +++ b/t/35_sigparser.t @@ -1,7 +1,7 @@ #!/usr/bin/perl -w # DESCRIPTION: Perl ExtUtils: Type 'make test' to test this package # -# Copyright 2000-2020 by Wilson Snyder. This program is free software; +# Copyright 2000-2024 by Wilson Snyder. This program is free software; # you can redistribute it and/or modify it under the terms of either the GNU # Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. diff --git a/t/35_sigparser_ps.out b/t/35_sigparser_ps.out index a64cd50..08440c1 100644 --- a/t/35_sigparser_ps.out +++ b/t/35_sigparser_ps.out @@ -990,7 +990,7 @@ verilog/parser_sv.v:348: VAR 'parameter' 'P1' 'module' '' 'logic [31:0]' '[3:0] verilog/parser_sv.v:348: COMMENT '// unpacked array' verilog/parser_sv.v:349: VAR 'member' 'ecc' 'struct' '' 'logic' '' '' verilog/parser_sv.v:349: VAR 'member' 'data' 'struct' '' 'logic [7:0]' '' '' -verilog/parser_sv.v:349: VAR 'member' 'memsig' 'module' '' 'struct' '' '' +verilog/parser_sv.v:349: VAR 'net' 'memsig' 'module' 'wire' 'struct' '' '' verilog/parser_sv.v:350: ENDMODULE 'endmodule' verilog/parser_sv.v:352: MODULE 'module' 'not_a_bug315' undef '0' verilog/parser_sv.v:353: VAR 'typedef' 'supply_net_t' 'module' '' 'int' '' '' @@ -1078,6 +1078,14 @@ verilog/parser_sv.v:417: PORT 'ifmp' 'module' '' '' '' '1' verilog/parser_sv.v:418: INSTANT 'if_bug777' 'ifmp' '' verilog/parser_sv.v:418: ENDCELL '' verilog/parser_sv.v:419: ENDMODULE 'endmodule' +verilog/parser_sv.v:421: MODULE 'module' 'bug_param_struct' undef '0' +verilog/parser_sv.v:422: VAR 'parameter' 'ROWS' 'module' '' 'int' '' '2' +verilog/parser_sv.v:422: PORT 'ROWS' 'module' '' 'int' '' '1' +verilog/parser_sv.v:423: VAR 'member' 'row_id' 'struct' '' 'logic [ROWS-1:0]' '' '' +verilog/parser_sv.v:423: VAR 'parameter' 'data_t' 'module' '' 'type' '' 'struct' +verilog/parser_sv.v:424: VAR 'port' 'd' 'module' '' 'data_t' '' '' +verilog/parser_sv.v:424: PORT 'd' 'module' 'input' 'data_t' '' '1' +verilog/parser_sv.v:425: ENDMODULE 'endmodule' verilog/parser_sv09.v:001: COMMENT '// 1800-2009 mantis1769' verilog/parser_sv09.v:002: MODULE 'module' 'mantis1769' undef '0' verilog/parser_sv09.v:002: VAR 'parameter' 'N' 'module' '' '' '' '1' diff --git a/t/36_sigmany.t b/t/36_sigmany.t index 683651a..96b407d 100755 --- a/t/36_sigmany.t +++ b/t/36_sigmany.t @@ -1,7 +1,7 @@ #!/usr/bin/perl -w # DESCRIPTION: Perl ExtUtils: Type 'make test' to test this package # -# Copyright 2000-2020 by Wilson Snyder. This program is free software; +# Copyright 2000-2024 by Wilson Snyder. This program is free software; # you can redistribute it and/or modify it under the terms of either the GNU # Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. ###################################################################### diff --git a/t/40_netlist.t b/t/40_netlist.t index ad11196..cc730f4 100755 --- a/t/40_netlist.t +++ b/t/40_netlist.t @@ -1,7 +1,7 @@ #!/usr/bin/perl -w # DESCRIPTION: Perl ExtUtils: Type 'make test' to test this package # -# Copyright 2000-2020 by Wilson Snyder. This program is free software; +# Copyright 2000-2024 by Wilson Snyder. This program is free software; # you can redistribute it and/or modify it under the terms of either the GNU # Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. diff --git a/t/41_example.t b/t/41_example.t index 87f8234..766ecc6 100755 --- a/t/41_example.t +++ b/t/41_example.t @@ -1,7 +1,7 @@ #!/usr/bin/perl -w # DESCRIPTION: Perl ExtUtils: Type 'make test' to test this package # -# Copyright 2000-2020 by Wilson Snyder. This program is free software; +# Copyright 2000-2024 by Wilson Snyder. This program is free software; # you can redistribute it and/or modify it under the terms of either the GNU # Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. diff --git a/t/42_dumpcheck.t b/t/42_dumpcheck.t index c05e8d2..3f85393 100755 --- a/t/42_dumpcheck.t +++ b/t/42_dumpcheck.t @@ -1,7 +1,7 @@ #!/usr/bin/perl -w # DESCRIPTION: Perl ExtUtils: Type 'make test' to test this package # -# Copyright 2000-2020 by Wilson Snyder. This program is free software; +# Copyright 2000-2024 by Wilson Snyder. This program is free software; # you can redistribute it and/or modify it under the terms of either the GNU # Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. diff --git a/t/43_storable.t b/t/43_storable.t index 2ff5fc8..b6d1903 100755 --- a/t/43_storable.t +++ b/t/43_storable.t @@ -1,7 +1,7 @@ #!/usr/bin/perl -w # DESCRIPTION: Perl ExtUtils: Type 'make test' to test this package # -# Copyright 2000-2020 by Wilson Snyder. This program is free software; +# Copyright 2000-2024 by Wilson Snyder. This program is free software; # you can redistribute it and/or modify it under the terms of either the GNU # Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. diff --git a/t/44_create.t b/t/44_create.t index d08e805..dd5ab6c 100755 --- a/t/44_create.t +++ b/t/44_create.t @@ -1,7 +1,7 @@ #!/usr/bin/perl -w # DESCRIPTION: Perl ExtUtils: Type 'make test' to test this package # -# Copyright 2000-2020 by Wilson Snyder. This program is free software; +# Copyright 2000-2024 by Wilson Snyder. This program is free software; # you can redistribute it and/or modify it under the terms of either the GNU # Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. diff --git a/t/46_link.t b/t/46_link.t index 9bd89b7..9668afb 100755 --- a/t/46_link.t +++ b/t/46_link.t @@ -1,7 +1,7 @@ #!/usr/bin/perl -w # DESCRIPTION: Perl ExtUtils: Type 'make test' to test this package # -# Copyright 2000-2020 by Wilson Snyder. This program is free software; +# Copyright 2000-2024 by Wilson Snyder. This program is free software; # you can redistribute it and/or modify it under the terms of either the GNU # Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. diff --git a/t/48_leak.t b/t/48_leak.t index 2808a93..de6f42a 100755 --- a/t/48_leak.t +++ b/t/48_leak.t @@ -1,7 +1,7 @@ #!/usr/bin/perl -w # DESCRIPTION: Perl ExtUtils: Type 'make test' to test this package # -# Copyright 2000-2020 by Wilson Snyder. This program is free software; +# Copyright 2000-2024 by Wilson Snyder. This program is free software; # you can redistribute it and/or modify it under the terms of either the GNU # Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. diff --git a/t/49_largeish.t b/t/49_largeish.t index 3a39bdd..4ef0270 100755 --- a/t/49_largeish.t +++ b/t/49_largeish.t @@ -1,7 +1,7 @@ #!/usr/bin/perl -w # DESCRIPTION: Perl ExtUtils: Type 'make test' to test this package # -# Copyright 2000-2020 by Wilson Snyder. This program is free software; +# Copyright 2000-2024 by Wilson Snyder. This program is free software; # you can redistribute it and/or modify it under the terms of either the GNU # Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. diff --git a/t/50_vrename.t b/t/50_vrename.t index 47b51c0..3da9013 100755 --- a/t/50_vrename.t +++ b/t/50_vrename.t @@ -1,7 +1,7 @@ #!/usr/bin/perl -w # DESCRIPTION: Perl ExtUtils: Type 'make test' to test this package # -# Copyright 2000-2020 by Wilson Snyder. This program is free software; +# Copyright 2000-2024 by Wilson Snyder. This program is free software; # you can redistribute it and/or modify it under the terms of either the GNU # Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. diff --git a/t/51_vrename_kwd.t b/t/51_vrename_kwd.t index 8d0a1fb..10fa64d 100755 --- a/t/51_vrename_kwd.t +++ b/t/51_vrename_kwd.t @@ -1,7 +1,7 @@ #!/usr/bin/perl -w # DESCRIPTION: Perl ExtUtils: Type 'make test' to test this package # -# Copyright 2000-2020 by Wilson Snyder. This program is free software; +# Copyright 2000-2024 by Wilson Snyder. This program is free software; # you can redistribute it and/or modify it under the terms of either the GNU # Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. diff --git a/t/56_editfiles.t b/t/56_editfiles.t index 881dd61..c776c38 100755 --- a/t/56_editfiles.t +++ b/t/56_editfiles.t @@ -1,7 +1,7 @@ #!/usr/bin/perl -w # DESCRIPTION: Perl ExtUtils: Type 'make test' to test this package # -# Copyright 2007-2020 by Wilson Snyder. This program is free software; +# Copyright 2007-2024 by Wilson Snyder. This program is free software; # you can redistribute it and/or modify it under the terms of either the GNU # Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. diff --git a/t/58_vsplitmodule.t b/t/58_vsplitmodule.t index 9534474..2729683 100755 --- a/t/58_vsplitmodule.t +++ b/t/58_vsplitmodule.t @@ -1,7 +1,7 @@ #!/usr/bin/perl -w # DESCRIPTION: Perl ExtUtils: Type 'make test' to test this package # -# Copyright 2000-2020 by Wilson Snyder. This program is free software; +# Copyright 2000-2024 by Wilson Snyder. This program is free software; # you can redistribute it and/or modify it under the terms of either the GNU # Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. diff --git a/t/60_vpassert.t b/t/60_vpassert.t index 141e1de..e3e159b 100755 --- a/t/60_vpassert.t +++ b/t/60_vpassert.t @@ -1,7 +1,7 @@ #!/usr/bin/perl -w # DESCRIPTION: Perl ExtUtils: Type 'make test' to test this package # -# Copyright 2000-2020 by Wilson Snyder. This program is free software; +# Copyright 2000-2024 by Wilson Snyder. This program is free software; # you can redistribute it and/or modify it under the terms of either the GNU # Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. diff --git a/t/80_vppreproc.t b/t/80_vppreproc.t index 7315940..b805d0d 100755 --- a/t/80_vppreproc.t +++ b/t/80_vppreproc.t @@ -1,7 +1,7 @@ #!/usr/bin/perl -w # DESCRIPTION: Perl ExtUtils: Type 'make test' to test this package # -# Copyright 2000-2020 by Wilson Snyder. This program is free software; +# Copyright 2000-2024 by Wilson Snyder. This program is free software; # you can redistribute it and/or modify it under the terms of either the GNU # Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. diff --git a/t/85_vhier.t b/t/85_vhier.t index 4b849e4..176461b 100755 --- a/t/85_vhier.t +++ b/t/85_vhier.t @@ -1,7 +1,7 @@ #!/usr/bin/perl -w # DESCRIPTION: Perl ExtUtils: Type 'make test' to test this package # -# Copyright 2000-2020 by Wilson Snyder. This program is free software; +# Copyright 2000-2024 by Wilson Snyder. This program is free software; # you can redistribute it and/or modify it under the terms of either the GNU # Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. diff --git a/t/86_vhier_tick.t b/t/86_vhier_tick.t index 1766a3f..9d55812 100755 --- a/t/86_vhier_tick.t +++ b/t/86_vhier_tick.t @@ -1,7 +1,7 @@ #!/usr/bin/perl -w # DESCRIPTION: Perl ExtUtils: Type 'make test' to test this package # -# Copyright 2000-2020 by Wilson Snyder. This program is free software; +# Copyright 2000-2024 by Wilson Snyder. This program is free software; # you can redistribute it and/or modify it under the terms of either the GNU # Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. diff --git a/t/87_vhier_unicode.t b/t/87_vhier_unicode.t index e5c3120..dc49e76 100755 --- a/t/87_vhier_unicode.t +++ b/t/87_vhier_unicode.t @@ -1,7 +1,7 @@ #!/usr/bin/perl -w # DESCRIPTION: Perl ExtUtils: Type 'make test' to test this package # -# Copyright 2000-2020 by Wilson Snyder. This program is free software; +# Copyright 2000-2024 by Wilson Snyder. This program is free software; # you can redistribute it and/or modify it under the terms of either the GNU # Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. diff --git a/t/test_utils.pl b/t/test_utils.pl index b2296ec..56aefa4 100644 --- a/t/test_utils.pl +++ b/t/test_utils.pl @@ -1,6 +1,6 @@ # DESCRIPTION: Perl ExtUtils: Common routines required by package tests # -# Copyright 2000-2020 by Wilson Snyder. This program is free software; +# Copyright 2000-2024 by Wilson Snyder. This program is free software; # you can redistribute it and/or modify it under the terms of either the GNU # Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. diff --git a/verilog/parser_sv.v b/verilog/parser_sv.v index 01cf875..f44d696 100644 --- a/verilog/parser_sv.v +++ b/verilog/parser_sv.v @@ -417,3 +417,9 @@ endmodule module bug868 (ifmp); if_bug777.master ifmp; endmodule + +module bug_param_struct + #(int ROWS = 2, + type data_t = struct packed { logic [ROWS-1:0] row_id; }) + (input data_t d); +endmodule diff --git a/verilog/test.vrename b/verilog/test.vrename index d948eda..3d8d1bb 100644 --- a/verilog/test.vrename +++ b/verilog/test.vrename @@ -1,6 +1,6 @@ # DESCRIPTION: vrename: For test.pl testing of vrename # -# Copyright 2000-2020 by Wilson Snyder. This program is free software; +# Copyright 2000-2024 by Wilson Snyder. This program is free software; # you can redistribute it and/or modify it under the terms of either the GNU # Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. ###################################################################### diff --git a/vhier b/vhier index 3af7772..a1b3d3c 100755 --- a/vhier +++ b/vhier @@ -17,7 +17,7 @@ use Verilog::Getopt; use strict; use vars qw($Debug $VERSION); -$VERSION = '3.475'; +$VERSION = '3.483'; ###################################################################### # main @@ -63,7 +63,7 @@ if (! GetOptions ( "input-files!" => \$Opt_InFiles, "resolve-files!" => \$Opt_ResolveFiles, "skiplist=s" => \$opt_skiplist, - "sv!" => sub { shift; Verilog::Language::language_standard("1800-2017"); }, + "sv!" => sub { shift; Verilog::Language::language_standard("1800-2023"); }, "language=s" => sub { shift; Verilog::Language::language_standard(shift); }, "missing!" => \$Opt_Missing, "missing-modules!" => \$Opt_Missing_Modules, @@ -468,7 +468,7 @@ example module I is referenced, look in I.I. =item -sv Specifies SystemVerilog language features should be enabled; equivalent to -"--language 1800-2017". This option is selected by default, it exists for +"--language 1800-2023". This option is selected by default, it exists for compatibility with other simulators. =item -y I @@ -513,7 +513,7 @@ necessary to resolve it into an absolute path for further processing. With --cells or --forest, show module instance names. -=item --language <1364-1995|1364-2001|1364-2005|1800-2005|1800-2009|1800-2012|1800-2017> +=item --language <1364-1995|1364-2001|1364-2005|1800-2005|1800-2009|1800-2012|1800-2017|1800-2023> Set the language standard for the files. This determines which tokens are signals versus keywords, such as the ever-common "do" (data-out signal, @@ -587,7 +587,7 @@ Verilog-Perl is part of the L free Verilog EDA software tool suite. The latest version is available from CPAN and from L. -Copyright 2005-2020 by Wilson Snyder. This package is free software; you +Copyright 2005-2024 by Wilson Snyder. This package is free software; you can redistribute it and/or modify it under the terms of either the GNU Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. diff --git a/vpassert b/vpassert index 7e5c212..fd8bde3 100755 --- a/vpassert +++ b/vpassert @@ -36,7 +36,7 @@ use vars qw ($VERSION $Debug $Opt %Vpassert_Conversions %Files %Files_Read %File_Dest ); -$VERSION = '3.475'; +$VERSION = '3.483'; ###################################################################### # configuration @@ -1495,7 +1495,7 @@ Exclude processing any files which begin with the specified prefix. Displays this message and program version and exits. -=item --language <1364-1995|1364-2001|1364-2005|1800-2005|1800-2009|1800-2012|1800-2017> +=item --language <1364-1995|1364-2001|1364-2005|1800-2005|1800-2009|1800-2012|1800-2017|1800-2023> Set the language standard for the files. This determines which tokens are signals versus keywords, such as the ever-common "do" (data-out signal, @@ -1687,7 +1687,7 @@ Verilog-Perl is part of the L free Verilog EDA software tool suite. The latest version is available from CPAN and from L. -Copyright 2000-2020 by Wilson Snyder. This package is free software; you +Copyright 2000-2024 by Wilson Snyder. This package is free software; you can redistribute it and/or modify it under the terms of either the GNU Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. diff --git a/vppreproc b/vppreproc index c1cfc6b..115f195 100755 --- a/vppreproc +++ b/vppreproc @@ -16,7 +16,7 @@ use Verilog::Getopt; use strict; use vars qw($Debug $VERSION); -$VERSION = '3.475'; +$VERSION = '3.483'; ###################################################################### # main @@ -276,7 +276,7 @@ Verilog-Perl is part of the L free Verilog EDA software tool suite. The latest version is available from CPAN and from L. -Copyright 2000-2020 by Wilson Snyder. This package is free software; you +Copyright 2000-2024 by Wilson Snyder. This package is free software; you can redistribute it and/or modify it under the terms of either the GNU Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. diff --git a/vrename b/vrename index afcfa51..1857b9b 100755 --- a/vrename +++ b/vrename @@ -23,7 +23,7 @@ use vars qw($VERSION %Vrename_Dont_Crypt %Vrename_Left_Edge_Define $Debug $Opt_Xref $Opt_Crypt $Opt_Crypt_All $Opt_Write $Opt_Keywords @Files); -$VERSION = '3.475'; +$VERSION = '3.483'; ###################################################################### @@ -451,7 +451,7 @@ sub verilog_change_sig { $hit = 1 if $filestrg =~ s/$sig_quoted(?=[ \t\n\r])/$magic/g; } else { # Unescaped my $sig_quoted = quotemeta $signs; - $hit = 1 if $filestrg =~ s/([^a-zA-Z0-9_\$\%\'\\])$sig_quoted(?=[^a-zA-Z0-9_])/$1$magic/g; + $hit = 1 if $filestrg =~ s/([^a-zA-Z0-9_\$\'\\])$sig_quoted(?=[^a-zA-Z0-9_])/$1$magic/g; # Consume leading \; either getting removed or part of replacement $hit = 1 if $filestrg =~ s/(\\)$sig_quoted(?=[ \t\n\r])/$magic/g; } @@ -677,7 +677,7 @@ changing a keyword will probably result in unrunnable code, however, occasionally it may be necessary to rename signals which happen to match the name of keywords recently added to the language (such as 'bit'). -=item --language <1364-1995|1364-2001|1364-2005|1800-2005|1800-2009|1800-2012|1800-2017> +=item --language <1364-1995|1364-2001|1364-2005|1800-2005|1800-2009|1800-2012|1800-2017|1800-2023> Set the language standard for the files. This determines which tokens are signals versus keywords, such as the ever-common "do" (data-out signal, @@ -714,7 +714,7 @@ Verilog-Perl is part of the L free Verilog EDA software tool suite. The latest version is available from CPAN and from L. -Copyright 2000-2020 by Wilson Snyder. This package is free software; you +Copyright 2000-2024 by Wilson Snyder. This package is free software; you can redistribute it and/or modify it under the terms of either the GNU Lesser General Public License Version 3 or the Perl Artistic License Version 2.0.