adding support for verilator-driven AFU driver: vlsim

This commit is contained in:
Blaise Tine
2020-09-08 13:05:26 -04:00
parent 8eee036295
commit 0fab1ddd92
17 changed files with 742 additions and 66 deletions

View File

@@ -3,6 +3,11 @@
#include <fstream>
#include <iomanip>
#define ENABLE_DRAM_STALLS
#define DRAM_LATENCY 4
#define DRAM_RQ_SIZE 16
#define DRAM_STALLS_MODULO 16
uint64_t timestamp = 0;
double sc_time_stamp() {

View File

@@ -14,17 +14,6 @@
#include <ostream>
#include <vector>
#define ENABLE_DRAM_STALLS
#define DRAM_LATENCY 4
#define DRAM_RQ_SIZE 16
#define DRAM_STALLS_MODULO 16
typedef struct {
int cycles_left;
std::array<uint8_t, GLOBAL_BLOCK_SIZE> block;
unsigned tag;
} dram_req_t;
class Simulator {
public:
@@ -53,6 +42,12 @@ public:
private:
typedef struct {
int cycles_left;
std::array<uint8_t, GLOBAL_BLOCK_SIZE> block;
unsigned tag;
} dram_req_t;
void eval();
void eval_dram_bus();
@@ -61,7 +56,7 @@ private:
void eval_snp_bus();
std::vector<dram_req_t> dram_rsp_vec_;
int dram_rsp_active_;
bool dram_rsp_active_;
bool snp_req_active_;
bool csr_req_active_;