aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2019-06-03 08:17:08 +0200
committerClifford Wolf <clifford@clifford.at>2019-06-03 08:17:08 +0200
commit3d36751b88856895c7373e3f2f9664eb6e6f64f1 (patch)
tree9172c456847b9b8f76bb8b6f093f92501d78bda0
parentf3a42746ca04347f93688bbfcf47cbae1c582c4b (diff)
downloadpicorv32-3d36751b88856895c7373e3f2f9664eb6e6f64f1.tar.gz
picorv32-3d36751b88856895c7373e3f2f9664eb6e6f64f1.zip
Do not peek into core for cycle count in WB testbench
Signed-off-by: Clifford Wolf <clifford@clifford.at>
-rw-r--r--testbench_wb.v7
1 files changed, 5 insertions, 2 deletions
diff --git a/testbench_wb.v b/testbench_wb.v
index 5c931cc..789ec78 100644
--- a/testbench_wb.v
+++ b/testbench_wb.v
@@ -70,10 +70,13 @@ module picorv32_wrapper #(
reg [31:0] irq;
wire mem_instr;
+ reg [15:0] count_cycle = 0;
+ always @(posedge wb_clk) count_cycle <= !wb_rst ? count_cycle + 1 : 0;
+
always @* begin
irq = 0;
- irq[4] = &uut.picorv32_core.count_cycle[12:0];
- irq[5] = &uut.picorv32_core.count_cycle[15:0];
+ irq[4] = &count_cycle[12:0];
+ irq[5] = &count_cycle[15:0];
end
wire [31:0] wb_m2s_adr;