+// See LICENSE for license details.
+
#ifndef _RISCV_PROCESSOR_H
#define _RISCV_PROCESSOR_H
void deliver_ipi(); // register an interprocessor interrupt
bool running() { return run; }
void set_pcr(int which, reg_t val);
+ void set_interrupt(int which, bool on);
reg_t get_pcr(int which);
+ mmu_t* get_mmu() { return &mmu; }
private:
sim_t& sim;
regfile_t<reg_t, NXPR, true> XPR;
regfile_t<freg_t, NFPR, false> FPR;
reg_t pc;
-
- // counters
reg_t cycle;
// privileged control registers
reg_t cause;
reg_t tohost;
reg_t fromhost;
- uint32_t interrupts_pending;
uint32_t id;
uint32_t sr; // only modify the status register using set_pcr()
uint32_t fsr;
uint32_t count;
uint32_t compare;
- // # of bits in an XPR (32 or 64). (redundant with sr)
- int xprlen;
-
bool run; // !reset
// functions