diff --git a/include/verilated.h b/include/verilated.h index bdd8e1bfd..1a8e20896 100644 --- a/include/verilated.h +++ b/include/verilated.h @@ -42,14 +42,15 @@ using namespace std; //========================================================================= // Basic types +// P // Packed data of bit type (C/S/I/Q/W) typedef vluint8_t CData; ///< Verilated pack data, 1-8 bits typedef vluint16_t SData; ///< Verilated pack data, 9-16 bits typedef vluint32_t IData; ///< Verilated pack data, 17-32 bits typedef vluint64_t QData; ///< Verilated pack data, 33-64 bits typedef vluint32_t WData; ///< Verilated pack data, >64 bits, as an array // float F // No typedef needed; Verilator uses float -// double G // No typedef needed; Verilator uses double -// string N // No typedef needed; Verilator uses double +// double D // No typedef needed; Verilator uses double +// string N // No typedef needed; Verilator uses string typedef const WData* WDataInP; ///< Array input to a function typedef WData* WDataOutP; ///< Array output from a function diff --git a/src/V3EmitC.cpp b/src/V3EmitC.cpp index 97974e212..980a19a8d 100644 --- a/src/V3EmitC.cpp +++ b/src/V3EmitC.cpp @@ -74,7 +74,7 @@ public: void emitVarCtors(); bool emitSimpleOk(AstNodeMath* nodep); void emitIQW(AstNode* nodep) { - // Other abbrevs: "C"har, "S"hort, "F"loat, "G"double, stri"N"g + // Other abbrevs: "C"har, "S"hort, "F"loat, "D"ouble, stri"N"g puts (nodep->isWide()?"W":(nodep->isQuad()?"Q":"I")); } void emitScIQW(AstVar* nodep) { diff --git a/test_regress/t/t_dist_uint.pl b/test_regress/t/t_dist_uint.pl index cb50a0268..c88bf9179 100755 --- a/test_regress/t/t_dist_uint.pl +++ b/test_regress/t/t_dist_uint.pl @@ -18,17 +18,21 @@ if (!-r "$root/.git") { ### Must trim output before and after our file list #my $files = "*/*.c* */*.h test_regress/t/*.c* test_regress/t/*.h"; # src isn't clean, and probably doesn't need to be (yet?) - my $files = "include/*.c* include/*.h test_c/*.c* test_c/*.h test_regress/t/*.c* test_regress/t/*.h"; + my $files = "include/*.c* include/*.h test_c/*.c* test_regress/t/*.c* test_regress/t/*.h"; my $cmd = "cd $root && fgrep -n int $files | sort"; print "C $cmd\n"; my $grep = `$cmd`; my %names; foreach my $line (split /\n/, $grep) { - next if $line !~ /uint\d+_t/; + $line =~ s!//.*$!!; + next if $line !~ /uint\d+_t\b/; next if $line =~ /vl[su]int\d+_t/; next if $line =~ /typedef/; next if $line =~ m!include/svdpi.h!; # Not ours - $names{$1} = 1 if $line =~ /^([^:]+)/; + if ($line =~ /^([^:]+)/) { + $names{$1} = 1; + print $line; + } } if (keys %names) { $Self->error("Files with uint32*_t instead of vluint32s: ",join(' ',sort keys %names)); diff --git a/test_regress/t/t_dpi_import.v b/test_regress/t/t_dpi_import.v index 92de40909..e57488d37 100644 --- a/test_regress/t/t_dpi_import.v +++ b/test_regress/t/t_dpi_import.v @@ -88,7 +88,7 @@ module t (); chandle i_c, o_c; `ifndef VERILATOR string i_n, o_n; - real i_g, o_g; + real i_d, o_d; `endif `ifndef NO_SHORTREAL shortreal i_f, o_f; @@ -136,7 +136,7 @@ module t (); if (dpii_f_chandle (i_c) !== i_c) $stop; `ifndef VERILATOR if (dpii_f_string (i_n) != i_n) $stop; - if (dpii_f_real (i_g) != i_g+1.5) $stop; + if (dpii_f_real (i_d) != i_d+1.5) $stop; `endif `ifndef NO_SHORTREAL if (dpii_f_shortreal(i_f) != i_f+1.5) $stop; @@ -152,7 +152,7 @@ module t (); `ifndef VCS // Strange link error dpii_v_string (i_n,o_n); if (o_n != i_n) $stop; `endif - dpii_v_real (i_g,o_g); if (o_g != i_g+1.5) $stop; + dpii_v_real (i_d,o_d); if (o_d != i_d+1.5) $stop; `endif `ifndef NO_SHORTREAL dpii_v_shortreal(i_f,o_f); if (o_f != i_f+1.5) $stop;