MatchLib
nvhls_connections.h
1 /*
2  * Copyright (c) 2016-2019, NVIDIA CORPORATION. All rights reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License")
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef NVHLS_CONNECTIONS_H_
18 #define NVHLS_CONNECTIONS_H_
19 
20 // Override official connections macros.
21 #include <nvhls_connections_utils.h>
22 
23 // Save macros before including official connections, only if we haven't yet overridden them.
24 #ifndef __CONNECTIONS__CONNECTIONS_UTILS_H_
25 #pragma push_macro("CONNECTIONS_ASSERT_MSG")
26 #pragma push_macro("CONNECTIONS_SIM_ONLY_ASSERT_MSG")
27 #undef CONNECTIONS_ASSERT_MSG
28 #undef CONNECTIONS_SIM_ONLY_ASSERT_MSG
29 
30 #define __DID_SAVE_ASSERTS
31 #endif
32 
33 // Ensure that Mentor Connections keeps same port name (val, msg, etc...)
34 #define CONNECTIONS_NAMING_ORIGINAL
35 // Include connections tree nvhls_connections.h
36 #include <connections/connections.h>
37 
38 #ifdef __DID_SAVE_ASSERTS
39 #pragma pop_macro("CONNECTIONS_ASSERT_MSG")
40 #pragma pop_macro("CONNECTIONS_SIM_ONLY_ASSERT_MSG")
41 #undef __DID_SAVE_ASSERTS
42 #endif
43 
44 // Include dependencies that we no longer include in Connections' nvhls_connections.h
45 #include <nvhls_packet.h>
46 #include <nvhls_assert.h>
47 #include <nvhls_module.h>
48 #include <fifo.h>
49 
50 #include <nvhls_connections_buffered_ports.h>
51 #include <nvhls_connections_network.h>
52 
53 #endif // ifndef NVHLS_CONNECTIONS_H_