Jump to content

SystemC CCI Build Issues


Recommended Posts

Hi,

I tried using the SystemC CCI draft release.(cci-0.9.0_pub_rev_20171219.tgz)

Currently the following examples fail to compile:

  • ex07_Parameter_Information
  • ex16_User_Defined_Data_Type

Please find the failure logs attached.

I have also noticed that the CCI source contains systemc.h (src/cci_core/systemc.h)header file, from a cursory look it looks as if a wrapper around the header file (systemc) from SystemC library.

Would it cause build issues when using SystemC CCI with legacy models which includes the systemc.h header file?

Thanks and Regards,

Ameya Vikram Singh

verifyLogs.tar.xz

Link to comment
Share on other sites

Hi Ameya,

thanks for the feedback!  Can you please provide the following details:

  • Platform (Cygwin?)
  • GCC version used
  • Logs of verify.pl with -v enabled (to see the full command-lines)

The file cci_core/systemc.h is an internal header which is only included through this path.  A conflict could only occur, should you add cci_core/ directly to the compiler include path (which is not supported), or if you'd install SystemC below cci_core/ (which would be very weird ;-)).  

The errors in ex07_Parameter_Information indeed look like the SystemC installation is not correctly resolved.  For this, the full command-lines would really help.

The error in ex16_User_Defined_Data_Type is indeed a bug (at least before C++14(?)).  The fix is to explicitly open the cci namespace around the cci_value_converter specialization in ex16_user_datatype.h.

Hope that helps and thanks again,
  Philipp

Link to comment
Share on other sites

Hello @Philipp A Hartmann,

Following is my testing development environment:

  • Platform: Cygwin 64-Bit
  • GCC Version: 6.4.0-5

And I have attached the verbose logs for build.

I tried your suggestions for wrapping the specialization of the cci_value_converter class with the CCI namespace in the ex16_User_Defined_Data_Type and it seems to fix the issue.

Also for the ex07_Parameter_Information example the following patch fixes the issue currently on Cygwin 64-bit.

diff --git a/examples/ex07_Parameter_Information/ex07_Parameter_Information.cpp b/examples/ex07_Parameter_Information/ex07_Parameter_Information.cpp
index 1326be0..46fa307 100644
--- a/examples/ex07_Parameter_Information/ex07_Parameter_Information.cpp
+++ b/examples/ex07_Parameter_Information/ex07_Parameter_Information.cpp
@@ -106,7 +106,7 @@ int sc_main(int sc_argc, char* sc_argv[]) {
   ex07_observer observer_class("observer");
 
   // Simulation time
-  sc_core::sc_start(30.0, sc_core::SC_NS);
+  ::sc_core::sc_start(30.0, sc_core::SC_NS);
 
   return EXIT_SUCCESS;
 }  // End of sc_main
diff --git a/examples/ex16_User_Defined_Data_Type/ex16_user_datatype.h b/examples/ex16_User_Defined_Data_Type/ex16_user_datatype.h
index 471fe41..6ec2cc8 100644
--- a/examples/ex16_User_Defined_Data_Type/ex16_user_datatype.h
+++ b/examples/ex16_User_Defined_Data_Type/ex16_user_datatype.h
@@ -76,8 +76,9 @@ struct route_table_ut {
 };
 
 // add support for cci_value and JSON (de)serialization
+CCI_OPEN_NAMESPACE_
 template<>
-struct cci::cci_value_converter< route_table_ut >
+struct cci_value_converter< route_table_ut >
 {
   typedef route_table_ut type;
   static bool pack( cci_value::reference dst, type const & src )
@@ -105,6 +106,7 @@ struct cci::cci_value_converter< route_table_ut >
     return false;
   }
 };
+CCI_CLOSE_NAMESPACE_
 
 // Overload stream insertion operator of C++
 std::ostream& operator <<(std::ostream& os, const route_table_ut& ud)

You can also have a look into the verify logs after introducing these fixes.

I will also try to build and test on other environments and provide other feedback for the CCI release.

Thanks and Regards,

Ameya Vikram Singh

verifyVerboseLogs.tar.xz

verifyFixedLogs.tar.xz

Update: Only for the ex16_User_Defined_Data_Type I need to make changes on Linux 64-Bit with g++(5.4.0 C++11 enabled).

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...