Skip to content

Commit ec9058c

Browse files
committed
remove redundant dram entry flush code
1 parent eed265f commit ec9058c

File tree

2 files changed

+0
-17
lines changed

2 files changed

+0
-17
lines changed

src/riscvsim/memory_controller.c

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,6 @@ mem_controller_access_dram(MemoryController *m, target_ulong paddr, int bytes_to
205205
m->dram_dispatch_queue.entry[index].type = type;
206206
m->dram_dispatch_queue.entry[index].bytes_to_access = m->dram_burst_size;
207207
m->dram_dispatch_queue.entry[index].valid = 1;
208-
m->dram_dispatch_queue.entry[index].flush = FALSE;
209208

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

292-
if (e->flush)
293-
{
294-
e->valid = 0;
295-
cq_dequeue(&m->dram_dispatch_queue.cq);
296-
return;
297-
}
298-
299291
/* Don't stall the pipeline stage for write request once submitted
300292
* to DRAM */
301293
if (e->type == Write)
@@ -320,14 +312,6 @@ mem_controller_update_base(MemoryController *m)
320312
{
321313
e = &m->dram_dispatch_queue.entry[cq_front(&m->dram_dispatch_queue.cq)];
322314

323-
if (e->flush)
324-
{
325-
e->valid = 0;
326-
m->mem_access_active = 0;
327-
cq_dequeue(&m->dram_dispatch_queue.cq);
328-
return;
329-
}
330-
331315
if (m->current_latency == m->max_latency)
332316
{
333317
m->mem_access_active = 0;

src/riscvsim/memory_controller_utils.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ typedef struct PendingMemAccessEntry
4141
int valid;
4242
int bytes_to_access;
4343
int max_bytes_to_access;
44-
int flush;
4544
target_ulong addr;
4645
target_ulong req_addr;
4746
int stage_queue_index;

0 commit comments

Comments
 (0)