summaryrefslogtreecommitdiff
path: root/rtl/top
diff options
context:
space:
mode:
authorJulianCamacho <jjulian.341@gmail.com>2022-11-07 23:35:46 -0600
committerJulianCamacho <jjulian.341@gmail.com>2022-11-07 23:35:46 -0600
commit942461c315db3269fcbe9a9ca18beee9afa78d9c (patch)
tree5a1d3e325c5c489166569d83a3e2715a6146b284 /rtl/top
parent6f08b7251f57778bd32f3cc2d44ddba63492cac8 (diff)
AƱade testbench para fetch y decode
Diffstat (limited to 'rtl/top')
-rw-r--r--rtl/top/decode_test.sv8
-rw-r--r--rtl/top/fetch_test.sv25
2 files changed, 30 insertions, 3 deletions
diff --git a/rtl/top/decode_test.sv b/rtl/top/decode_test.sv
index f701aff..6aa2159 100644
--- a/rtl/top/decode_test.sv
+++ b/rtl/top/decode_test.sv
@@ -1,9 +1,11 @@
`timescale 1 ns / 1 ps
+`include "core/decode/isa.sv"
+`include "core/uarch.sv"
module decode_test
(
input word insn,
- input logic n, z, c, v
+ input logic n, z, c, v,
output datapath_decode ctrl,
output psr_decode psr_ctrl,
@@ -15,8 +17,8 @@ module decode_test
output coproc_decode coproc_ctrl
);
- psr_flags nzcv;
- assign {n, z, c, v} = nzcv;
+ psr_flags flags;
+ assign flags = {n, z, c, v};
core_decode DUT (.*);
diff --git a/rtl/top/fetch_test.sv b/rtl/top/fetch_test.sv
new file mode 100644
index 0000000..bdfa2c5
--- /dev/null
+++ b/rtl/top/fetch_test.sv
@@ -0,0 +1,25 @@
+`timescale 1 ns / 1 ps
+`include "core/uarch.sv"
+
+module fetch_test
+(
+ input logic clk,
+ stall,
+ branch,
+ flush,
+ fetched,
+ wr_pc,
+ input ptr branch_target,
+ input word wr_current,
+ fetch_data,
+
+ output logic fetch,
+ output word insn,
+ output ptr insn_pc,
+ addr
+
+);
+
+ core_fetch #(.PREFETCH_ORDER(3)) DUT (.*);
+
+endmodule \ No newline at end of file