From 79c8750fc5128229a8c2d3b075dcb823fa66ffce Mon Sep 17 00:00:00 2001 From: Michael Reese Date: Mon, 11 Mar 2024 20:38:12 +0100 Subject: [PATCH] make ports >64 bit run with older verilator versions --- gvi.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gvi.cpp b/gvi.cpp index 4e94bf5..f8f0c11 100644 --- a/gvi.cpp +++ b/gvi.cpp @@ -685,7 +685,7 @@ std::string cpp_verilator_interface_function_definition_in(const std::string &mo } } else { // port.bitsize > 64 for (int part = parts-1; part >= 0; --part) { - out << "\t\t" << modulename << "_top_instances[idx]->" << port.name_orig << ".at(" << part << ") = " << gen_mask(bitsize) << " & (unsigned)" << port.name << "_gvi_lw" << part << ";" << std::endl; + out << "\t\t" << modulename << "_top_instances[idx]->" << port.name_orig << "[" << part << "] = " << gen_mask(bitsize) << " & (unsigned)" << port.name << "_gvi_lw" << part << ";" << std::endl; bitsize = 32; } } @@ -708,7 +708,7 @@ std::string cpp_verilator_interface_function_definition_out(const std::string &m if (port.bitsize <= 64) { out << "\t\treturn " << modulename << "_top_instances[idx]->" << port.name_orig << " >> " << part*32 << ";" << std::endl; } else { - out << "\t\treturn " << modulename << "_top_instances[idx]->" << port.name_orig << ".at(" << part << ");" << std::endl; + out << "\t\treturn " << modulename << "_top_instances[idx]->" << port.name_orig << "[" << part << "];" << std::endl; } out << "\t}" << std::endl; }