OpenASIP 2.2
Loading...
Searching...
No Matches
RISCVTools.hh
Go to the documentation of this file.
1/*
2 Copyright (C) 2024 Tampere University.
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with this library; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18/**
19 * @file RISCVTools.hh
20 *
21 * Declaration of RISCVTools class.
22 *
23 * @author Kari Hepola 2024 (kari.hepola@tuni.fi)
24 * @note rating: red
25 */
26
27
28#ifndef RISCV_TOOLS_HH
29#define RISCV_TOOLS_HH
30
31#include <string>
32
34
37 int funct3;
38 int funct7;
39 int funct2;
40};
41
43public:
44 static std::string getFunc3Str(const int encoding);
45 static std::string getFunc7Str(const int encoding);
46 static std::string getFunc2Str(const int encoding);
47 static std::string getOpcodeStr(const int encoding);
48 static int getFunc3Int(const int encoding);
49 static int getFunc7Int(const int encoding);
50 static int getFunc2Int(const int encoding);
51 static int getOpcodeInt(const int encoding);
52 static inline void findCustomOps(
53 std::map<std::string, int>& customOps_, BinaryEncoding* bem_);
54 static R4Instruction decodeR4Instruction(const uint32_t opcode);
55};
56
57#include "RISCVTools.icc"
58
59#endif
60
static int getFunc2Int(const int encoding)
static std::string getFunc2Str(const int encoding)
static R4Instruction decodeR4Instruction(const uint32_t opcode)
static int getFunc7Int(const int encoding)
static std::string getOpcodeStr(const int encoding)
static int getOpcodeInt(const int encoding)
static void findCustomOps(std::map< std::string, int > &customOps_, BinaryEncoding *bem_)
static std::string getFunc3Str(const int encoding)
static std::string getFunc7Str(const int encoding)
static int getFunc3Int(const int encoding)