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;
66 std::bitset<NumInterruptTypes>
hvip;
73 using Params = RiscvInterruptsParams;
77 std::bitset<NumInterruptTypes>
globalMask()
const;
86 return (
ip[num] ||
hvip[num]) &&
ie[num];
91 ISA* isa =
static_cast<ISA*
>(
tc->getIsaPtr());
103 void post(
int int_num,
int index)
override;
119 uint64_t
readIE()
const {
return (uint64_t)
ie.to_ulong(); }
BaseInterrupts(const Params &p)
Ports are used to interface objects to each other.
std::vector< gem5::IntSinkPin< Interrupts > * > localInterruptPins
void setIP(const uint64_t &val)
void setHVIP(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
uint64_t readHVIP() const
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.
std::bitset< NumInterruptTypes > hvip
RiscvInterruptsParams Params
void updateIntrInfo() override
bool isWakeUp() const override
std::bitset< NumInterruptTypes > globalMask() const
std::bitset< NumInterruptTypes > ip
bool checkInterrupt(int num) const
Fault getInterrupt() override
std::bitset< NumInterruptTypes > ie
ThreadContext is the external interface to all thread state for anything outside of the CPU.
Copyright (c) 2024 Arm Limited 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.