criscv/include/cpu.h
Minecon724 51c5804ef6
All checks were successful
/ deploy (push) Successful in 1m21s
Add actions, support older gcc
2024-10-19 20:16:31 +02:00

23 lines
No EOL
425 B
C

#ifndef CPU_H
#define CPU_H
#include "address_space.h"
#include <stdint.h>
struct CPU_s {
// [32] of 32bit (uint32_t) registers
uint32_t registers[32];
// Points to the byte of current instruction. Also known as pc
uint32_t programCounter;
// The address space
AddressSpace *addressSpace;
};
typedef struct CPU_s CPU;
CPU create_cpu(AddressSpace *addressSpace);
int cpu_cycle(CPU *cpu);
#endif