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;
108 virtual void post(
int src_id) = 0;
144 void post(
int src_id)
override;
145 void clear(
int src_id)
override;
150 void init()
override;
242 const int src32_id,
const int context_id);
245 const int context_id);
250 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
int nContext
Number of interrupt contexts = nThread * 2 e.g.
std::map< Tick, PlicOutput > outputQueue
void updateOutput()
Trigger:
gem5::Plic::PlicRegisters registers
void post(int src_id) override
Interrupt interface.
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)
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 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
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
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 CLINT is based on the SiFive U54MC datasheet: https://sifive....
std::vector< uint32_t > maxPriority
std::vector< uint32_t > maxID