@@ -59,11 +59,13 @@ void SvStruct::toCpp(HppFile& hppFile, const std::string_view _namespace, const
5959 // ** GENERATE START AND WIDTH OF EACH SIGNAL **//
6060 size_t startBit = 0 ;
6161 for (const auto & [name, type] : members) {
62- hppFile.addWithIndent (fmt::format (" static constexpr size_t {}_s = {};\n " , name, startBit));
63- hppFile.addWithIndent (fmt::format (" static constexpr size_t {}_w = {};\n " , name, type.size ));
62+ hppFile.addWithIndent (
63+ fmt::format (" static constexpr std::size_t {}_s = {};\n " , name, startBit));
64+ hppFile.addWithIndent (
65+ fmt::format (" static constexpr std::size_t {}_w = {};\n " , name, type.size ));
6466 startBit += type.size ;
6567 }
66- hppFile.addWithIndent (fmt::format (" static constexpr size_t _size = {};\n " , structSize));
68+ hppFile.addWithIndent (fmt::format (" static constexpr std:: size_t _size = {};\n " , structSize));
6769 hppFile.add (" \n " );
6870
6971 // ** GENERATE DEFAULT CONSTRUCTOR **//
@@ -120,8 +122,8 @@ void SvStruct::toCpp(HppFile& hppFile, const std::string_view _namespace, const
120122 // Note: This constructor will be generated only if the other constructor is not already from a
121123 // sc_bv
122124 if (!noSystemC && structSize <= 64 ) {
123- hppFile.addWithIndent (
124- fmt::format ( " {}(const sc_bv<{}>& __data) {{ \n " , structName, type.getBitstreamWidth ()));
125+ hppFile.addWithIndent (fmt::format ( " {}(const sc_dt::sc_bv<{}>& __data) {{ \n " , structName,
126+ type.getBitstreamWidth ()));
125127
126128 hppFile.increaseIndent ();
127129
@@ -159,7 +161,7 @@ void SvStruct::toCpp(HppFile& hppFile, const std::string_view _namespace, const
159161 else {
160162 hppFile.addWithIndent (fmt::format (" ret.range({0}_s + {0}_w - 1, {0}_s) = " , name));
161163 if (type.isStructEnumOrUnion () && type.size > 64 )
162- hppFile.add (fmt::format (" sc_bv<{}>({});\n " , type.size , name));
164+ hppFile.add (fmt::format (" sc_dt:: sc_bv<{}>({});\n " , type.size , name));
163165 else
164166 hppFile.add (fmt::format (" {};\n " , name));
165167 }
@@ -183,15 +185,15 @@ void SvStruct::toCpp(HppFile& hppFile, const std::string_view _namespace, const
183185 if (!noSystemC && cppType != CppType::SC_BV) {
184186 hppFile.addWithIndent (fmt::format (" operator sc_bv<{}>() const {{\n " , structSize));
185187 hppFile.increaseIndent ();
186- hppFile.addWithIndent (fmt::format (" auto ret = sc_bv<{}>();\n " , structSize));
188+ hppFile.addWithIndent (fmt::format (" auto ret = sc_dt:: sc_bv<{}>();\n " , structSize));
187189 for (const auto & [name, type] : members) {
188190 if (type.cppType == CppType::BOOL) {
189191 hppFile.addWithIndent (fmt::format (" ret.set_bit({0}_s, {0});\n " , name));
190192 }
191193 else {
192194 hppFile.addWithIndent (fmt::format (" ret.range({0}_s + {0}_w - 1, {0}_s) = " , name));
193195 if (type.isStructEnumOrUnion () && type.size > 64 )
194- hppFile.add (fmt::format (" sc_bv<{}>({});\n " , type.size , name));
196+ hppFile.add (fmt::format (" sc_dt:: sc_bv<{}>({});\n " , type.size , name));
195197 else
196198 hppFile.add (fmt::format (" {};\n " , name));
197199 }
0 commit comments