diff options
author | Clifford Wolf <clifford@clifford.at> | 2019-06-03 08:14:16 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2019-06-03 08:14:16 +0200 |
commit | f3a42746ca04347f93688bbfcf47cbae1c582c4b (patch) | |
tree | 952eb38c3d4dbff519be3ff3f60a8388435fe06d | |
parent | b7e82dfcd1346c3b3fd7ac3ebd647907fc9ce06c (diff) | |
download | picorv32-f3a42746ca04347f93688bbfcf47cbae1c582c4b.tar.gz picorv32-f3a42746ca04347f93688bbfcf47cbae1c582c4b.zip |
Do not peek into core for cycle count in testbench
Signed-off-by: Clifford Wolf <clifford@clifford.at>
-rw-r--r-- | testbench.v | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/testbench.v b/testbench.v index b87ee36..6451252 100644 --- a/testbench.v +++ b/testbench.v @@ -77,10 +77,13 @@ module picorv32_wrapper #( wire tests_passed; reg [31:0] irq; + reg [15:0] count_cycle = 0; + always @(posedge clk) count_cycle <= resetn ? 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 mem_axi_awvalid; |