26 #ifndef MODELS_HFRISCV_CORE_INCLUDE_HFRISCV_HPP_ 27 #define MODELS_HFRISCV_CORE_INCLUDE_HFRISCV_HPP_ 44 #define HFRISCV_PC_MEMBASE 0x40000000 46 #define EXIT_TRAP 0xe0000000 47 #define IRQ_VECTOR 0xf0000000 48 #define IRQ_CAUSE 0xf0000010 49 #define IRQ_MASK 0xf0000020 50 #define IRQ_STATUS 0xf0000030 51 #define IRQ_EPC 0xf0000040 52 #define COUNTER 0xf0000050 53 #define COMPARE 0xf0000060 54 #define COMPARE2 0xf0000070 55 #define EXTIO_IN 0xf0000080 56 #define EXTIO_OUT 0xf0000090 57 #define DEBUG_ADDR 0xf00000d0 58 #define UART_WRITE 0xf00000e0 59 #define UART_READ 0xf00000e0 60 #define UART_DIVISOR 0xf00000f0 70 uint32_t
vector, cause, mask, status, status_dly[4], epc,
71 counter, compare, compare2;
89 #ifdef HFRISCV_ENABLE_COUNTERS 90 void UpdateCounters(
int opcode,
int funct3);
106 #ifdef HFRISCV_ENABLE_COUNTERS 144 #endif // MODELS_HFRISCV_CORE_INCLUDE_HFRISCV_HPP_ std::ofstream output_debug
std::ofstream output_uart
The Signal class models a generic bus of width equals to the sizeof(T)
void bp(risc_v_state *s, uint32_t ir)
HFRiscV(std::string name, Signal< uint8_t > *intr, Signal< uint8_t > *stall, Memory *mem)
Signal< uint8_t > * GetSignalStall()
void mem_write(risc_v_state *s, int32_t size, uint32_t address, uint32_t value)
Reads data from memory.
Signal< uint8_t > * _signal_stall
int32_t mem_read(risc_v_state *s, int32_t size, uint32_t address)
Reads data from the memory.
This class models a memory module.
This class implements the base operation for generic processor implementations.
Signal< uint8_t > * GetSignalIntr()
SimulationTime Run()
Run method from the base TimedModel class, overloaded.
Signal< uint8_t > * _signal_intr