Skip to content

Commit

Permalink
Removing nvhls_connections_utils.h.
Browse files Browse the repository at this point in the history
  • Loading branch information
npfet committed Sep 4, 2024
1 parent 97e33e5 commit 809b362
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 47 deletions.
8 changes: 2 additions & 6 deletions cmod/include/axi/axi4.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,12 @@
#ifndef _AXI_AXI4_H_
#define _AXI_AXI4_H_

#ifdef __SYNTHESIS__
// workaround until connections/connections_utils.h and nvhls_connections_utils.h are cleaned up
#include <systemc>
#include <connections/connections.h>
#include <connections/connections_utils.h>
#define __CONNECTIONS__CONNECTIONS_UTILS_H_
#define NVHLS_CONNECTIONS_UTILS_H_
#endif

#include "auto_gen_fields.h"

#include <systemc>
#include <nvhls_connections.h>
#include <nvhls_assert.h>
#include <nvhls_message.h>
Expand Down
2 changes: 1 addition & 1 deletion cmod/include/nvhls_annotate.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#ifndef NVHLS_ANNOTATE_H_
#define NVHLS_ANNOTATE_H_

#include <nvhls_connections_utils.h>
#include <connections/connections_utils.h>

#include <connections/annotate.h>

Expand Down
17 changes: 1 addition & 16 deletions cmod/include/nvhls_connections.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,27 +17,12 @@
#ifndef NVHLS_CONNECTIONS_H_
#define NVHLS_CONNECTIONS_H_

// Override official connections macros.
#include <nvhls_connections_utils.h>

// Save macros before including official connections, only if we haven't yet overridden them.
#ifndef __CONNECTIONS__CONNECTIONS_UTILS_H_
#pragma push_macro("CONNECTIONS_ASSERT_MSG")
#pragma push_macro("CONNECTIONS_SIM_ONLY_ASSERT_MSG")
#undef CONNECTIONS_ASSERT_MSG
#undef CONNECTIONS_SIM_ONLY_ASSERT_MSG

#define __DID_SAVE_ASSERTS
#endif

// Include connections tree nvhls_connections.h
#include <connections/connections_utils.h>
#include <connections/connections.h>

#ifdef __DID_SAVE_ASSERTS
#pragma pop_macro("CONNECTIONS_ASSERT_MSG")
#pragma pop_macro("CONNECTIONS_SIM_ONLY_ASSERT_MSG")
#undef __DID_SAVE_ASSERTS
#endif

// Include dependencies that we no longer include in Connections' nvhls_connections.h
#include <nvhls_packet.h>
Expand Down
5 changes: 0 additions & 5 deletions cmod/include/nvhls_connections_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,4 @@

#include <nvhls_assert.h>

// Map CONNECTIONS_ASSERT_MSG onto NVHLS_ASSERT_MSG to support CTC_SKIP_ASSER
#define CONNECTIONS_ASSERT_MSG(X,MSG) NVHLS_ASSERT_MSG(X,MSG)
#define CONNECTIONS_SIM_ONLY_ASSERT_MSG(X,MSG) CMOD_ASSERT_MSG(X,MSG)


#endif // ifndef NVHLS_CONNECTIONS_UTILS_H_
18 changes: 0 additions & 18 deletions cmod/include/nvhls_marshaller.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,27 +17,9 @@
#ifndef NVHLS_MARSHALLER_H_
#define NVHLS_MARSHALLER_H_

#include <nvhls_connections_utils.h>

// Save macros before including official connections, only if we haven't yet overridden them.
#ifndef __CONNECTIONS__CONNECTIONS_UTILS_H_
#pragma push_macro("CONNECTIONS_ASSERT_MSG")
#pragma push_macro("CONNECTIONS_SIM_ONLY_ASSERT_MSG")
#undef CONNECTIONS_ASSERT_MSG
#undef CONNECTIONS_SIM_ONLY_ASSERT_MSG

#define __DID_SAVE_ASSERTS
#endif

// Include connections tree nvhls_connections.h
#include <connections/marshaller.h>

#ifdef __DID_SAVE_ASSERTS
#pragma pop_macro("CONNECTIONS_ASSERT_MSG")
#pragma pop_macro("CONNECTIONS_SIM_ONLY_ASSERT_MSG")
#undef __DID_SAVE_ASSERTS
#endif

#include <nvhls_assert.h>

#endif
2 changes: 1 addition & 1 deletion cmod/include/testbench/Pacer.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#ifndef PACER_H_
#define PACER_H_

#include <nvhls_connections_utils.h>
#include <connections/connections_utils.h>

#include <connections/Pacer.h>

Expand Down

0 comments on commit 809b362

Please sign in to comment.