1 /***********************license start*********************************** 2 * Copyright (C) 2021-2026 Marvell. 3 * SPDX-License-Identifier: BSD-3-Clause 4 * https://spdx.org/licenses 5 ***********************license end**************************************/ 6 7 /** 8 * @file 9 * 10 * Functions for information about the run platform. 11 * 12 * <hr>$Revision: 49448 $<hr> 13 * @addtogroup hal 14 * @{ 15 */ 16 17 /** 18 * This typedef defines the possible platforms for the ODY. The 19 * numbers represent fuse setting in Fuses[197:195]. 20 */ 21 typedef enum { 22 PLATFORM_HW = 0, 23 PLATFORM_EMULATOR = 1, 24 PLATFORM_RTL = 2, 25 PLATFORM_ASIM = 3, 26 } ody_platform_t; 27 28 /** 29 * Check which platform we are currently running on. This allows a ODY binary to 30 * run on various platforms without a recompile. 31 * 32 * @param platform to check for 33 * 34 * @return Non zero if we are on the platform 35 */ 36 static inline int ody_is_platform(ody_platform_t platform) __attribute__ ((pure, always_inline)); 37 static inline int ody_is_platform(ody_platform_t platform) 38 { 39 extern ody_platform_t __ody_platform; 40 41 return (__ody_platform == platform); 42 } 43 44 /** 45 * Call to initialize the platform state 46 */ 47 extern void __ody_platform_init(void); 48 49 /** @} */ 50