Jim Flynn | bbfe603 | 2020-07-20 16:57:44 +0100 | [diff] [blame] | 1 | // |
| 2 | // Copyright © 2020 Arm Ltd and Contributors. All rights reserved. |
| 3 | // SPDX-License-Identifier: MIT |
| 4 | // |
| 5 | #pragma once |
| 6 | |
Jim Flynn | c454ac9 | 2022-03-16 18:43:18 +0000 | [diff] [blame] | 7 | #include "ICounterDirectory.hpp" |
| 8 | |
Jim Flynn | bbfe603 | 2020-07-20 16:57:44 +0100 | [diff] [blame] | 9 | #include <cstdint> |
| 10 | #include <string> |
| 11 | |
| 12 | namespace arm |
| 13 | { |
| 14 | |
| 15 | namespace pipe |
| 16 | { |
| 17 | void ReadBytes(const unsigned char* buffer, unsigned int offset, unsigned int valueSize, uint8_t outValue[]); |
| 18 | |
| 19 | uint64_t ReadUint64(unsigned const char* buffer, unsigned int offset); |
| 20 | |
| 21 | uint32_t ReadUint32(unsigned const char* buffer, unsigned int offset); |
| 22 | |
| 23 | uint16_t ReadUint16(unsigned const char* buffer, unsigned int offset); |
| 24 | |
| 25 | uint8_t ReadUint8(unsigned const char* buffer, unsigned int offset); |
| 26 | |
| 27 | void WriteBytes(unsigned char* buffer, unsigned int offset, const void* value, unsigned int valueSize); |
| 28 | |
| 29 | void WriteUint64(unsigned char* buffer, unsigned int offset, uint64_t value); |
| 30 | |
| 31 | void WriteUint32(unsigned char* buffer, unsigned int offset, uint32_t value); |
| 32 | |
| 33 | void WriteUint16(unsigned char* buffer, unsigned int offset, uint16_t value); |
| 34 | |
| 35 | void WriteUint8(unsigned char* buffer, unsigned int offset, uint8_t value); |
| 36 | |
| 37 | std::string CentreAlignFormatting(const std::string& stringToPass, const int spacingWidth); |
| 38 | |
Jim Flynn | c454ac9 | 2022-03-16 18:43:18 +0000 | [diff] [blame] | 39 | void PrintCounterDirectory(ICounterDirectory& counterDirectory); |
| 40 | |
| 41 | uint16_t GetNextUid(bool peekOnly = false); |
| 42 | |
| 43 | std::vector<uint16_t> GetNextCounterUids(uint16_t firstUid, uint16_t cores); |
| 44 | |
Jim Flynn | bbfe603 | 2020-07-20 16:57:44 +0100 | [diff] [blame] | 45 | } // namespace pipe |
Jim Flynn | c454ac9 | 2022-03-16 18:43:18 +0000 | [diff] [blame] | 46 | } // namespace arm |