Skip to content

Commit

Permalink
rviommu: implement command queue and interrupts
Browse files Browse the repository at this point in the history
  • Loading branch information
janweinstock committed Nov 2, 2024
1 parent ae0c6f6 commit 5c73c06
Show file tree
Hide file tree
Showing 3 changed files with 314 additions and 23 deletions.
8 changes: 6 additions & 2 deletions include/vcml/models/riscv/iommu.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ class iommu : public peripheral
static_assert(sizeof(command) == 2 * sizeof(u64), "command size");

unordered_map<u64, context> m_contexts;
unordered_map<u64, iotlb> m_iotlb;
unordered_map<u64, iotlb> m_iotlb_s;
unordered_map<u64, iotlb> m_iotlb_g;

u32 m_work;
sc_event m_workev;
Expand Down Expand Up @@ -141,7 +142,7 @@ class iommu : public peripheral
iotlb& entry);

void report_fault(const fault& req);
void report_irq(u32 irqid);
void send_msi(u32 ipsr);

void restart_counter(u64 val);
void increment_counter(context& ctx, u32 event);
Expand All @@ -154,6 +155,7 @@ class iommu : public peripheral
void write_ddtp(u64 val);
void write_cqt(u32 val);
void write_cqcsr(u32 val);
void write_ipsr(u32 val);
void write_iocntinh(u32 val);
void write_iohpmcycles(u64 val);
void write_iohpmevt(u64 val, size_t idx);
Expand All @@ -171,6 +173,8 @@ class iommu : public peripheral
void worker();
void overflow();

void update_ipsr();

public:
property<bool> sv32;
property<bool> sv39;
Expand Down
Loading

0 comments on commit 5c73c06

Please sign in to comment.