adding support for verilator-driven AFU driver: vlsim
This commit is contained in:
@@ -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() {
|
||||
|
||||
@@ -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_;
|
||||
|
||||
Reference in New Issue
Block a user