Extended tracing in units and python

This commit is contained in:
Eyck Jentzsch 2019-01-06 15:26:13 +01:00
parent f78c4d89d0
commit 117b0e4375
9 changed files with 23 additions and 13 deletions

View File

@ -12,7 +12,7 @@
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactName="${ProjName}" buildProperties="" description="" id="cdt.managedbuild.toolchain.gnu.base.1318364290" name="Debug" optionalBuildProperties="org.eclipse.cdt.docker.launcher.containerbuild.property.volumes=,org.eclipse.cdt.docker.launcher.containerbuild.property.selectedvolumes=" parent="org.eclipse.cdt.build.core.emptycfg">
<configuration artifactName="${ProjName}" buildProperties="" description="" id="cdt.managedbuild.toolchain.gnu.base.1318364290" name="Debug" optionalBuildProperties="org.eclipse.cdt.docker.launcher.containerbuild.property.selectedvolumes=,org.eclipse.cdt.docker.launcher.containerbuild.property.volumes=" parent="org.eclipse.cdt.build.core.emptycfg">
<folderInfo id="cdt.managedbuild.toolchain.gnu.base.1318364290.1772265551" name="/" resourcePath="">
<toolChain id="cdt.managedbuild.toolchain.gnu.base.23298673" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.base">
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.GNU_ELF" id="cdt.managedbuild.target.gnu.platform.base.155199250" name="Debug Platform" osList="linux,hpux,aix,qnx" superClass="cdt.managedbuild.target.gnu.platform.base"/>
@ -66,7 +66,7 @@
<folderInfo id="cdt.managedbuild.toolchain.gnu.base.1318364290.125067248." name="/" resourcePath="">
<toolChain id="cdt.managedbuild.toolchain.gnu.base.1937159319" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.base">
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.GNU_ELF" id="cdt.managedbuild.target.gnu.platform.base.2099590281" name="Debug Platform" osList="linux,hpux,aix,qnx" superClass="cdt.managedbuild.target.gnu.platform.base"/>
<builder id="de.marw.cdt.cmake.core.genscriptbuilder.1942834753" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="CMake Builder (portable)" parallelBuildOn="false" superClass="de.marw.cdt.cmake.core.genscriptbuilder"/>
<builder buildPath="/PySysC-SC/build/Release" id="de.marw.cdt.cmake.core.genscriptbuilder.1942834753" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="CMake Builder (portable)" parallelBuildOn="false" superClass="de.marw.cdt.cmake.core.genscriptbuilder"/>
<tool id="cdt.managedbuild.tool.gnu.archiver.base.1557460296" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.base.1166559926" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.base">
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1168647341" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
@ -105,6 +105,7 @@
<configuration configurationName="Debug">
<resource resourceType="PROJECT" workspacePath="/PySC"/>
</configuration>
<configuration configurationName="Release"/>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
<storageModule moduleId="scannerConfiguration">

View File

@ -4,14 +4,14 @@
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuildCommandParser" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser" keep-relative-paths="false" name="CDT GCC Build Output Parser" parameter="(g?cc)|([gc]\+\+)|(clang)" prefer-non-shared="true"/>
<provider copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/>
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="90396921960217303" id="org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="de.marw.cmake.cdt.language.settings.providers.BuiltinsCompileCommandsJsonParser" ref="shared-provider"/>
<provider-reference id="de.marw.cmake.cdt.language.settings.providers.CompileCommandsJsonParser" ref="shared-provider"/>
<provider class="de.marw.cmake.cdt.language.settings.providers.BuiltinsCompileCommandsJsonParser" id="de.marw.cmake.cdt.language.settings.providers.BuiltinsCompileCommandsJsonParser" name="CMAKE_EXPORT_COMPILE_COMMANDS Compiler Built-ins" store-entries-with-project="true"/>
<provider class="de.marw.cmake.cdt.language.settings.providers.CompileCommandsJsonParser" id="de.marw.cmake.cdt.language.settings.providers.CompileCommandsJsonParser" name="CMAKE_EXPORT_COMPILE_COMMANDS Parser" store-entries-with-project="true"/>
</extension>
</configuration>
<configuration id="cdt.managedbuild.toolchain.gnu.base.1318364290.125067248" name="Release">

