Skip to content

Commit

Permalink
remove redundant dram entry flush code
Browse files Browse the repository at this point in the history
  • Loading branch information
gkothar1 committed May 4, 2020
1 parent eed265f commit ec9058c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 17 deletions.
16 changes: 0 additions & 16 deletions src/riscvsim/memory_controller.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,6 @@ mem_controller_access_dram(MemoryController *m, target_ulong paddr, int bytes_to
m->dram_dispatch_queue.entry[index].type = type;
m->dram_dispatch_queue.entry[index].bytes_to_access = m->dram_burst_size;
m->dram_dispatch_queue.entry[index].valid = 1;
m->dram_dispatch_queue.entry[index].flush = FALSE;

/* Calculate remaining transactions for this access */
bytes_to_access -= m->dram_burst_size;
Expand Down Expand Up @@ -289,13 +288,6 @@ mem_controller_update_base(MemoryController *m)
{
e = &m->dram_dispatch_queue.entry[cq_front(&m->dram_dispatch_queue.cq)];

if (e->flush)
{
e->valid = 0;
cq_dequeue(&m->dram_dispatch_queue.cq);
return;
}

/* Don't stall the pipeline stage for write request once submitted
* to DRAM */
if (e->type == Write)
Expand All @@ -320,14 +312,6 @@ mem_controller_update_base(MemoryController *m)
{
e = &m->dram_dispatch_queue.entry[cq_front(&m->dram_dispatch_queue.cq)];

if (e->flush)
{
e->valid = 0;
m->mem_access_active = 0;
cq_dequeue(&m->dram_dispatch_queue.cq);
return;
}

if (m->current_latency == m->max_latency)
{
m->mem_access_active = 0;
Expand Down
1 change: 0 additions & 1 deletion src/riscvsim/memory_controller_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ typedef struct PendingMemAccessEntry
int valid;
int bytes_to_access;
int max_bytes_to_access;
int flush;
target_ulong addr;
target_ulong req_addr;
int stage_queue_index;
Expand Down

0 comments on commit ec9058c

Please sign in to comment.