-
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 #845 from rdaly525/inline-wires
Preserve Intermediate Wires
- Loading branch information
Showing
19 changed files
with
544 additions
and
35 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
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Module `Foo` defined externally | ||
module Main ( | ||
input z_0_x, | ||
output z_0_y, | ||
input z_1_x, | ||
output z_1_y | ||
); | ||
wire Foo_inst0_z_0_y; | ||
wire a_x; | ||
wire a_y; | ||
Foo Foo_inst0 ( | ||
.z_0_x(a_y), | ||
.z_0_y(Foo_inst0_z_0_y), | ||
.z_1_x(z_0_x), | ||
.z_1_y(z_1_y) | ||
); | ||
assign a_x = Foo_inst0_z_0_y; | ||
assign a_y = z_0_x; | ||
assign z_0_y = a_x; | ||
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module Main ( | ||
input I, | ||
output O | ||
); | ||
wire x; | ||
assign x = I; | ||
assign O = x; | ||
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// Module `Foo` defined externally | ||
module Main ( | ||
input [4:0] I, | ||
output [4:0] O | ||
); | ||
wire [4:0] Foo_inst0_O; | ||
wire [4:0] x; | ||
Foo Foo_inst0 ( | ||
.I(I), | ||
.O(Foo_inst0_O) | ||
); | ||
assign x = Foo_inst0_O; | ||
assign O = x; | ||
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module Main ( | ||
input [4:0] I, | ||
output [4:0] O | ||
); | ||
wire [4:0] x; | ||
assign x = I; | ||
assign O = x; | ||
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
module Main ( | ||
input I, | ||
output O0, | ||
output O1 | ||
); | ||
wire x; | ||
assign x = I; | ||
assign O0 = x; | ||
assign O1 = x; | ||
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
module Main ( | ||
input [4:0] I_0, | ||
input [4:0] I_1, | ||
input [4:0] I_2, | ||
input [4:0] I_3, | ||
input [4:0] I_4, | ||
output [4:0] O_0, | ||
output [4:0] O_1, | ||
output [4:0] O_2, | ||
output [4:0] O_3, | ||
output [4:0] O_4 | ||
); | ||
wire [24:0] x; | ||
assign x = {I_4[4],I_4[3],I_4[2],I_4[1],I_4[0],I_3[4],I_3[3],I_3[2],I_3[1],I_3[0],I_2[4],I_2[3],I_2[2],I_2[1],I_2[0],I_1[4],I_1[3],I_1[2],I_1[1],I_1[0],I_0[4],I_0[3],I_0[2],I_0[1],I_0[0]}; | ||
assign O_0 = {x[4],x[3],x[2],x[1],x[0]}; | ||
assign O_1 = {x[9],x[8],x[7],x[6],x[5]}; | ||
assign O_2 = {x[14],x[13],x[12],x[11],x[10]}; | ||
assign O_3 = {x[19],x[18],x[17],x[16],x[15]}; | ||
assign O_4 = {x[24],x[23],x[22],x[21],x[20]}; | ||
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
module Main ( | ||
input [4:0] I__0, | ||
input I__1, | ||
output [4:0] O__0, | ||
output O__1 | ||
); | ||
wire [5:0] x; | ||
assign x = {I__1,I__0[4],I__0[3],I__0[2],I__0[1],I__0[0]}; | ||
assign O__0 = {x[4],x[3],x[2],x[1],x[0]}; | ||
assign O__1 = x[5]; | ||
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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{"top":"global.Main", | ||
"namespaces":{ | ||
"global":{ | ||
"modules":{ | ||
"Foo":{ | ||
"type":["Record",[ | ||
["z",["Array",2,["Record",[["x","BitIn"],["y","Bit"]]]]] | ||
]] | ||
}, | ||
"Main":{ | ||
"type":["Record",[ | ||
["z",["Array",2,["Record",[["x","BitIn"],["y","Bit"]]]]] | ||
]], | ||
"instances":{ | ||
"Foo_inst0":{ | ||
"modref":"global.Foo" | ||
}, | ||
"a_x":{ | ||
"modref":"corebit.wire" | ||
}, | ||
"a_y":{ | ||
"modref":"corebit.wire" | ||
} | ||
}, | ||
"connections":[ | ||
["a_y.out","Foo_inst0.z.0.x"], | ||
["a_x.in","Foo_inst0.z.0.y"], | ||
["self.z.0.x","Foo_inst0.z.1.x"], | ||
["self.z.1.y","Foo_inst0.z.1.y"], | ||
["self.z.0.y","a_x.out"], | ||
["self.z.0.x","a_y.in"] | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.