-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #847 from rdaly525/update-tests-linebreaks
Update gold files for linebreaks
- Loading branch information
Showing
17 changed files
with
626 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,56 @@ | ||
module coreir_slice #(parameter hi = 1, parameter lo = 0, parameter width = 1) (input [width-1:0] in, output [hi-lo-1:0] out); | ||
module coreir_slice #( | ||
parameter hi = 1, | ||
parameter lo = 0, | ||
parameter width = 1 | ||
) ( | ||
input [width-1:0] in, | ||
output [hi-lo-1:0] out | ||
); | ||
assign out = in[hi-1:lo]; | ||
endmodule | ||
|
||
module coreir_concat #(parameter width0 = 1, parameter width1 = 1) (input [width0-1:0] in0, input [width1-1:0] in1, output [width0+width1-1:0] out); | ||
module coreir_concat #( | ||
parameter width0 = 1, | ||
parameter width1 = 1 | ||
) ( | ||
input [width0-1:0] in0, | ||
input [width1-1:0] in1, | ||
output [width0+width1-1:0] out | ||
); | ||
assign out = {in1,in0}; | ||
endmodule | ||
|
||
module concats (input [15:0] in, output [15:0] out); | ||
module concats ( | ||
input [15:0] in, | ||
output [15:0] out | ||
); | ||
wire [15:0] cc0_out; | ||
wire [3:0] s0_out; | ||
wire [11:0] s1_out; | ||
coreir_concat #(.width0(4), .width1(12)) cc0(.in0(s0_out), .in1(s1_out), .out(cc0_out)); | ||
coreir_slice #(.hi(16), .lo(12), .width(16)) s0(.in(in), .out(s0_out)); | ||
coreir_slice #(.hi(15), .lo(3), .width(16)) s1(.in(in), .out(s1_out)); | ||
coreir_concat #( | ||
.width0(4), | ||
.width1(12) | ||
) cc0 ( | ||
.in0(s0_out), | ||
.in1(s1_out), | ||
.out(cc0_out) | ||
); | ||
coreir_slice #( | ||
.hi(16), | ||
.lo(12), | ||
.width(16) | ||
) s0 ( | ||
.in(in), | ||
.out(s0_out) | ||
); | ||
coreir_slice #( | ||
.hi(15), | ||
.lo(3), | ||
.width(16) | ||
) s1 ( | ||
.in(in), | ||
.out(s1_out) | ||
); | ||
assign out = cc0_out; | ||
endmodule | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
module Top (input [7:0] I0, input [7:0] I1, output [7:0] O); | ||
module Top ( | ||
input [7:0] I0, | ||
input [7:0] I1, | ||
output [7:0] O | ||
); | ||
assign O = I0 + I1; | ||
endmodule | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,93 @@ | ||
module commonlib_muxn__N2__width8 (input [7:0] in_data_0, input [7:0] in_data_1, input [0:0] in_sel, output [7:0] out); | ||
module commonlib_muxn__N2__width8 ( | ||
input [7:0] in_data_0, | ||
input [7:0] in_data_1, | ||
input [0:0] in_sel, | ||
output [7:0] out | ||
); | ||
assign out = in_sel[0] ? in_data_1 : in_data_0; | ||
endmodule | ||
|
||
module commonlib_muxn__N4__width8 (input [7:0] in_data_0, input [7:0] in_data_1, input [7:0] in_data_2, input [7:0] in_data_3, input [1:0] in_sel, output [7:0] out); | ||
module commonlib_muxn__N4__width8 ( | ||
input [7:0] in_data_0, | ||
input [7:0] in_data_1, | ||
input [7:0] in_data_2, | ||
input [7:0] in_data_3, | ||
input [1:0] in_sel, | ||
output [7:0] out | ||
); | ||
wire [7:0] muxN_0_out; | ||
wire [7:0] muxN_1_out; | ||
commonlib_muxn__N2__width8 muxN_0(.in_data_0(in_data_0), .in_data_1(in_data_1), .in_sel(in_sel[1 - 1:0]), .out(muxN_0_out)); | ||
commonlib_muxn__N2__width8 muxN_1(.in_data_0(in_data_2), .in_data_1(in_data_3), .in_sel(in_sel[1 - 1:0]), .out(muxN_1_out)); | ||
commonlib_muxn__N2__width8 muxN_0 ( | ||
.in_data_0(in_data_0), | ||
.in_data_1(in_data_1), | ||
.in_sel(in_sel[1 - 1:0]), | ||
.out(muxN_0_out) | ||
); | ||
commonlib_muxn__N2__width8 muxN_1 ( | ||
.in_data_0(in_data_2), | ||
.in_data_1(in_data_3), | ||
.in_sel(in_sel[1 - 1:0]), | ||
.out(muxN_1_out) | ||
); | ||
assign out = in_sel[1] ? muxN_1_out : muxN_0_out; | ||
endmodule | ||
|
||
module commonlib_muxn__N8__width8 (input [7:0] in_data_0, input [7:0] in_data_1, input [7:0] in_data_2, input [7:0] in_data_3, input [7:0] in_data_4, input [7:0] in_data_5, input [7:0] in_data_6, input [7:0] in_data_7, input [2:0] in_sel, output [7:0] out); | ||
module commonlib_muxn__N8__width8 ( | ||
input [7:0] in_data_0, | ||
input [7:0] in_data_1, | ||
input [7:0] in_data_2, | ||
input [7:0] in_data_3, | ||
input [7:0] in_data_4, | ||
input [7:0] in_data_5, | ||
input [7:0] in_data_6, | ||
input [7:0] in_data_7, | ||
input [2:0] in_sel, | ||
output [7:0] out | ||
); | ||
wire [7:0] muxN_0_out; | ||
wire [7:0] muxN_1_out; | ||
commonlib_muxn__N4__width8 muxN_0(.in_data_0(in_data_0), .in_data_1(in_data_1), .in_data_2(in_data_2), .in_data_3(in_data_3), .in_sel(in_sel[2 - 1:0]), .out(muxN_0_out)); | ||
commonlib_muxn__N4__width8 muxN_1(.in_data_0(in_data_4), .in_data_1(in_data_5), .in_data_2(in_data_6), .in_data_3(in_data_7), .in_sel(in_sel[2 - 1:0]), .out(muxN_1_out)); | ||
commonlib_muxn__N4__width8 muxN_0 ( | ||
.in_data_0(in_data_0), | ||
.in_data_1(in_data_1), | ||
.in_data_2(in_data_2), | ||
.in_data_3(in_data_3), | ||
.in_sel(in_sel[2 - 1:0]), | ||
.out(muxN_0_out) | ||
); | ||
commonlib_muxn__N4__width8 muxN_1 ( | ||
.in_data_0(in_data_4), | ||
.in_data_1(in_data_5), | ||
.in_data_2(in_data_6), | ||
.in_data_3(in_data_7), | ||
.in_sel(in_sel[2 - 1:0]), | ||
.out(muxN_1_out) | ||
); | ||
assign out = in_sel[2] ? muxN_1_out : muxN_0_out; | ||
endmodule | ||
|
||
module Mux8x8 (input [7:0] I0, input [7:0] I1, input [7:0] I2, input [7:0] I3, input [7:0] I4, input [7:0] I5, input [7:0] I6, input [7:0] I7, input [2:0] S, output [7:0] O); | ||
commonlib_muxn__N8__width8 coreir_commonlib_mux8x8_inst0(.in_data_0(I0), .in_data_1(I1), .in_data_2(I2), .in_data_3(I3), .in_data_4(I4), .in_data_5(I5), .in_data_6(I6), .in_data_7(I7), .in_sel(S), .out(O)); | ||
module Mux8x8 ( | ||
input [7:0] I0, | ||
input [7:0] I1, | ||
input [7:0] I2, | ||
input [7:0] I3, | ||
input [7:0] I4, | ||
input [7:0] I5, | ||
input [7:0] I6, | ||
input [7:0] I7, | ||
input [2:0] S, | ||
output [7:0] O | ||
); | ||
commonlib_muxn__N8__width8 coreir_commonlib_mux8x8_inst0 ( | ||
.in_data_0(I0), | ||
.in_data_1(I1), | ||
.in_data_2(I2), | ||
.in_data_3(I3), | ||
.in_data_4(I4), | ||
.in_data_5(I5), | ||
.in_data_6(I6), | ||
.in_data_7(I7), | ||
.in_sel(S), | ||
.out(O) | ||
); | ||
endmodule | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,34 @@ | ||
module Add8_cin (input [7:0] z, input [7:0] x, output [7:0] a, input CIN); | ||
module Add8_cin ( | ||
input [7:0] z, | ||
input [7:0] x, | ||
output [7:0] a, | ||
input CIN | ||
); | ||
assign a = (({1'b0,1'b0,1'b0,1'b0,1'b0,1'b0,1'b0,CIN}) + z) + x; | ||
endmodule | ||
|
||
module Sub8 (input [7:0] z, input [7:0] x, output [7:0] a); | ||
Add8_cin inst1(.z(z), .x(~ x), .a(a), .CIN(1'b1)); | ||
module Sub8 ( | ||
input [7:0] z, | ||
input [7:0] x, | ||
output [7:0] a | ||
); | ||
Add8_cin inst1 ( | ||
.z(z), | ||
.x(~ x), | ||
.a(a), | ||
.CIN(1'b1) | ||
); | ||
endmodule | ||
|
||
module test_two_ops (input [7:0] z, input [7:0] x, output [7:0] a); | ||
Sub8 inst1(.z(z + x), .x(z), .a(a)); | ||
module test_two_ops ( | ||
input [7:0] z, | ||
input [7:0] x, | ||
output [7:0] a | ||
); | ||
Sub8 inst1 ( | ||
.z(z + x), | ||
.x(z), | ||
.a(a) | ||
); | ||
endmodule | ||
|
Oops, something went wrong.