]> Witch of Git - minecraft-eda/commitdiff
Update benchmark to match the yosys 4-bit counter develop
authorCassie Jones <code@witchoflight.com>
Fri, 3 May 2019 19:31:51 +0000 (12:31 -0700)
committerCassie Jones <code@witchoflight.com>
Fri, 3 May 2019 19:31:51 +0000 (12:31 -0700)
The other minecraft logic synthesis projects have used this as their
placement benchmark, so it's good to match them.

.gitignore
example/counter.sv
example/counter.ys

index cc2f53327bc43d363bbb0c5eb6a412b6849792cf..8809313c4e55f3f5636742b08932fde789aca2b7 100644 (file)
@@ -1,2 +1,4 @@
 /mc-mask/target
 minecraft.lib
 /mc-mask/target
 minecraft.lib
+*.hex
+*.blif
index 36f83e4a637e91df8b92b040067aac4f07af1ac5..a77550186a0f89db549acb9eec228744af317b08 100644 (file)
@@ -1,15 +1,13 @@
-module counter #(parameter WIDTH=3, parameter MAX=(1<<WIDTH)-1) (
+module counter #(parameter WIDTH=4) (
     input clock,
     input reset,
     input clock,
     input reset,
+    input enable,
     output logic [WIDTH-1:0] count,
     output logic [WIDTH-1:0] count,
-    output logic max
 );
 
 );
 
-assign max = count == MAX;
-
 always_ff @(posedge clock) begin
     if (reset) count <= 0;
 always_ff @(posedge clock) begin
     if (reset) count <= 0;
-    else if (!max) count <= count + 1;
+    else if (enable) count <= count + 1;
 end
 
 endmodule
 end
 
 endmodule
index 4700bfd5914355f031c5f540bce7b654870ae9d4..cf23357889cd3eebb5e8dc74548d5eb906b6a627 100644 (file)
@@ -5,3 +5,4 @@ dff2dffe
 abc -liberty minecraft.lib
 stat
 show counter
 abc -liberty minecraft.lib
 stat
 show counter
+write_blif counter.blif