38#ifndef __DEV_RISCV_CLINT_HH__
39#define __DEV_RISCV_CLINT_HH__
48#include "params/Clint.hh"
54using namespace RiscvISA;
141 void init()
override;
MMIO Registers 0x0000 - 0x3FFF: msip (write-through to misc reg file) ...: reserved[0] 0x4000 - 0xBFF...
ClintRegisters(const std::string &name, Addr base, Clint *clint)
std::vector< Register64 > mtimecmp
std::vector< RegisterRaz > reserved
std::vector< Register32 > msip
NOTE: This implementation of CLINT is based on the SiFive U54MC datasheet: https://sifive....
void raiseInterruptPin(int id)
Timer tick callback.
Clint(const Params ¶ms)
Port & getPort(const std::string &if_name, PortID idx=InvalidPortID) override
Get a port with a given name and index.
void init() override
SimObject functions.
Tick write(PacketPtr pkt) override
Pure virtual function that the device must implement.
ClintRegisters::Register32 Register32
IntSinkPin< Clint > signal
void lowerInterruptPin(int id)
void writeMSIP(Register32 ®, const uint32_t &data, const int thread_id)
gem5::Clint::ClintRegisters registers
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Tick read(PacketPtr pkt) override
PioDevice interface functions.
void serialize(CheckpointOut &cp) const override
Serialize an object.
uint32_t readMSIP(Register32 ®, const int thread_id)
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Ports are used to interface objects to each other.
const std::string & name() const
Register< uint64_t > Register64
Register< uint32_t > Register32
const Params & params() const
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
const PortID InvalidPortID
std::ostream CheckpointOut
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
uint64_t Tick
Tick count type.
Declaration of the Packet class.