criscv/include/cpu.h
Minecon724 bf59ce8dcd
Some checks failed
/ deploy (push) Failing after 57s
fix
2024-10-19 16:48:00 +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