30#ifndef __ARCH_RISCV_INTERRUPT_HH__
31#define __ARCH_RISCV_INTERRUPT_HH__
42#include "debug/Interrupt.hh"
44#include "params/RiscvInterrupts.hh"
62 std::bitset<NumInterruptTypes>
ip;
63 std::bitset<NumInterruptTypes>
ie;
67 using Params = RiscvInterruptsParams;
71 std::bitset<NumInterruptTypes>
globalMask()
const;
89 void post(
int int_num,
int index)
override;
98 uint64_t
readIP()
const {
return (uint64_t)
ip.to_ulong(); }
99 uint64_t
readIE()
const {
return (uint64_t)
ie.to_ulong(); }
Ports are used to interface objects to each other.
std::vector< gem5::IntSinkPin< Interrupts > * > localInterruptPins
void setIP(const uint64_t &val)
void setIE(const uint64_t &val)
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Interrupts(const Params &p)
void clear(int int_num, int index) override
bool checkInterrupts() const override
bool checkNonMaskableInterrupt() const
void lowerInterruptPin(uint32_t num)
void post(int int_num, int index) override
void serialize(CheckpointOut &cp) const override
Serialize an object.
void raiseInterruptPin(uint32_t num)
Port & getPort(const std::string &if_name, PortID idx) override
Get a port with a given name and index.
RiscvInterruptsParams Params
void updateIntrInfo() override
std::bitset< NumInterruptTypes > globalMask() const
std::bitset< NumInterruptTypes > ip
bool checkInterrupt(int num) const
Fault getInterrupt() override
std::bitset< NumInterruptTypes > ie
virtual RegVal readMiscReg(RegIndex misc_reg)=0
virtual void setMiscReg(RegIndex misc_reg, RegVal val)=0
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
std::shared_ptr< FaultBase > Fault
std::ostream CheckpointOut
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.