summaryrefslogtreecommitdiff
path: root/isa/checker.h
blob: 6aae3ffc0037900080c2168ead203b76215d8d42 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#pragma once

#include <array>

#include "isa/isa.h"

struct funcmem {
    unsigned int fetch(unsigned int address);
    void store(unsigned int address, unsigned int value);
};

struct checker {
    unsigned int acc = 0;
    unsigned int link = 0;
    unsigned int pc = 0;
    std::array<unsigned int, NUM_CTLREGS> ctlregs;
    bool halted = false;
    funcmem mem;
    void execute();
};