diff --git a/Changes b/Changes index 7cb2dbf60..4b04c67b8 100644 --- a/Changes +++ b/Changes @@ -3,6 +3,11 @@ Revision history for Verilator The contributors that suggested a given feature are shown in []. [by ...] indicates the contributor was also the author of the fix; Thanks! +* Verilator 3.848 devel + +**** Fix arrayed input compile error, bug645. [Krzysztof Jankowski] + + * Verilator 3.847 2013-05-11 *** Add ALWCOMBORDER warning. [KC Buckenmaier] diff --git a/src/V3EmitC.cpp b/src/V3EmitC.cpp index 1c37b4289..f763ce446 100644 --- a/src/V3EmitC.cpp +++ b/src/V3EmitC.cpp @@ -906,12 +906,12 @@ void EmitCStmts::emitVarDecl(AstVar* nodep, const string& prefixIfImp) { else if (nodep->isOutput()) puts("VL_OUT"); else nodep->v3fatalSrc("Unknown type"); - if (nodep->isQuad()) puts("64"); - else if (nodep->widthMin() <= 8) puts("8"); - else if (nodep->widthMin() <= 16) puts("16"); + if (basicp->isQuad()) puts("64"); + else if (basicp->widthMin() <= 8) puts("8"); + else if (basicp->widthMin() <= 16) puts("16"); + else if (basicp->isWide()) puts("W"); if (isArray) { - if (nodep->isWide()) puts("W"); puts("("+nodep->name()); for (AstUnpackArrayDType* arrayp=nodep->dtypeSkipRefp()->castUnpackArrayDType(); arrayp; arrayp = arrayp->subDTypep()->skipRefp()->castUnpackArrayDType()) { @@ -924,7 +924,7 @@ void EmitCStmts::emitVarDecl(AstVar* nodep, const string& prefixIfImp) { puts("("+nodep->name() +","+cvtToStr(basicp->msb()) +","+cvtToStr(basicp->lsb())); - else puts("W("+nodep->name() + else puts("("+nodep->name() +","+cvtToStr(basicp->msb()) +","+cvtToStr(basicp->lsb()) +","+cvtToStr(basicp->widthWords())); diff --git a/test_regress/t/t_mem_multi_io2_cc.pl b/test_regress/t/t_mem_multi_io2_cc.pl index 7433eb85b..c5708fba8 100755 --- a/test_regress/t/t_mem_multi_io2_cc.pl +++ b/test_regress/t/t_mem_multi_io2_cc.pl @@ -14,7 +14,7 @@ $Self->{vlt} or $Self->skip("Verilator only test"); compile ( make_top_shell => 0, make_main => 0, - verilator_flags2 => ["--exe $Self->{t_dir}/t_mem_multi_io2.cpp"], + verilator_flags2 => ["--exe $Self->{t_dir}/t_mem_multi_io2.cpp -Oi"], ); execute ( diff --git a/test_regress/t/t_mem_multi_io2_sc.pl b/test_regress/t/t_mem_multi_io2_sc.pl index a2693e658..24a2f0b76 100755 --- a/test_regress/t/t_mem_multi_io2_sc.pl +++ b/test_regress/t/t_mem_multi_io2_sc.pl @@ -14,7 +14,7 @@ $Self->{vlt} or $Self->skip("Verilator only test"); compile ( make_top_shell => 0, make_main => 0, - verilator_flags2 => ["--exe $Self->{t_dir}/t_mem_multi_io2.cpp --sc"], + verilator_flags2 => ["--exe $Self->{t_dir}/t_mem_multi_io2.cpp --sc -Oi"], ); execute (