summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Blake Kongslie2022-05-29 16:33:56 -0700
committerJulian Blake Kongslie2022-05-29 16:33:56 -0700
commitfd8f6b112a8a7545d58d1c6974c1214b85252709 (patch)
tree68e8b052b07f53ef9fe0abe518947037a10e0d39
parentOnly run selector logic if we need a new selection next cycle. (diff)
downloadmultipdp8-fd8f6b112a8a7545d58d1c6974c1214b85252709.tar.xz
Single-cycle bypass when there is no contention on memory arbiter.
-rw-r--r--PLAN1
-rw-r--r--hdl/mem_arbiter.sv11
2 files changed, 11 insertions, 1 deletions
diff --git a/PLAN b/PLAN
index 759042c..938c85b 100644
--- a/PLAN
+++ b/PLAN
@@ -1,4 +1,3 @@
10. figure out a way to add a single-cycle bypass to the arbiter
21. add pdp-8 instruction cache 11. add pdp-8 instruction cache
32. add pdp-8 data cache 22. add pdp-8 data cache
43. add global shared cache 33. add global shared cache
diff --git a/hdl/mem_arbiter.sv b/hdl/mem_arbiter.sv
index e39317d..854867f 100644
--- a/hdl/mem_arbiter.sv
+++ b/hdl/mem_arbiter.sv
@@ -62,6 +62,17 @@ module mem_arbiter
62 end 62 end
63 end 63 end
64 64
65 if (hold_valid != 0 && !ram_valid) begin
66 for (int i = 0; i < `NUM_PDPS+1; ++i) begin
67 if (hold_valid == 1 << i) begin
68 ram_valid = 1;
69 ram_data = hold_data[i];
70 hold_valid[i] = 0;
71 break;
72 end
73 end
74 end
75
65 if (hold_valid != 0 && (selector_stale || !ram_valid)) begin 76 if (hold_valid != 0 && (selector_stale || !ram_valid)) begin
66 for (int i = 0; i < `NUM_PDPS+1; ++i) begin 77 for (int i = 0; i < `NUM_PDPS+1; ++i) begin
67 automatic int j = selector + i; 78 automatic int j = selector + i;