View File

@ -48,13 +48,12 @@ endif()
setup_conan()
# This line finds the boost lib and headers.
set(Boost_NO_BOOST_CMAKE ON) # Don't do a find_package in config mode before searching for a regular boost install.
find_package(Boost COMPONENTS program_options filesystem system thread REQUIRED)
#set(Boost_NO_BOOST_CMAKE ON) # Don't do a find_package in config mode before searching for a regular boost install.
#find_package(Boost COMPONENTS program_options filesystem system thread REQUIRED)
# set-up SystemC and SCV
find_package(SystemC)
if(SystemC_FOUND)
add_definitions(-DWITH_SYSTEMC)
include_directories(${SystemC_INCLUDE_DIRS})
link_directories(${SystemC_LIBRARY_DIRS})
else()

View File

@ -18,6 +18,6 @@ ClkGen::~ClkGen() {
// TODO Auto-generated destructor stub
}
void ClkGen::end_of_elabortation() {
void ClkGen::end_of_elaboration() {
clk_o.write(10_ns);
}

View File

@ -17,7 +17,7 @@ public:
ClkGen(const sc_core::sc_module_name&);
virtual ~ClkGen();
protected:
void end_of_elabortation();
void end_of_elaboration() override;
};
#endif /* COMPONENTS_CLKGEN_H_ */

View File

@ -8,7 +8,7 @@ using namespace std;
#include "tlm.h"
#include "tlm_utils/simple_initiator_socket.h"
#include <scc/utilities.h>
// Initiator module generating generic payload transactions
@ -34,6 +34,10 @@ struct Initiator: sc_module
bool dmi_ptr_valid;
tlm::tlm_dmi dmi_data;
void trace(sc_core::sc_trace_file* trf) const override {
TRACE_VAR(trf, dmi_ptr_valid);
}
};
#endif

View File

@ -24,6 +24,7 @@ pysysc.add_library('components.h', os.path.join(myDir, 'build/%s/lib/libcomponen
###############################################################################
cpp.scc.init_logging(cpp.logging.INFO, False);
cpp.sc_core.sc_report_handler.set_actions(cpp.sc_core.SC_ID_MORE_THAN_ONE_SIGNAL_DRIVER_, cpp.sc_core.SC_DO_NOTHING);
cpp.scc.init_cci("GlobalBroker")
###############################################################################
# instantiate
###############################################################################
@ -34,7 +35,7 @@ memories = [cpp.Memory(cpp.sc_core.sc_module_name(name)) for name in ["mem0", "m
router = cpp.Router[4](cpp.sc_core.sc_module_name("router"))
###############################################################################
# signals
##################sS#############################################################
###############################################################################
sig_clk = cpp.sc_core.sc_signal[cpp.sc_core.sc_time]("clk")
sig_rst = cpp.sc_core.sc_signal[cpp.sc_dt.sc_logic]("rst")
###############################################################################
@ -55,5 +56,9 @@ for idx,m in enumerate(memories):
# run if it is standalone
###############################################################################
if __name__ == "__main__":
if os.path.isfile('router_example.json'):
cfg = cpp.scc.configurer(cpp.std.string('router_example.json'));
trace = cpp.scc.configurable_tracer("router_example", 1, True, True)
trace.add_control()
cpp.sc_core.sc_start()
logging.debug("Done")

View File

@ -46,5 +46,6 @@ Connection().src(initiator.socket).sink(router.target_socket)
# run if it is standalone
###############################################################################
if __name__ == "__main__":
Simulation.configure(enable_vcd=True)
Simulation.run()
logging.debug("Done")

@ -1 +1 @@
Subproject commit a066d508a097fdd7134aeecbe72fdbabaae0aff3
Subproject commit 3419e182354b400d397c3f62b8b47383249dd1d0