1 // 2 // Copyright (c) 2010-2024 Antmicro 3 // 4 // This file is licensed under the MIT License. 5 // Full license text is available in 'licenses/MIT.txt'. 6 // 7 #ifndef RENODE_H 8 #define RENODE_H 9 #include <stdint.h> 10 #include <string.h> 11 #include <stdlib.h> 12 13 // Protocol must be in sync with Renode's ProtocolMessage 14 #pragma pack(push, 1) 15 struct Protocol 16 { 17 Protocol() = default; 18 Protocol(int actionId, uint64_t addr, uint64_t value, int peripheralIndex = 0) 19 { 20 this->actionId = actionId; 21 this->addr = addr; 22 this->value = value; 23 this->peripheralIndex = peripheralIndex; 24 } 25 26 int actionId; 27 uint64_t addr; 28 uint64_t value; 29 int peripheralIndex; 30 }; 31 #pragma pack(pop) 32 33 enum Action 34 { 35 #include "../hdl/includes/renode_action_enumerators.svh" 36 }; 37 38 enum LogLevel 39 { 40 LOG_LEVEL_NOISY = -1, 41 LOG_LEVEL_DEBUG = 0, 42 LOG_LEVEL_INFO = 1, 43 LOG_LEVEL_WARNING = 2, 44 LOG_LEVEL_ERROR = 3 45 }; 46 47 const int noPeripheralIndex = -1; 48 49 #endif 50