diff --git a/.vscode/launch.json b/.vscode/launch.json index 0e8969e..57bd73b 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -13,6 +13,15 @@ "SCC_TEST_VERBOSE": "7" } }, + { + "type": "gdb", + "request": "launch", + "name": "cci-example", + "program": "${workspaceFolder}/build/Debug/tests/configuration/cci-example", + "environment": { + "SCC_TEST_VERBOSE": "7" + } + }, { "name": "cppdbg quantum_keeper_mt", "type": "cppdbg", diff --git a/tests/configuration/top_module.h b/tests/configuration/top_module.h index dbe5424..35a8efb 100644 --- a/tests/configuration/top_module.h +++ b/tests/configuration/top_module.h @@ -38,6 +38,7 @@ #include #include +#include "cci/core/cci_value.h" #include "initiator.h" #include "router.h" #include "target.h" @@ -114,7 +115,9 @@ public: auto paramName0 = fmt::format("{}.{}.initiator_ID", name(), targetName); auto quotedTargetName = fmt::format("\"target_{}\"", i); - m_broker.set_preset_cci_value(paramName0, cci::cci_value::from_json(targetName)); + cci::cci_value v; + v.set(targetName); + m_broker.set_preset_cci_value(paramName0, v); // Set preset value for maximum target size(memory) auto paramName1 = fmt::format("{}.{}.initiator_ID", name(), targetName); @@ -141,7 +144,7 @@ public: SCCINFO(SCMOD) << "[TOP_MODULE C_TOR] : Re-setting fields of target_" << i; m_broker.set_preset_cci_value(targetName, cci::cci_value::from_json(ss.str())); } catch(sc_core::sc_report const& exception) { - SCCINFO(SCMOD) << "[ROUTER : Caught] : " << exception.what(); + SCCINFO(SCMOD) << "[ROUTER : Caught] : " << exception.what() << " (expected)"; } targetName = fmt::format("{}.RouterInstance.r_sa_{}", name(), i);