diff options
| author | Alejandro W. Sior <aho@sior.be> | 2023-08-19 12:08:26 +0200 |
|---|---|---|
| committer | Alejandro W. Sior <aho@sior.be> | 2023-08-19 12:08:26 +0200 |
| commit | 13884426be31ba9cbb298927fcb3727d610a6a22 (patch) | |
| tree | f28c86eb48ff61b515030896f2a41bdab47adfbd /DRAM.h | |
Diffstat (limited to 'DRAM.h')
| -rw-r--r-- | DRAM.h | 32 |
1 files changed, 32 insertions, 0 deletions
@@ -0,0 +1,32 @@ +#pragma once + +#include <verilated.h> +#include <verilated_vcd_c.h> + +#include <stdio.h> + +/* 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 |
