OpenASIP 2.2
Loading...
Searching...
No Matches
RISCVInstructionExecutor.hh
Go to the documentation of this file.
1/*
2 Copyright (C) 2025 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 RISCVInstructionExecutor.hh
20 *
21 * Declaration of RISCVInstructionExecutor class.
22 *
23 * @author Eetu Soronen 2025 (eetu.soronen@tuni.fi)
24 * @note rating: red
25 */
26
27#ifndef INSTRUCTION_EXECUTOR_HH
28#define INSTRUCTION_EXECUTOR_HH
29
30#include <stdint.h>
31
32extern "C" {
33
34int initializeMachine(const char* machinePath, char** error);
35
36int resetMachine();
37
38int unpackInstruction(uint32_t instruction, char** output, char** error);
39
41 const char* opName, const uint32_t* inputs, uint32_t inputsCount,
42 uint32_t* output, char** error);
43
45 const char* opName, const uint64_t* inputs, uint32_t inputsCount,
46 uint64_t* output, char** error);
47}
48
49#endif
int executeInstruction32(const char *opName, const uint32_t *inputs, uint32_t inputsCount, uint32_t *output, char **error)
int initializeMachine(const char *machinePath, char **error)
int executeInstruction64(const char *opName, const uint64_t *inputs, uint32_t inputsCount, uint64_t *output, char **error)
int resetMachine()
int unpackInstruction(uint32_t instruction, char **output, char **error)