3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-08-12 06:00:55 +00:00

Added k68 (m68k compatible cpu) test case from verilator

This commit is contained in:
Clifford Wolf 2013-03-31 11:00:46 +02:00
parent 88af5b6a16
commit 04843bdcbe
3 changed files with 61 additions and 0 deletions

View file

@ -0,0 +1,25 @@
diff --git a/bench/bench.cpp b/bench/bench.cpp
index 47a50c4..de27fbb 100755
--- a/bench/bench.cpp
+++ b/bench/bench.cpp
@@ -71,6 +71,7 @@ int main(int argc, char **argv, char **env) {
main_time++;
top->arbclk_i = !top->arbclk_i;
if (main_time%5 == 0) top->clk = !top->clk;
+ if (main_time%100000 == 0) cout<<"Partial sum = "<<hex<<top->sum<<"\n";
}
cout<<"Final sum = "<<hex<<top->sum<<"\n";
diff --git a/rtl/k68_clkgen.v b/rtl/k68_clkgen.v
index c201a97..55b9cad 100755
--- a/rtl/k68_clkgen.v
+++ b/rtl/k68_clkgen.v
@@ -57,7 +57,7 @@ module k68_clkgen (/*AUTOARG*/
assign clk4_o = cnt[1];
assign clk_o = ~clk_i;
- initial cnt = 0; // Power up state doesn't matter, but can't be X
+ // initial cnt = 0; // Power up state doesn't matter, but can't be X
always @(posedge clk_i) begin
cnt <= cnt + 1'b1;