MatchLib
nvhls_marshaller.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_MARSHALLER_H_
18 #define NVHLS_MARSHALLER_H_
19 
20 #include <nvhls_connections_utils.h>
21 
22 // Save macros before including official connections, only if we haven't yet overridden them.
23 #ifndef __CONNECTIONS__CONNECTIONS_UTILS_H_
24 #pragma push_macro("CONNECTIONS_ASSERT_MSG")
25 #pragma push_macro("CONNECTIONS_SIM_ONLY_ASSERT_MSG")
26 #undef CONNECTIONS_ASSERT_MSG
27 #undef CONNECTIONS_SIM_ONLY_ASSERT_MSG
28 
29 #define __DID_SAVE_ASSERTS
30 #endif
31 
32 // Ensure that Mentor Connections keeps same port name (val, msg, etc...)
33 #define CONNECTIONS_NAMING_ORIGINAL
34 // Include connections tree nvhls_connections.h
35 #include <connections/marshaller.h>
36 
37 #ifdef __DID_SAVE_ASSERTS
38 #pragma pop_macro("CONNECTIONS_ASSERT_MSG")
39 #pragma pop_macro("CONNECTIONS_SIM_ONLY_ASSERT_MSG")
40 #undef __DID_SAVE_ASSERTS
41 #endif
42 
43 #include <nvhls_assert.h>
44 
45 #endif