39#ifndef __DEV_RISCV_PLIC_HH__
40#define __DEV_RISCV_PLIC_HH__
50#include "params/Plic.hh"
51#include "params/PlicBase.hh"
57using namespace RiscvISA;
106 virtual void post(
int src_id) = 0;
138 void post(
int src_id)
override;
139 void clear(
int src_id)
override;
144 void init()
override;
236 const int src32_id,
const int context_id);
239 const int context_id);
244 const int context_id);
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
virtual void post(int src_id)=0
PlicBase(const Params ¶ms)
virtual void clear(int src_id)=0
std::vector< Register32 > priority
const Addr thresholdPadding
std::vector< Register32 > pending
std::vector< RegisterRaz > enable_holes
PlicRegisters(const std::string &name, Addr base, Plic *plic)
const Addr thresholdStart
std::vector< Register32 > threshold
std::vector< std::vector< Register32 > > enable
std::vector< RegisterRaz > reserved
std::vector< RegisterRaz > claim_holes
std::vector< Register32 > claim
Tick write(PacketPtr pkt) override
Pure virtual function that the device must implement.
std::vector< uint32_t > lastID
std::map< Tick, PlicOutput > outputQueue
void updateOutput()
Trigger:
gem5::Plic::PlicRegisters registers
Plic(const Params ¶ms)
void post(int src_id) override
Interrupt interface.
std::vector< std::pair< uint32_t, ExceptionCode > > contextConfigs
PLIC hart/pmode address configs, stored in the format {hartID, pmode}.
EventFunctionWrapper update
Tick read(PacketPtr pkt) override
PioDevice funcitons.
PlicRegisters::Register32 Register32
void writeEnable(Register32 ®, const uint32_t &data, const int src32_id, const int context_id)
void unserialize(CheckpointIn &cp) override
Unserialize an object.
void clear(int src_id) override
void writeThreshold(Register32 ®, const uint32_t &data, const int context_id)
uint32_t readClaim(Register32 ®, const int context_id)
void initContextFromHartConfig(const std::string &hart_config)
std::vector< std::vector< uint32_t > > effPriority
void propagateOutput()
Trigger:
int nSrc32
Number of 32-bit pending registers needed = ceil(nSrc / 32)
void init() override
SimObject functions.
std::vector< uint32_t > pendingPriority
void writeClaim(Register32 ®, const uint32_t &data, const int context_id)
void serialize(CheckpointOut &cp) const override
Serialize an object.
void initContextFromNContexts(int n_contexts)
The function for handling context config from params.
void writePriority(Register32 ®, const uint32_t &data, const int src_id)
Register read / write callbacks.
const std::string & name() const
Register< uint32_t > Register32
const Params & params() const
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
std::ostream CheckpointOut
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
uint64_t Tick
Tick count type.
Declaration of the Packet class.
NOTE: This implementation of PLIC is based on he riscv-plic-spec repository: https://github....
std::vector< uint32_t > maxPriority
std::vector< uint32_t > maxID