Skip to content

Commit 800470a

Browse files
committed
Fixing default parameters to be consistent for arithmetic benchmarks
- Can always be overridden at runtime.
1 parent e408d20 commit 800470a

31 files changed

Lines changed: 101 additions & 100 deletions

File tree

logikbench/arithmetic/abs/rtl/abs.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module abs #(parameter DW = 8 // Operator width (8,16,32,64,128,...)
1+
module abs #(parameter DW = 16
22
)
33
(
44
//Inputs

logikbench/arithmetic/absdiff/rtl/absdiff.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module absdiff #(parameter DW = 8 // Operator width (8,16,32,64,128,...)
1+
module absdiff #(parameter DW = 16
22
)
33
(
44
//Inputs

logikbench/arithmetic/absdiffs/rtl/absdiffs.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module absdiffs #(parameter DW = 8 // Operator width (8,16,32,64,128,...)
1+
module absdiffs #(parameter DW = 16
22
)
33
(
44
//Inputs
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
module add #(parameter N = 8 // Operator width (8,16,32,64,128,...)
1+
module add #(parameter DW = 16
22
)
33
(
44
//Inputs
5-
input [N-1:0] a,
6-
input [N-1:0] b,
7-
input cin,
5+
input [DW-1:0] a,
6+
input [DW-1:0] b,
7+
input cin,
88
//Outputs
9-
output cout,
10-
output [N-1:0] z
9+
output cout,
10+
output [DW-1:0] z
1111
);
1212

13-
assign {cout, z[N-1:0]} = a[N-1:0] + b[N-1:0] + cin;
13+
assign {cout, z} = a + b + cin;
1414

1515
endmodule

logikbench/arithmetic/addsub/rtl/addsub.v

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
module addsub #(parameter N = 8 // Operator width (8,16,32,64,128,...)
1+
module addsub #(parameter DW = 16
22
)
33
(
44
//Inputs
5-
input [N-1:0] a,
6-
input [N-1:0] b,
7-
input sel,
5+
input [DW-1:0] a,
6+
input [DW-1:0] b,
7+
input sel,
88
//Outputs
9-
output [N-1:0] z
9+
output [DW-1:0] z
1010
);
1111

1212
assign z = sel ? a + b : a - b;

logikbench/arithmetic/cmp/rtl/cmp.v

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
module cmp #(parameter DW = 8 // Operator width (8,16,32,64,128,...)
2-
)
1+
module cmp #(parameter DW = 16
2+
)
33
(
44
//Inputs
55
input [DW-1:0] a,

logikbench/arithmetic/counter/rtl/counter.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module counter #(parameter DW = 16 // counter width
1+
module counter #(parameter DW = 16
22
)
33
(
44
input clk,

logikbench/arithmetic/csa32/rtl/csa32.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module csa32 #(parameter DW = 8 // Operator width (8,16,32,64,128,...)
1+
module csa32 #(parameter DW = 16
22
)
33
(
44
//Inputs

logikbench/arithmetic/csa42/rtl/csa42.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module csa42 #(parameter DW = 8 // Operator width (8,16,32,64,128,...)
1+
module csa42 #(parameter DW = 16
22
)
33
(input [DW-1:0] in0, // input
44
input [DW-1:0] in1, // input

logikbench/arithmetic/dec/rtl/dec.v

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
module dec #(parameter N = 8 // Operator width (8,16,32,64,128,...)
1+
module dec #(parameter DW = 16
22
)
33
(
44
//Inputs
5-
input [N-1:0] a,
6-
output [N-1:0] z
5+
input [DW-1:0] a,
6+
output [DW-1:0] z
77
);
88

99
assign z = a - 1'b1;

0 commit comments

Comments
 (0)