diff options
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 |
