From 13884426be31ba9cbb298927fcb3727d610a6a22 Mon Sep 17 00:00:00 2001 From: "Alejandro W. Sior" Date: Sat, 19 Aug 2023 12:08:26 +0200 Subject: getting started --- DRAM.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 DRAM.h (limited to 'DRAM.h') diff --git a/DRAM.h b/DRAM.h new file mode 100644 index 0000000..bc36a93 --- /dev/null +++ b/DRAM.h @@ -0,0 +1,32 @@ +#pragma once + +#include +#include + +#include + +/* DRAM + * A basic device simulating DRAM. + */ +struct DRAM { + uint8_t *buf; + + DRAM(); + ~DRAM(); + + CData prev_clk; + CData clk; + CData we; + uint64_t claddr; + VlWide<4>* cldata; + + void apply( + CData clk, + CData we, + uint64_t claddr, + VlWide<4>* cldata); + + void eval(); + + void posedge_clk(); +}; \ No newline at end of file -- cgit v1.2.3