v2x: Make capitalization consistent. * Modules are named in all `UPPER_CASE`. * Instances are named in `lower_case`. Examples; ```verilog /** * These modules do **not** produce anything in the output unless * something in the top module uses it. */ module MODULE_TYPE_A (...); // ... endmodule /** * This module includes another module, but still doesn't produce * anything unless something in the top module uses it. */ module MODULE_TYPE_B (...); MODULE_TYPE_A object_1 (...); MODULE_TYPE_A object_2 (...); endmodule module top(...); MODULE_TYPE_A top_level_object_1 (...); MODULE_TYPE_B top_level_object_2 (...); endmodule ``` This means that a "bare" `<pb_type>` is always going to have an upper case name. While `<pb_type>` inside other `<pb_type>`s objects will have lower case names. This means that includes will always need to override the name values. ```xml <pb_type name="UPPER_CASE"> <pb_type name="inner_object_a"> <xi:include href="XXXX.xml" xpointer="xpointer(pb_type/child::node())" /> </pb_type> <pb_type name="inner_object_b"> <xi:include href="XXXX.xml" xpointer="xpointer(pb_type/child::node())" /> </pb_type> </pb_type> ``` Signed-off-by: Tim 'mithro' Ansell <me@mith.ro>
diff --git a/tests/clocks/dff_comb_one_clock/dff_comb_one_clock.sim.v b/tests/clocks/dff_comb_one_clock/dff_comb_one_clock.sim.v index 52c7b08..a1e60c2 100644 --- a/tests/clocks/dff_comb_one_clock/dff_comb_one_clock.sim.v +++ b/tests/clocks/dff_comb_one_clock/dff_comb_one_clock.sim.v
@@ -2,7 +2,7 @@ * `input wire a` should be detected as a clock because it drives the flip * flop. */ -module block(a, b, c, d); +module BLOCK(a, b, c, d); input wire a; input wire b; input wire c;
diff --git a/tests/clocks/dff_one_clock/dff_one_clock.sim.v b/tests/clocks/dff_one_clock/dff_one_clock.sim.v index f8c6cb8..d6e2c39 100644 --- a/tests/clocks/dff_one_clock/dff_one_clock.sim.v +++ b/tests/clocks/dff_one_clock/dff_one_clock.sim.v
@@ -2,7 +2,7 @@ * `input wire a` should be detected as a clock because it drives the flip * flop. */ -module block(a, b, c); +module BLOCK(a, b, c); input wire a; input wire b; output wire c;
diff --git a/tests/clocks/dff_two_clocks/dff_two_clocks.sim.v b/tests/clocks/dff_two_clocks/dff_two_clocks.sim.v index 43cc922..c9bcb0f 100644 --- a/tests/clocks/dff_two_clocks/dff_two_clocks.sim.v +++ b/tests/clocks/dff_two_clocks/dff_two_clocks.sim.v
@@ -1,4 +1,4 @@ -module block(c1, c2, a, b, c, o1, o2); +module BLOCK(c1, c2, a, b, c, o1, o2); input wire c1; input wire c2; input wire a;
diff --git a/tests/clocks/input_attr_clock/input_attr_clock.sim.v b/tests/clocks/input_attr_clock/input_attr_clock.sim.v index 5b8e9cd..819cb8f 100644 --- a/tests/clocks/input_attr_clock/input_attr_clock.sim.v +++ b/tests/clocks/input_attr_clock/input_attr_clock.sim.v
@@ -3,7 +3,7 @@ * attribute. */ (* whitebox *) -module block(a, b, o); +module BLOCK(a, b, o); (* CLOCK *) input wire a; input wire b;
diff --git a/tests/clocks/input_named_clk/input_named_clk.sim.v b/tests/clocks/input_named_clk/input_named_clk.sim.v index c9a6d1d..7d5b619 100644 --- a/tests/clocks/input_named_clk/input_named_clk.sim.v +++ b/tests/clocks/input_named_clk/input_named_clk.sim.v
@@ -3,7 +3,7 @@ * box module. */ (* whitebox *) -module block(clk, a, o); +module BLOCK(clk, a, o); input wire clk; input wire a; output wire o;
diff --git a/tests/clocks/input_named_rdclk/input_named_rdclk.sim.v b/tests/clocks/input_named_rdclk/input_named_rdclk.sim.v index 28dce3f..70d827a 100644 --- a/tests/clocks/input_named_rdclk/input_named_rdclk.sim.v +++ b/tests/clocks/input_named_rdclk/input_named_rdclk.sim.v
@@ -3,7 +3,7 @@ * box module. */ (* whitebox *) -module block(rdclk, a, o); +module BLOCK(rdclk, a, o); input wire rdclk; input wire a; output wire o;
diff --git a/tests/clocks/multiple_inputs_named_clk/multiple_inputs_named_clk.sim.v b/tests/clocks/multiple_inputs_named_clk/multiple_inputs_named_clk.sim.v index 1b89608..076d630 100644 --- a/tests/clocks/multiple_inputs_named_clk/multiple_inputs_named_clk.sim.v +++ b/tests/clocks/multiple_inputs_named_clk/multiple_inputs_named_clk.sim.v
@@ -3,7 +3,7 @@ * despite this being a black box module. */ (* whitebox *) -module block(a, rdclk, b, wrclk, c, o); +module BLOCK(a, rdclk, b, wrclk, c, o); input wire a; input wire rdclk; input wire b;
diff --git a/tests/clocks/multiple_outputs_named_clk/multiple_outputs_named_clk.sim.v b/tests/clocks/multiple_outputs_named_clk/multiple_outputs_named_clk.sim.v index bdab184..42899f8 100644 --- a/tests/clocks/multiple_outputs_named_clk/multiple_outputs_named_clk.sim.v +++ b/tests/clocks/multiple_outputs_named_clk/multiple_outputs_named_clk.sim.v
@@ -3,7 +3,7 @@ * despite this being a black box module. */ (* whitebox *) -module block(a, b, rdclk, o, wrclk); +module BLOCK(a, b, rdclk, o, wrclk); input wire a; input wire b; output wire rdclk;
diff --git a/tests/clocks/output_attr_clock/output_attr_clock.sim.v b/tests/clocks/output_attr_clock/output_attr_clock.sim.v index ba9022a..bdf4747 100644 --- a/tests/clocks/output_attr_clock/output_attr_clock.sim.v +++ b/tests/clocks/output_attr_clock/output_attr_clock.sim.v
@@ -3,7 +3,7 @@ * attribute. */ (* whitebox *) -module block(a, b, o); +module BLOCK(a, b, o); input wire a; input wire b; (* CLOCK *)
diff --git a/tests/clocks/output_named_clk/output_named_clk.sim.v b/tests/clocks/output_named_clk/output_named_clk.sim.v index 07bf2df..fcf775b 100644 --- a/tests/clocks/output_named_clk/output_named_clk.sim.v +++ b/tests/clocks/output_named_clk/output_named_clk.sim.v
@@ -3,7 +3,7 @@ * box module. */ (* whitebox *) -module block(a, b, clk); +module BLOCK(a, b, clk); input wire a; input wire b; output wire clk;
diff --git a/tests/clocks/output_named_rdclk/output_named_rdclk.sim.v b/tests/clocks/output_named_rdclk/output_named_rdclk.sim.v index 1b95470..4b72b6f 100644 --- a/tests/clocks/output_named_rdclk/output_named_rdclk.sim.v +++ b/tests/clocks/output_named_rdclk/output_named_rdclk.sim.v
@@ -3,7 +3,7 @@ * box module. */ (* whitebox *) -module block(a, b, rdclk); +module BLOCK(a, b, rdclk); input wire a; input wire b; output wire rdclk;
diff --git a/tests/dsp_combinational/dsp_combinational.sim.v b/tests/dsp_combinational/dsp_combinational.sim.v index 56ca49d..7c8a616 100644 --- a/tests/dsp_combinational/dsp_combinational.sim.v +++ b/tests/dsp_combinational/dsp_combinational.sim.v
@@ -1,7 +1,7 @@ `ifndef DSP_COMB `define DSP_COMB (* whitebox *) -module dsp_combinational ( +module DSP_COMBINATIONAL ( a, b, m, out );
diff --git a/tests/dsp_in_registered/dsp_in_registered.sim.v b/tests/dsp_in_registered/dsp_in_registered.sim.v index 2b791e6..253a5e3 100644 --- a/tests/dsp_in_registered/dsp_in_registered.sim.v +++ b/tests/dsp_in_registered/dsp_in_registered.sim.v
@@ -2,7 +2,7 @@ `include "../dsp_combinational/dsp_combinational.sim.v" /* DSP Block with register on all inputs */ -module dsp_in_registered (clk, a, b, m, out); +module DSP_IN_REGISTERED (clk, a, b, m, out); localparam DATA_WIDTH = 64; input wire clk; @@ -18,11 +18,11 @@ genvar i; for (i=0; i<DATA_WIDTH/2; i=i+1) begin: dffs_gen - dff q_a_ff(.d(a[i]), .q(q_a[i]), .clk(clk)); - dff q_b_ff(.d(b[i]), .q(q_b[i]), .clk(clk)); + DFF q_a_ff(.d(a[i]), .q(q_a[i]), .clk(clk)); + DFF q_b_ff(.d(b[i]), .q(q_b[i]), .clk(clk)); end - dff m_ff(.d(m), .q(q_m), .clk(clk)); + DFF m_ff(.d(m), .q(q_m), .clk(clk)); /* Combinational Logic */ - dsp_combinational comb (.a(q_a), .b(q_b), .m(q_m), .out(out)); + DSP_COMBINATIONAL comb (.a(q_a), .b(q_b), .m(q_m), .out(out)); endmodule
diff --git a/tests/dsp_inout_registered/dsp_inout_registered.sim.v b/tests/dsp_inout_registered/dsp_inout_registered.sim.v index b1ae488..8ab2cec 100644 --- a/tests/dsp_inout_registered/dsp_inout_registered.sim.v +++ b/tests/dsp_inout_registered/dsp_inout_registered.sim.v
@@ -2,7 +2,7 @@ `include "../dsp_combinational/dsp_combinational.sim.v" /* DSP Block with register on both the inputs and the output */ -module dsp_inout_registered (clk, a, b, m, out); +module DSP_INOUT_REGISTERED (clk, a, b, m, out); localparam DATA_WIDTH = 64; input wire clk; @@ -18,20 +18,20 @@ genvar i; for (i=0; i<DATA_WIDTH/2; i=i+1) begin: input_dffs_gen - dff q_a_ff(.d(a[i]), .q(q_a[i]), .clk(clk)); - dff q_b_ff(.d(b[i]), .q(q_b[i]), .clk(clk)); + DFF q_a_ff(.d(a[i]), .q(q_a[i]), .clk(clk)); + DFF q_b_ff(.d(b[i]), .q(q_b[i]), .clk(clk)); end - dff m_ff(.d(m), .q(q_m), .clk(clk)); + DFF m_ff(.d(m), .q(q_m), .clk(clk)); /* Combinational logic */ wire [DATA_WIDTH-1:0] c_out; - dsp_combinational comb (.a(q_a), .b(q_b), .m(q_m), .out(c_out)); + DSP_COMBINATIONAL comb (.a(q_a), .b(q_b), .m(q_m), .out(c_out)); /* Output register */ wire [DATA_WIDTH-1:0] q_out; genvar j; for (j=0; j<DATA_WIDTH; j=j+1) begin: output_dffs_gen - dff q_out_ff(.d(c_out[j]), .q(q_out[j]), .clk(clk)); + DFF q_out_ff(.d(c_out[j]), .q(q_out[j]), .clk(clk)); end assign out = q_out;
diff --git a/tests/dsp_inout_registered_dualclk/dsp_inout_registered_dualclk.sim.v b/tests/dsp_inout_registered_dualclk/dsp_inout_registered_dualclk.sim.v index be0dbbf..5ee70a0 100644 --- a/tests/dsp_inout_registered_dualclk/dsp_inout_registered_dualclk.sim.v +++ b/tests/dsp_inout_registered_dualclk/dsp_inout_registered_dualclk.sim.v
@@ -2,7 +2,7 @@ `include "../dsp_combinational/dsp_combinational.sim.v" /* DSP Block with register on both the inputs and the output, which use different clocks */ -module dsp_inout_registered_dualclk (iclk, oclk, a, b, m, out); +module DSP_INOUT_REGISTERED_DUALCLK (iclk, oclk, a, b, m, out); localparam DATA_WIDTH = 64; input wire iclk; @@ -19,20 +19,20 @@ genvar i; for (i=0; i<DATA_WIDTH/2; i=i+1) begin: input_dffs_gen - dff q_a_ff(.d(a[i]), .q(q_a[i]), .clk(iclk)); - dff q_b_ff(.d(b[i]), .q(q_b[i]), .clk(iclk)); + DFF q_a_ff(.d(a[i]), .q(q_a[i]), .clk(iclk)); + DFF q_b_ff(.d(b[i]), .q(q_b[i]), .clk(iclk)); end - dff m_ff(.d(m), .q(q_m), .clk(iclk)); + DFF m_ff(.d(m), .q(q_m), .clk(iclk)); /* Combinational logic */ wire [DATA_WIDTH-1:0] c_out; - dsp_combinational comb (.a(q_a), .b(q_b), .m(q_m), .out(c_out)); + DSP_COMBINATIONAL comb (.a(q_a), .b(q_b), .m(q_m), .out(c_out)); /* Output register on oclk */ wire [DATA_WIDTH-1:0] q_out; genvar j; for (j=0; j<DATA_WIDTH; j=j+1) begin: output_dffs_gen - dff q_out_ff(.d(c_out[j]), .q(q_out[j]), .clk(oclk)); + DFF q_out_ff(.d(c_out[j]), .q(q_out[j]), .clk(oclk)); end assign out = q_out;
diff --git a/tests/dsp_modes/dsp_modes.sim.v b/tests/dsp_modes/dsp_modes.sim.v index efd2cbe..b845392 100644 --- a/tests/dsp_modes/dsp_modes.sim.v +++ b/tests/dsp_modes/dsp_modes.sim.v
@@ -3,7 +3,7 @@ /* DSP Block with register on both the inputs and the output */ (* MODES="REGISTERED_NONE; REGISTERED_IN; REGISTERED_OUT; REGISTERED_INOUT; REGISTERED_PARTIAL" *) -module dsp_modes (clk, a, b, m, out); +module DSP_MODES (clk, a, b, m, out); localparam DATA_WIDTH = 64; parameter MODE = "REGISTERED_INOUT"; @@ -17,16 +17,16 @@ /* Register modes */ generate if (MODE == "REGISTERED_NONE") begin - dsp_combinational dsp_int_comb (.clk(clk), .a(a), .b(b), .m(m), .out(out)); + DSP_COMBINATIONAL dsp_int_comb (.clk(clk), .a(a), .b(b), .m(m), .out(out)); end if (MODE == "REGISTERED_INOUT") begin - dsp_inout_registered dsp_int_regio (.clk(clk), .a(a), .b(b), .m(m), .out(out)); -/* FIXME: dsp_(in|out)_registered is currently disabled. + DSP_INOUT_REGISTERED dsp_int_regio (.clk(clk), .a(a), .b(b), .m(m), .out(out)); +/* FIXME: DSP_(IN|OUT)_REGISTERED is currently disabled. end if (MODE == "REGISTERED_IN") begin - dsp_in_registered dsp_int_regi (.clk(clk), .a(a), .b(b), .m(m), .out(out)); + DSP_IN_REGISTERED dsp_int_regi (.clk(clk), .a(a), .b(b), .m(m), .out(out)); end if (MODE == "REGISTERED_OUT") begin - dsp_out_registered dsp_int_rego (.clk(clk), .a(a), .b(b), .m(m), .out(out)); + DSP_OUT_REGISTERED dsp_int_rego (.clk(clk), .a(a), .b(b), .m(m), .out(out)); end if (MODE == "REGISTERED_PARTIAL") begin - dsp_partial_registered dsp_int_part (.clk(clk), .a(a), .b(b), .m(m), .out(out)); + DSP_PARTIAL_REGISTERED dsp_int_part (.clk(clk), .a(a), .b(b), .m(m), .out(out)); */ end endgenerate
diff --git a/tests/dsp_out_registered/dsp_out_registered.sim.v b/tests/dsp_out_registered/dsp_out_registered.sim.v index 3d35bcf..b00d1d9 100644 --- a/tests/dsp_out_registered/dsp_out_registered.sim.v +++ b/tests/dsp_out_registered/dsp_out_registered.sim.v
@@ -2,7 +2,7 @@ `include "../dsp_combinational/dsp_combinational.sim.v" /* DSP Block with register on the output */ -module dsp_out_registered (clk, a, b, m, out); +module DSP_OUT_REGISTERED (clk, a, b, m, out); localparam DATA_WIDTH = 64; input wire clk; @@ -13,13 +13,13 @@ /* Combinational logic */ wire [DATA_WIDTH-1:0] c_out; - dsp_combinational comb (.a(a), .b(b), .m(m), .out(c_out)); + DSP_COMBINATIONAL comb (.a(a), .b(b), .m(m), .out(c_out)); /* Output register on clk */ wire [DATA_WIDTH-1:0] q_out; genvar j; for (j=0; j<DATA_WIDTH; j=j+1) begin: output_dffs_gen - dff q_out_ff(.d(c_out[j]), .q(q_out[j]), .clk(clk)); + DFF q_out_ff(.d(c_out[j]), .q(q_out[j]), .clk(clk)); end assign out = q_out;
diff --git a/tests/dsp_partial_registered/dsp_partial_registered.sim.v b/tests/dsp_partial_registered/dsp_partial_registered.sim.v index 2d1787a..79518a4 100644 --- a/tests/dsp_partial_registered/dsp_partial_registered.sim.v +++ b/tests/dsp_partial_registered/dsp_partial_registered.sim.v
@@ -2,7 +2,7 @@ `include "../dsp_combinational/dsp_combinational.sim.v" /* DSP Block with register on only some inputs */ -module dsp_partial_registered (clk, a, b, m, out); +module DSP_PARTIAL_REGISTERED (clk, a, b, m, out); localparam DATA_WIDTH = 64; input wire clk; @@ -17,10 +17,10 @@ genvar i; for (i=0; i<DATA_WIDTH/2; i=i+1) begin: dffs_gen - dff q_a_ff(.d(a[i]), .q(q_a[i]), .clk(clk)); - dff q_b_ff(.d(b[i]), .q(q_b[i]), .clk(clk)); + DFF q_a_ff(.d(a[i]), .q(q_a[i]), .clk(clk)); + DFF q_b_ff(.d(b[i]), .q(q_b[i]), .clk(clk)); end /* Combinational Logic */ - dsp_combinational comb (.a(q_a), .b(q_b), .m(m), .out(out)); + DSP_COMBINATIONAL comb (.a(q_a), .b(q_b), .m(m), .out(out)); endmodule
diff --git a/tests/fig41-full-adder/adder.sim.v b/tests/fig41-full-adder/adder.sim.v index b255a67..fd80b6d 100644 --- a/tests/fig41-full-adder/adder.sim.v +++ b/tests/fig41-full-adder/adder.sim.v
@@ -1,5 +1,5 @@ (* whitebox *) -module adder ( +module ADDER ( a, b, cin, sum, cout ); @@ -40,4 +40,3 @@ endspecify `endif endmodule -
diff --git a/tests/fig41-full-adder/golden.pb_type.xml b/tests/fig41-full-adder/golden.pb_type.xml index ab0245b..5b44106 100644 --- a/tests/fig41-full-adder/golden.pb_type.xml +++ b/tests/fig41-full-adder/golden.pb_type.xml
@@ -1,4 +1,4 @@ -<pb_type xmlns:xi="http://www.w3.org/2001/XInclude" name="adder" blif_model=".subckt adder" num_pb="1"> +<pb_type xmlns:xi="http://www.w3.org/2001/XInclude" name="ADDER" blif_model=".subckt adder" num_pb="1"> <input name="a" num_pins="1"/> <input name="b" num_pins="1"/> <input name="cin" num_pins="1"/>
diff --git a/tests/fig42-dff/dff.sim.v b/tests/fig42-dff/dff.sim.v index 6dcd5d3..d9db239 100644 --- a/tests/fig42-dff/dff.sim.v +++ b/tests/fig42-dff/dff.sim.v
@@ -1,5 +1,5 @@ (* whitebox *) -module dff (d, clk, q); +module DFF (d, clk, q); input wire d; input wire clk; output reg q;
diff --git a/tests/multiple_instance/golden.pb_type.xml b/tests/multiple_instance/golden.pb_type.xml index 6fd2c4e..1796907 100644 --- a/tests/multiple_instance/golden.pb_type.xml +++ b/tests/multiple_instance/golden.pb_type.xml
@@ -1,1293 +1,166 @@ <?xml version='1.0' encoding='utf-8'?> -<pb_type xmlns:xi="http://www.w3.org/2001/XInclude" name="multiple_instance" num_pb="1"> - <input name="a" num_pins="64"/> - <input name="b" num_pins="64"/> - <input name="cin" num_pins="64"/> - <output name="cout" num_pins="64"/> - <output name="sum" num_pins="64"/> - <pb_type blif_model=".subckt adder" name="adder" num_pb="64"> - <xi:include href="../fig41-full-adder/adder.pb_type.xml" xpointer="xpointer(pb_type/child::node())" /> +<pb_type xmlns:xi="http://www.w3.org/2001/XInclude" name="MULTIPLE_INSTANCE" num_pb="1"> + <input name="a" num_pins="4"/> + <input name="b" num_pins="4"/> + <input name="c" num_pins="4"/> + <input name="cin" num_pins="1"/> + <input name="d" num_pins="4"/> + <output name="cout" num_pins="1"/> + <output name="sum" num_pins="8"/> + <pb_type blif_model=".subckt adder" name="comba" num_pb="4"> + <xi:include href="../fig41-full-adder/adder.pb_type.xml" xpointer="xpointer(pb_type/child::node())"/> + </pb_type> + <pb_type blif_model=".subckt adder" name="combb" num_pb="4"> + <xi:include href="../fig41-full-adder/adder.pb_type.xml" xpointer="xpointer(pb_type/child::node())"/> </pb_type> <interconnect> <direct> - <port name="a[0]" type="input"/> - <port from="adder[0]" name="a" type="output"/> - </direct> - <direct> - <port name="b[0]" type="input"/> - <port from="adder[0]" name="b" type="output"/> - </direct> - <direct> - <port name="cin[0]" type="input"/> - <port from="adder[0]" name="cin" type="output"/> - </direct> - <direct> - <port from="adder[0]" name="cout" type="input"/> - <port name="cout[0]" type="output"/> - </direct> - <direct> - <port from="adder[0]" name="sum" type="input"/> - <port name="sum[0]" type="output"/> - </direct> - <direct> - <port name="a[10]" type="input"/> - <port from="adder[1]" name="a" type="output"/> - </direct> - <direct> - <port name="b[10]" type="input"/> - <port from="adder[1]" name="b" type="output"/> - </direct> - <direct> - <port name="cin[10]" type="input"/> - <port from="adder[1]" name="cin" type="output"/> - </direct> - <direct> - <port from="adder[1]" name="cout" type="input"/> - <port name="cout[10]" type="output"/> - </direct> - <direct> - <port from="adder[1]" name="sum" type="input"/> - <port name="sum[10]" type="output"/> - </direct> - <direct> - <port name="a[11]" type="input"/> - <port from="adder[2]" name="a" type="output"/> - </direct> - <direct> - <port name="b[11]" type="input"/> - <port from="adder[2]" name="b" type="output"/> - </direct> - <direct> - <port name="cin[11]" type="input"/> - <port from="adder[2]" name="cin" type="output"/> - </direct> - <direct> - <port from="adder[2]" name="cout" type="input"/> - <port name="cout[11]" type="output"/> - </direct> - <direct> - <port from="adder[2]" name="sum" type="input"/> - <port name="sum[11]" type="output"/> - </direct> - <direct> - <port name="a[12]" type="input"/> - <port from="adder[3]" name="a" type="output"/> - </direct> - <direct> - <port name="b[12]" type="input"/> - <port from="adder[3]" name="b" type="output"/> - </direct> - <direct> - <port name="cin[12]" type="input"/> - <port from="adder[3]" name="cin" type="output"/> - </direct> - <direct> - <port from="adder[3]" name="cout" type="input"/> - <port name="cout[12]" type="output"/> - </direct> - <direct> - <port from="adder[3]" name="sum" type="input"/> - <port name="sum[12]" type="output"/> - </direct> - <direct> - <port name="a[13]" type="input"/> - <port from="adder[4]" name="a" type="output"/> - </direct> - <direct> - <port name="b[13]" type="input"/> - <port from="adder[4]" name="b" type="output"/> - </direct> - <direct> - <port name="cin[13]" type="input"/> - <port from="adder[4]" name="cin" type="output"/> - </direct> - <direct> - <port from="adder[4]" name="cout" type="input"/> - <port name="cout[13]" type="output"/> - </direct> - <direct> - <port from="adder[4]" name="sum" type="input"/> - <port name="sum[13]" type="output"/> - </direct> - <direct> - <port name="a[14]" type="input"/> - <port from="adder[5]" name="a" type="output"/> - </direct> - <direct> - <port name="b[14]" type="input"/> - <port from="adder[5]" name="b" type="output"/> - </direct> - <direct> - <port name="cin[14]" type="input"/> - <port from="adder[5]" name="cin" type="output"/> - </direct> - <direct> - <port from="adder[5]" name="cout" type="input"/> - <port name="cout[14]" type="output"/> - </direct> - <direct> - <port from="adder[5]" name="sum" type="input"/> - <port name="sum[14]" type="output"/> - </direct> - <direct> - <port name="a[15]" type="input"/> - <port from="adder[6]" name="a" type="output"/> - </direct> - <direct> - <port name="b[15]" type="input"/> - <port from="adder[6]" name="b" type="output"/> - </direct> - <direct> - <port name="cin[15]" type="input"/> - <port from="adder[6]" name="cin" type="output"/> - </direct> - <direct> - <port from="adder[6]" name="cout" type="input"/> - <port name="cout[15]" type="output"/> - </direct> - <direct> - <port from="adder[6]" name="sum" type="input"/> - <port name="sum[15]" type="output"/> - </direct> - <direct> - <port name="a[16]" type="input"/> - <port from="adder[7]" name="a" type="output"/> - </direct> - <direct> - <port name="b[16]" type="input"/> - <port from="adder[7]" name="b" type="output"/> - </direct> - <direct> - <port name="cin[16]" type="input"/> - <port from="adder[7]" name="cin" type="output"/> - </direct> - <direct> - <port from="adder[7]" name="cout" type="input"/> - <port name="cout[16]" type="output"/> - </direct> - <direct> - <port from="adder[7]" name="sum" type="input"/> - <port name="sum[16]" type="output"/> - </direct> - <direct> - <port name="a[17]" type="input"/> - <port from="adder[8]" name="a" type="output"/> - </direct> - <direct> - <port name="b[17]" type="input"/> - <port from="adder[8]" name="b" type="output"/> - </direct> - <direct> - <port name="cin[17]" type="input"/> - <port from="adder[8]" name="cin" type="output"/> - </direct> - <direct> - <port from="adder[8]" name="cout" type="input"/> - <port name="cout[17]" type="output"/> - </direct> - <direct> - <port from="adder[8]" name="sum" type="input"/> - <port name="sum[17]" type="output"/> - </direct> - <direct> - <port name="a[18]" type="input"/> - <port from="adder[9]" name="a" type="output"/> - </direct> - <direct> - <port name="b[18]" type="input"/> - <port from="adder[9]" name="b" type="output"/> - </direct> - <direct> - <port name="cin[18]" type="input"/> - <port from="adder[9]" name="cin" type="output"/> - </direct> - <direct> - <port from="adder[9]" name="cout" type="input"/> - <port name="cout[18]" type="output"/> - </direct> - <direct> - <port from="adder[9]" name="sum" type="input"/> - <port name="sum[18]" type="output"/> - </direct> - <direct> - <port name="a[19]" type="input"/> - <port from="adder[10]" name="a" type="output"/> - </direct> - <direct> - <port name="b[19]" type="input"/> - <port from="adder[10]" name="b" type="output"/> - </direct> - <direct> - <port name="cin[19]" type="input"/> - <port from="adder[10]" name="cin" type="output"/> - </direct> - <direct> - <port from="adder[10]" name="cout" type="input"/> - <port name="cout[19]" type="output"/> - </direct> - <direct> - <port from="adder[10]" name="sum" type="input"/> - <port name="sum[19]" type="output"/> - </direct> - <direct> - <port name="a[1]" type="input"/> - <port from="adder[11]" name="a" type="output"/> - </direct> - <direct> - <port name="b[1]" type="input"/> - <port from="adder[11]" name="b" type="output"/> - </direct> - <direct> - <port name="cin[1]" type="input"/> - <port from="adder[11]" name="cin" type="output"/> - </direct> - <direct> - <port from="adder[11]" name="cout" type="input"/> - <port name="cout[1]" type="output"/> - </direct> - <direct> - <port from="adder[11]" name="sum" type="input"/> - <port name="sum[1]" type="output"/> - </direct> - <direct> - <port name="a[20]" type="input"/> - <port from="adder[12]" name="a" type="output"/> - </direct> - <direct> - <port name="b[20]" type="input"/> - <port from="adder[12]" name="b" type="output"/> - </direct> - <direct> - <port name="cin[20]" type="input"/> - <port from="adder[12]" name="cin" type="output"/> - </direct> - <direct> - <port from="adder[12]" name="cout" type="input"/> - <port name="cout[20]" type="output"/> - </direct> - <direct> - <port from="adder[12]" name="sum" type="input"/> - <port name="sum[20]" type="output"/> - </direct> - <direct> - <port name="a[21]" type="input"/> - <port from="adder[13]" name="a" type="output"/> - </direct> - <direct> - <port name="b[21]" type="input"/> - <port from="adder[13]" name="b" type="output"/> - </direct> - <direct> - <port name="cin[21]" type="input"/> - <port from="adder[13]" name="cin" type="output"/> - </direct> - <direct> - <port from="adder[13]" name="cout" type="input"/> - <port name="cout[21]" type="output"/> - </direct> - <direct> - <port from="adder[13]" name="sum" type="input"/> - <port name="sum[21]" type="output"/> - </direct> - <direct> - <port name="a[22]" type="input"/> - <port from="adder[14]" name="a" type="output"/> - </direct> - <direct> - <port name="b[22]" type="input"/> - <port from="adder[14]" name="b" type="output"/> - </direct> - <direct> - <port name="cin[22]" type="input"/> - <port from="adder[14]" name="cin" type="output"/> - </direct> - <direct> - <port from="adder[14]" name="cout" type="input"/> - <port name="cout[22]" type="output"/> - </direct> - <direct> - <port from="adder[14]" name="sum" type="input"/> - <port name="sum[22]" type="output"/> - </direct> - <direct> - <port name="a[23]" type="input"/> - <port from="adder[15]" name="a" type="output"/> - </direct> - <direct> - <port name="b[23]" type="input"/> - <port from="adder[15]" name="b" type="output"/> - </direct> - <direct> - <port name="cin[23]" type="input"/> - <port from="adder[15]" name="cin" type="output"/> - </direct> - <direct> - <port from="adder[15]" name="cout" type="input"/> - <port name="cout[23]" type="output"/> - </direct> - <direct> - <port from="adder[15]" name="sum" type="input"/> - <port name="sum[23]" type="output"/> - </direct> - <direct> - <port name="a[24]" type="input"/> - <port from="adder[16]" name="a" type="output"/> - </direct> - <direct> - <port name="b[24]" type="input"/> - <port from="adder[16]" name="b" type="output"/> - </direct> - <direct> - <port name="cin[24]" type="input"/> - <port from="adder[16]" name="cin" type="output"/> - </direct> - <direct> - <port from="adder[16]" name="cout" type="input"/> - <port name="cout[24]" type="output"/> - </direct> - <direct> - <port from="adder[16]" name="sum" type="input"/> - <port name="sum[24]" type="output"/> - </direct> - <direct> - <port name="a[25]" type="input"/> - <port from="adder[17]" name="a" type="output"/> - </direct> - <direct> - <port name="b[25]" type="input"/> - <port from="adder[17]" name="b" type="output"/> - </direct> - <direct> - <port name="cin[25]" type="input"/> - <port from="adder[17]" name="cin" type="output"/> - </direct> - <direct> - <port from="adder[17]" name="cout" type="input"/> - <port name="cout[25]" type="output"/> - </direct> - <direct> - <port from="adder[17]" name="sum" type="input"/> - <port name="sum[25]" type="output"/> - </direct> - <direct> - <port name="a[26]" type="input"/> - <port from="adder[18]" name="a" type="output"/> - </direct> - <direct> - <port name="b[26]" type="input"/> - <port from="adder[18]" name="b" type="output"/> - </direct> - <direct> - <port name="cin[26]" type="input"/> - <port from="adder[18]" name="cin" type="output"/> - </direct> - <direct> - <port from="adder[18]" name="cout" type="input"/> - <port name="cout[26]" type="output"/> - </direct> - <direct> - <port from="adder[18]" name="sum" type="input"/> - <port name="sum[26]" type="output"/> - </direct> - <direct> - <port name="a[27]" type="input"/> - <port from="adder[19]" name="a" type="output"/> - </direct> - <direct> - <port name="b[27]" type="input"/> - <port from="adder[19]" name="b" type="output"/> - </direct> - <direct> - <port name="cin[27]" type="input"/> - <port from="adder[19]" name="cin" type="output"/> - </direct> - <direct> - <port from="adder[19]" name="cout" type="input"/> - <port name="cout[27]" type="output"/> - </direct> - <direct> - <port from="adder[19]" name="sum" type="input"/> - <port name="sum[27]" type="output"/> - </direct> - <direct> - <port name="a[28]" type="input"/> - <port from="adder[20]" name="a" type="output"/> - </direct> - <direct> - <port name="b[28]" type="input"/> - <port from="adder[20]" name="b" type="output"/> - </direct> - <direct> - <port name="cin[28]" type="input"/> - <port from="adder[20]" name="cin" type="output"/> - </direct> - <direct> - <port from="adder[20]" name="cout" type="input"/> - <port name="cout[28]" type="output"/> - </direct> - <direct> - <port from="adder[20]" name="sum" type="input"/> - <port name="sum[28]" type="output"/> - </direct> - <direct> - <port name="a[29]" type="input"/> - <port from="adder[21]" name="a" type="output"/> - </direct> - <direct> - <port name="b[29]" type="input"/> - <port from="adder[21]" name="b" type="output"/> - </direct> - <direct> - <port name="cin[29]" type="input"/> - <port from="adder[21]" name="cin" type="output"/> - </direct> - <direct> - <port from="adder[21]" name="cout" type="input"/> - <port name="cout[29]" type="output"/> - </direct> - <direct> - <port from="adder[21]" name="sum" type="input"/> - <port name="sum[29]" type="output"/> - </direct> - <direct> - <port name="a[2]" type="input"/> - <port from="adder[22]" name="a" type="output"/> - </direct> - <direct> - <port name="b[2]" type="input"/> - <port from="adder[22]" name="b" type="output"/> - </direct> - <direct> - <port name="cin[2]" type="input"/> - <port from="adder[22]" name="cin" type="output"/> - </direct> - <direct> - <port from="adder[22]" name="cout" type="input"/> - <port name="cout[2]" type="output"/> - </direct> - <direct> - <port from="adder[22]" name="sum" type="input"/> - <port name="sum[2]" type="output"/> - </direct> - <direct> - <port name="a[30]" type="input"/> - <port from="adder[23]" name="a" type="output"/> - </direct> - <direct> - <port name="b[30]" type="input"/> - <port from="adder[23]" name="b" type="output"/> - </direct> - <direct> - <port name="cin[30]" type="input"/> - <port from="adder[23]" name="cin" type="output"/> - </direct> - <direct> - <port from="adder[23]" name="cout" type="input"/> - <port name="cout[30]" type="output"/> - </direct> - <direct> - <port from="adder[23]" name="sum" type="input"/> - <port name="sum[30]" type="output"/> - </direct> - <direct> - <port name="a[31]" type="input"/> - <port from="adder[24]" name="a" type="output"/> - </direct> - <direct> - <port name="b[31]" type="input"/> - <port from="adder[24]" name="b" type="output"/> - </direct> - <direct> - <port name="cin[31]" type="input"/> - <port from="adder[24]" name="cin" type="output"/> - </direct> - <direct> - <port from="adder[24]" name="cout" type="input"/> - <port name="cout[31]" type="output"/> - </direct> - <direct> - <port from="adder[24]" name="sum" type="input"/> - <port name="sum[31]" type="output"/> - </direct> - <direct> - <port name="a[32]" type="input"/> - <port from="adder[25]" name="a" type="output"/> - </direct> - <direct> - <port name="b[32]" type="input"/> - <port from="adder[25]" name="b" type="output"/> - </direct> - <direct> - <port name="cin[32]" type="input"/> - <port from="adder[25]" name="cin" type="output"/> - </direct> - <direct> - <port from="adder[25]" name="cout" type="input"/> - <port name="cout[32]" type="output"/> - </direct> - <direct> - <port from="adder[25]" name="sum" type="input"/> - <port name="sum[32]" type="output"/> - </direct> - <direct> - <port name="a[33]" type="input"/> - <port from="adder[26]" name="a" type="output"/> - </direct> - <direct> - <port name="b[33]" type="input"/> - <port from="adder[26]" name="b" type="output"/> - </direct> - <direct> - <port name="cin[33]" type="input"/> - <port from="adder[26]" name="cin" type="output"/> - </direct> - <direct> - <port from="adder[26]" name="cout" type="input"/> - <port name="cout[33]" type="output"/> - </direct> - <direct> - <port from="adder[26]" name="sum" type="input"/> - <port name="sum[33]" type="output"/> - </direct> - <direct> - <port name="a[34]" type="input"/> - <port from="adder[27]" name="a" type="output"/> - </direct> - <direct> - <port name="b[34]" type="input"/> - <port from="adder[27]" name="b" type="output"/> - </direct> - <direct> - <port name="cin[34]" type="input"/> - <port from="adder[27]" name="cin" type="output"/> - </direct> - <direct> - <port from="adder[27]" name="cout" type="input"/> - <port name="cout[34]" type="output"/> - </direct> - <direct> - <port from="adder[27]" name="sum" type="input"/> - <port name="sum[34]" type="output"/> - </direct> - <direct> - <port name="a[35]" type="input"/> - <port from="adder[28]" name="a" type="output"/> - </direct> - <direct> - <port name="b[35]" type="input"/> - <port from="adder[28]" name="b" type="output"/> - </direct> - <direct> - <port name="cin[35]" type="input"/> - <port from="adder[28]" name="cin" type="output"/> - </direct> - <direct> - <port from="adder[28]" name="cout" type="input"/> - <port name="cout[35]" type="output"/> - </direct> - <direct> - <port from="adder[28]" name="sum" type="input"/> - <port name="sum[35]" type="output"/> - </direct> - <direct> - <port name="a[36]" type="input"/> - <port from="adder[29]" name="a" type="output"/> - </direct> - <direct> - <port name="b[36]" type="input"/> - <port from="adder[29]" name="b" type="output"/> - </direct> - <direct> - <port name="cin[36]" type="input"/> - <port from="adder[29]" name="cin" type="output"/> - </direct> - <direct> - <port from="adder[29]" name="cout" type="input"/> - <port name="cout[36]" type="output"/> - </direct> - <direct> - <port from="adder[29]" name="sum" type="input"/> - <port name="sum[36]" type="output"/> - </direct> - <direct> - <port name="a[37]" type="input"/> - <port from="adder[30]" name="a" type="output"/> - </direct> - <direct> - <port name="b[37]" type="input"/> - <port from="adder[30]" name="b" type="output"/> - </direct> - <direct> - <port name="cin[37]" type="input"/> - <port from="adder[30]" name="cin" type="output"/> - </direct> - <direct> - <port from="adder[30]" name="cout" type="input"/> - <port name="cout[37]" type="output"/> - </direct> - <direct> - <port from="adder[30]" name="sum" type="input"/> - <port name="sum[37]" type="output"/> - </direct> - <direct> - <port name="a[38]" type="input"/> - <port from="adder[31]" name="a" type="output"/> - </direct> - <direct> - <port name="b[38]" type="input"/> - <port from="adder[31]" name="b" type="output"/> - </direct> - <direct> - <port name="cin[38]" type="input"/> - <port from="adder[31]" name="cin" type="output"/> - </direct> - <direct> - <port from="adder[31]" name="cout" type="input"/> - <port name="cout[38]" type="output"/> - </direct> - <direct> - <port from="adder[31]" name="sum" type="input"/> - <port name="sum[38]" type="output"/> - </direct> - <direct> - <port name="a[39]" type="input"/> - <port from="adder[32]" name="a" type="output"/> - </direct> - <direct> - <port name="b[39]" type="input"/> - <port from="adder[32]" name="b" type="output"/> - </direct> - <direct> - <port name="cin[39]" type="input"/> - <port from="adder[32]" name="cin" type="output"/> - </direct> - <direct> - <port from="adder[32]" name="cout" type="input"/> - <port name="cout[39]" type="output"/> - </direct> - <direct> - <port from="adder[32]" name="sum" type="input"/> - <port name="sum[39]" type="output"/> - </direct> - <direct> <port name="a[3]" type="input"/> - <port from="adder[33]" name="a" type="output"/> + <port from="comba[3]" name="a" type="output"/> </direct> <direct> <port name="b[3]" type="input"/> - <port from="adder[33]" name="b" type="output"/> + <port from="comba[3]" name="b" type="output"/> </direct> <direct> - <port name="cin[3]" type="input"/> - <port from="adder[33]" name="cin" type="output"/> + <port name="cin" type="input"/> + <port from="comba[0]" name="cin" type="output"/> </direct> <direct> - <port from="adder[33]" name="cout" type="input"/> - <port name="cout[3]" type="output"/> + <port name="cin" type="input"/> + <port from="comba[1]" name="cin" type="output"/> </direct> <direct> - <port from="adder[33]" name="sum" type="input"/> + <port name="cin" type="input"/> + <port from="comba[2]" name="cin" type="output"/> + </direct> + <direct> + <port name="cin" type="input"/> + <port from="comba[3]" name="cin" type="output"/> + </direct> + <direct> + <port from="comba[3]" name="sum" type="input"/> <port name="sum[3]" type="output"/> </direct> <direct> - <port name="a[40]" type="input"/> - <port from="adder[34]" name="a" type="output"/> + <port name="a[0]" type="input"/> + <port from="comba[0]" name="a" type="output"/> </direct> <direct> - <port name="b[40]" type="input"/> - <port from="adder[34]" name="b" type="output"/> + <port name="b[0]" type="input"/> + <port from="comba[0]" name="b" type="output"/> </direct> <direct> - <port name="cin[40]" type="input"/> - <port from="adder[34]" name="cin" type="output"/> + <port from="comba[0]" name="sum" type="input"/> + <port name="sum[0]" type="output"/> </direct> <direct> - <port from="adder[34]" name="cout" type="input"/> - <port name="cout[40]" type="output"/> + <port name="a[1]" type="input"/> + <port from="comba[1]" name="a" type="output"/> </direct> <direct> - <port from="adder[34]" name="sum" type="input"/> - <port name="sum[40]" type="output"/> + <port name="b[1]" type="input"/> + <port from="comba[1]" name="b" type="output"/> </direct> <direct> - <port name="a[41]" type="input"/> - <port from="adder[35]" name="a" type="output"/> + <port from="comba[1]" name="sum" type="input"/> + <port name="sum[1]" type="output"/> </direct> <direct> - <port name="b[41]" type="input"/> - <port from="adder[35]" name="b" type="output"/> + <port name="a[2]" type="input"/> + <port from="comba[2]" name="a" type="output"/> </direct> <direct> - <port name="cin[41]" type="input"/> - <port from="adder[35]" name="cin" type="output"/> + <port name="b[2]" type="input"/> + <port from="comba[2]" name="b" type="output"/> </direct> <direct> - <port from="adder[35]" name="cout" type="input"/> - <port name="cout[41]" type="output"/> + <port from="comba[2]" name="sum" type="input"/> + <port name="sum[2]" type="output"/> </direct> <direct> - <port from="adder[35]" name="sum" type="input"/> - <port name="sum[41]" type="output"/> + <port name="c[0]" type="input"/> + <port from="combb[0]" name="a" type="output"/> </direct> <direct> - <port name="a[42]" type="input"/> - <port from="adder[36]" name="a" type="output"/> + <port name="d[0]" type="input"/> + <port from="combb[0]" name="b" type="output"/> </direct> <direct> - <port name="b[42]" type="input"/> - <port from="adder[36]" name="b" type="output"/> + <port from="comba[0]" name="cout" type="input"/> + <port from="combb[0]" name="cin" type="output"/> + <pack_pattern name="ADDER" type="carry"> + <port from="comba[0]" name="cout" type="input"/> + <port from="combb[0]" name="cin" type="output"/> + </pack_pattern> </direct> <direct> - <port name="cin[42]" type="input"/> - <port from="adder[36]" name="cin" type="output"/> - </direct> - <direct> - <port from="adder[36]" name="cout" type="input"/> - <port name="cout[42]" type="output"/> - </direct> - <direct> - <port from="adder[36]" name="sum" type="input"/> - <port name="sum[42]" type="output"/> - </direct> - <direct> - <port name="a[43]" type="input"/> - <port from="adder[37]" name="a" type="output"/> - </direct> - <direct> - <port name="b[43]" type="input"/> - <port from="adder[37]" name="b" type="output"/> - </direct> - <direct> - <port name="cin[43]" type="input"/> - <port from="adder[37]" name="cin" type="output"/> - </direct> - <direct> - <port from="adder[37]" name="cout" type="input"/> - <port name="cout[43]" type="output"/> - </direct> - <direct> - <port from="adder[37]" name="sum" type="input"/> - <port name="sum[43]" type="output"/> - </direct> - <direct> - <port name="a[44]" type="input"/> - <port from="adder[38]" name="a" type="output"/> - </direct> - <direct> - <port name="b[44]" type="input"/> - <port from="adder[38]" name="b" type="output"/> - </direct> - <direct> - <port name="cin[44]" type="input"/> - <port from="adder[38]" name="cin" type="output"/> - </direct> - <direct> - <port from="adder[38]" name="cout" type="input"/> - <port name="cout[44]" type="output"/> - </direct> - <direct> - <port from="adder[38]" name="sum" type="input"/> - <port name="sum[44]" type="output"/> - </direct> - <direct> - <port name="a[45]" type="input"/> - <port from="adder[39]" name="a" type="output"/> - </direct> - <direct> - <port name="b[45]" type="input"/> - <port from="adder[39]" name="b" type="output"/> - </direct> - <direct> - <port name="cin[45]" type="input"/> - <port from="adder[39]" name="cin" type="output"/> - </direct> - <direct> - <port from="adder[39]" name="cout" type="input"/> - <port name="cout[45]" type="output"/> - </direct> - <direct> - <port from="adder[39]" name="sum" type="input"/> - <port name="sum[45]" type="output"/> - </direct> - <direct> - <port name="a[46]" type="input"/> - <port from="adder[40]" name="a" type="output"/> - </direct> - <direct> - <port name="b[46]" type="input"/> - <port from="adder[40]" name="b" type="output"/> - </direct> - <direct> - <port name="cin[46]" type="input"/> - <port from="adder[40]" name="cin" type="output"/> - </direct> - <direct> - <port from="adder[40]" name="cout" type="input"/> - <port name="cout[46]" type="output"/> - </direct> - <direct> - <port from="adder[40]" name="sum" type="input"/> - <port name="sum[46]" type="output"/> - </direct> - <direct> - <port name="a[47]" type="input"/> - <port from="adder[41]" name="a" type="output"/> - </direct> - <direct> - <port name="b[47]" type="input"/> - <port from="adder[41]" name="b" type="output"/> - </direct> - <direct> - <port name="cin[47]" type="input"/> - <port from="adder[41]" name="cin" type="output"/> - </direct> - <direct> - <port from="adder[41]" name="cout" type="input"/> - <port name="cout[47]" type="output"/> - </direct> - <direct> - <port from="adder[41]" name="sum" type="input"/> - <port name="sum[47]" type="output"/> - </direct> - <direct> - <port name="a[48]" type="input"/> - <port from="adder[42]" name="a" type="output"/> - </direct> - <direct> - <port name="b[48]" type="input"/> - <port from="adder[42]" name="b" type="output"/> - </direct> - <direct> - <port name="cin[48]" type="input"/> - <port from="adder[42]" name="cin" type="output"/> - </direct> - <direct> - <port from="adder[42]" name="cout" type="input"/> - <port name="cout[48]" type="output"/> - </direct> - <direct> - <port from="adder[42]" name="sum" type="input"/> - <port name="sum[48]" type="output"/> - </direct> - <direct> - <port name="a[49]" type="input"/> - <port from="adder[43]" name="a" type="output"/> - </direct> - <direct> - <port name="b[49]" type="input"/> - <port from="adder[43]" name="b" type="output"/> - </direct> - <direct> - <port name="cin[49]" type="input"/> - <port from="adder[43]" name="cin" type="output"/> - </direct> - <direct> - <port from="adder[43]" name="cout" type="input"/> - <port name="cout[49]" type="output"/> - </direct> - <direct> - <port from="adder[43]" name="sum" type="input"/> - <port name="sum[49]" type="output"/> - </direct> - <direct> - <port name="a[4]" type="input"/> - <port from="adder[44]" name="a" type="output"/> - </direct> - <direct> - <port name="b[4]" type="input"/> - <port from="adder[44]" name="b" type="output"/> - </direct> - <direct> - <port name="cin[4]" type="input"/> - <port from="adder[44]" name="cin" type="output"/> - </direct> - <direct> - <port from="adder[44]" name="cout" type="input"/> - <port name="cout[4]" type="output"/> - </direct> - <direct> - <port from="adder[44]" name="sum" type="input"/> + <port from="combb[0]" name="sum" type="input"/> <port name="sum[4]" type="output"/> </direct> <direct> - <port name="a[50]" type="input"/> - <port from="adder[45]" name="a" type="output"/> + <port name="c[1]" type="input"/> + <port from="combb[1]" name="a" type="output"/> </direct> <direct> - <port name="b[50]" type="input"/> - <port from="adder[45]" name="b" type="output"/> + <port name="d[1]" type="input"/> + <port from="combb[1]" name="b" type="output"/> </direct> <direct> - <port name="cin[50]" type="input"/> - <port from="adder[45]" name="cin" type="output"/> + <port from="comba[1]" name="cout" type="input"/> + <port from="combb[1]" name="cin" type="output"/> + <pack_pattern name="ADDER" type="carry"> + <port from="comba[1]" name="cout" type="input"/> + <port from="combb[1]" name="cin" type="output"/> + </pack_pattern> </direct> <direct> - <port from="adder[45]" name="cout" type="input"/> - <port name="cout[50]" type="output"/> - </direct> - <direct> - <port from="adder[45]" name="sum" type="input"/> - <port name="sum[50]" type="output"/> - </direct> - <direct> - <port name="a[51]" type="input"/> - <port from="adder[46]" name="a" type="output"/> - </direct> - <direct> - <port name="b[51]" type="input"/> - <port from="adder[46]" name="b" type="output"/> - </direct> - <direct> - <port name="cin[51]" type="input"/> - <port from="adder[46]" name="cin" type="output"/> - </direct> - <direct> - <port from="adder[46]" name="cout" type="input"/> - <port name="cout[51]" type="output"/> - </direct> - <direct> - <port from="adder[46]" name="sum" type="input"/> - <port name="sum[51]" type="output"/> - </direct> - <direct> - <port name="a[52]" type="input"/> - <port from="adder[47]" name="a" type="output"/> - </direct> - <direct> - <port name="b[52]" type="input"/> - <port from="adder[47]" name="b" type="output"/> - </direct> - <direct> - <port name="cin[52]" type="input"/> - <port from="adder[47]" name="cin" type="output"/> - </direct> - <direct> - <port from="adder[47]" name="cout" type="input"/> - <port name="cout[52]" type="output"/> - </direct> - <direct> - <port from="adder[47]" name="sum" type="input"/> - <port name="sum[52]" type="output"/> - </direct> - <direct> - <port name="a[53]" type="input"/> - <port from="adder[48]" name="a" type="output"/> - </direct> - <direct> - <port name="b[53]" type="input"/> - <port from="adder[48]" name="b" type="output"/> - </direct> - <direct> - <port name="cin[53]" type="input"/> - <port from="adder[48]" name="cin" type="output"/> - </direct> - <direct> - <port from="adder[48]" name="cout" type="input"/> - <port name="cout[53]" type="output"/> - </direct> - <direct> - <port from="adder[48]" name="sum" type="input"/> - <port name="sum[53]" type="output"/> - </direct> - <direct> - <port name="a[54]" type="input"/> - <port from="adder[49]" name="a" type="output"/> - </direct> - <direct> - <port name="b[54]" type="input"/> - <port from="adder[49]" name="b" type="output"/> - </direct> - <direct> - <port name="cin[54]" type="input"/> - <port from="adder[49]" name="cin" type="output"/> - </direct> - <direct> - <port from="adder[49]" name="cout" type="input"/> - <port name="cout[54]" type="output"/> - </direct> - <direct> - <port from="adder[49]" name="sum" type="input"/> - <port name="sum[54]" type="output"/> - </direct> - <direct> - <port name="a[55]" type="input"/> - <port from="adder[50]" name="a" type="output"/> - </direct> - <direct> - <port name="b[55]" type="input"/> - <port from="adder[50]" name="b" type="output"/> - </direct> - <direct> - <port name="cin[55]" type="input"/> - <port from="adder[50]" name="cin" type="output"/> - </direct> - <direct> - <port from="adder[50]" name="cout" type="input"/> - <port name="cout[55]" type="output"/> - </direct> - <direct> - <port from="adder[50]" name="sum" type="input"/> - <port name="sum[55]" type="output"/> - </direct> - <direct> - <port name="a[56]" type="input"/> - <port from="adder[51]" name="a" type="output"/> - </direct> - <direct> - <port name="b[56]" type="input"/> - <port from="adder[51]" name="b" type="output"/> - </direct> - <direct> - <port name="cin[56]" type="input"/> - <port from="adder[51]" name="cin" type="output"/> - </direct> - <direct> - <port from="adder[51]" name="cout" type="input"/> - <port name="cout[56]" type="output"/> - </direct> - <direct> - <port from="adder[51]" name="sum" type="input"/> - <port name="sum[56]" type="output"/> - </direct> - <direct> - <port name="a[57]" type="input"/> - <port from="adder[52]" name="a" type="output"/> - </direct> - <direct> - <port name="b[57]" type="input"/> - <port from="adder[52]" name="b" type="output"/> - </direct> - <direct> - <port name="cin[57]" type="input"/> - <port from="adder[52]" name="cin" type="output"/> - </direct> - <direct> - <port from="adder[52]" name="cout" type="input"/> - <port name="cout[57]" type="output"/> - </direct> - <direct> - <port from="adder[52]" name="sum" type="input"/> - <port name="sum[57]" type="output"/> - </direct> - <direct> - <port name="a[58]" type="input"/> - <port from="adder[53]" name="a" type="output"/> - </direct> - <direct> - <port name="b[58]" type="input"/> - <port from="adder[53]" name="b" type="output"/> - </direct> - <direct> - <port name="cin[58]" type="input"/> - <port from="adder[53]" name="cin" type="output"/> - </direct> - <direct> - <port from="adder[53]" name="cout" type="input"/> - <port name="cout[58]" type="output"/> - </direct> - <direct> - <port from="adder[53]" name="sum" type="input"/> - <port name="sum[58]" type="output"/> - </direct> - <direct> - <port name="a[59]" type="input"/> - <port from="adder[54]" name="a" type="output"/> - </direct> - <direct> - <port name="b[59]" type="input"/> - <port from="adder[54]" name="b" type="output"/> - </direct> - <direct> - <port name="cin[59]" type="input"/> - <port from="adder[54]" name="cin" type="output"/> - </direct> - <direct> - <port from="adder[54]" name="cout" type="input"/> - <port name="cout[59]" type="output"/> - </direct> - <direct> - <port from="adder[54]" name="sum" type="input"/> - <port name="sum[59]" type="output"/> - </direct> - <direct> - <port name="a[5]" type="input"/> - <port from="adder[55]" name="a" type="output"/> - </direct> - <direct> - <port name="b[5]" type="input"/> - <port from="adder[55]" name="b" type="output"/> - </direct> - <direct> - <port name="cin[5]" type="input"/> - <port from="adder[55]" name="cin" type="output"/> - </direct> - <direct> - <port from="adder[55]" name="cout" type="input"/> - <port name="cout[5]" type="output"/> - </direct> - <direct> - <port from="adder[55]" name="sum" type="input"/> + <port from="combb[1]" name="sum" type="input"/> <port name="sum[5]" type="output"/> </direct> <direct> - <port name="a[60]" type="input"/> - <port from="adder[56]" name="a" type="output"/> + <port name="c[2]" type="input"/> + <port from="combb[2]" name="a" type="output"/> </direct> <direct> - <port name="b[60]" type="input"/> - <port from="adder[56]" name="b" type="output"/> + <port name="d[2]" type="input"/> + <port from="combb[2]" name="b" type="output"/> </direct> <direct> - <port name="cin[60]" type="input"/> - <port from="adder[56]" name="cin" type="output"/> + <port from="comba[2]" name="cout" type="input"/> + <port from="combb[2]" name="cin" type="output"/> + <pack_pattern name="ADDER" type="carry"> + <port from="comba[2]" name="cout" type="input"/> + <port from="combb[2]" name="cin" type="output"/> + </pack_pattern> </direct> <direct> - <port from="adder[56]" name="cout" type="input"/> - <port name="cout[60]" type="output"/> - </direct> - <direct> - <port from="adder[56]" name="sum" type="input"/> - <port name="sum[60]" type="output"/> - </direct> - <direct> - <port name="a[61]" type="input"/> - <port from="adder[57]" name="a" type="output"/> - </direct> - <direct> - <port name="b[61]" type="input"/> - <port from="adder[57]" name="b" type="output"/> - </direct> - <direct> - <port name="cin[61]" type="input"/> - <port from="adder[57]" name="cin" type="output"/> - </direct> - <direct> - <port from="adder[57]" name="cout" type="input"/> - <port name="cout[61]" type="output"/> - </direct> - <direct> - <port from="adder[57]" name="sum" type="input"/> - <port name="sum[61]" type="output"/> - </direct> - <direct> - <port name="a[62]" type="input"/> - <port from="adder[58]" name="a" type="output"/> - </direct> - <direct> - <port name="b[62]" type="input"/> - <port from="adder[58]" name="b" type="output"/> - </direct> - <direct> - <port name="cin[62]" type="input"/> - <port from="adder[58]" name="cin" type="output"/> - </direct> - <direct> - <port from="adder[58]" name="cout" type="input"/> - <port name="cout[62]" type="output"/> - </direct> - <direct> - <port from="adder[58]" name="sum" type="input"/> - <port name="sum[62]" type="output"/> - </direct> - <direct> - <port name="a[63]" type="input"/> - <port from="adder[59]" name="a" type="output"/> - </direct> - <direct> - <port name="b[63]" type="input"/> - <port from="adder[59]" name="b" type="output"/> - </direct> - <direct> - <port name="cin[63]" type="input"/> - <port from="adder[59]" name="cin" type="output"/> - </direct> - <direct> - <port from="adder[59]" name="cout" type="input"/> - <port name="cout[63]" type="output"/> - </direct> - <direct> - <port from="adder[59]" name="sum" type="input"/> - <port name="sum[63]" type="output"/> - </direct> - <direct> - <port name="a[6]" type="input"/> - <port from="adder[60]" name="a" type="output"/> - </direct> - <direct> - <port name="b[6]" type="input"/> - <port from="adder[60]" name="b" type="output"/> - </direct> - <direct> - <port name="cin[6]" type="input"/> - <port from="adder[60]" name="cin" type="output"/> - </direct> - <direct> - <port from="adder[60]" name="cout" type="input"/> - <port name="cout[6]" type="output"/> - </direct> - <direct> - <port from="adder[60]" name="sum" type="input"/> + <port from="combb[2]" name="sum" type="input"/> <port name="sum[6]" type="output"/> </direct> <direct> - <port name="a[7]" type="input"/> - <port from="adder[61]" name="a" type="output"/> + <port name="c[3]" type="input"/> + <port from="combb[3]" name="a" type="output"/> </direct> <direct> - <port name="b[7]" type="input"/> - <port from="adder[61]" name="b" type="output"/> + <port name="d[3]" type="input"/> + <port from="combb[3]" name="b" type="output"/> </direct> <direct> - <port name="cin[7]" type="input"/> - <port from="adder[61]" name="cin" type="output"/> + <port from="comba[3]" name="cout" type="input"/> + <port from="combb[3]" name="cin" type="output"/> + <pack_pattern name="ADDER" type="carry"> + <port from="comba[3]" name="cout" type="input"/> + <port from="combb[3]" name="cin" type="output"/> + </pack_pattern> </direct> <direct> - <port from="adder[61]" name="cout" type="input"/> - <port name="cout[7]" type="output"/> + <port from="combb[3]" name="cout" type="input"/> + <port name="cout" type="output"/> </direct> <direct> - <port from="adder[61]" name="sum" type="input"/> + <port from="combb[3]" name="sum" type="input"/> <port name="sum[7]" type="output"/> </direct> - <direct> - <port name="a[8]" type="input"/> - <port from="adder[62]" name="a" type="output"/> - </direct> - <direct> - <port name="b[8]" type="input"/> - <port from="adder[62]" name="b" type="output"/> - </direct> - <direct> - <port name="cin[8]" type="input"/> - <port from="adder[62]" name="cin" type="output"/> - </direct> - <direct> - <port from="adder[62]" name="cout" type="input"/> - <port name="cout[8]" type="output"/> - </direct> - <direct> - <port from="adder[62]" name="sum" type="input"/> - <port name="sum[8]" type="output"/> - </direct> - <direct> - <port name="a[9]" type="input"/> - <port from="adder[63]" name="a" type="output"/> - </direct> - <direct> - <port name="b[9]" type="input"/> - <port from="adder[63]" name="b" type="output"/> - </direct> - <direct> - <port name="cin[9]" type="input"/> - <port from="adder[63]" name="cin" type="output"/> - </direct> - <direct> - <port from="adder[63]" name="cout" type="input"/> - <port name="cout[9]" type="output"/> - </direct> - <direct> - <port from="adder[63]" name="sum" type="input"/> - <port name="sum[9]" type="output"/> - </direct> </interconnect> </pb_type>
diff --git a/tests/multiple_instance/multiple_instance.sim.v b/tests/multiple_instance/multiple_instance.sim.v index b59c772..a30de12 100644 --- a/tests/multiple_instance/multiple_instance.sim.v +++ b/tests/multiple_instance/multiple_instance.sim.v
@@ -1,16 +1,29 @@ `include "../fig41-full-adder/adder.sim.v" -module multiple_instance (a, b, cin, cout, sum); - localparam DATA_WIDTH = 64; +module MULTIPLE_INSTANCE (a, b, c, d, cin, cout, sum); + localparam DATA_WIDTH = 4; input wire [DATA_WIDTH-1:0] a; input wire [DATA_WIDTH-1:0] b; - input wire [DATA_WIDTH-1:0] cin; - output wire [DATA_WIDTH-1:0] cout; - output wire [DATA_WIDTH-1:0] sum; + input wire [DATA_WIDTH-1:0] c; + input wire [DATA_WIDTH-1:0] d; + input wire cin; + output wire cout; + output wire [DATA_WIDTH*2-1:0] sum; + + wire [DATA_WIDTH-1:0] a2b; genvar i; - for(i=0; i<DATA_WIDTH; i=i+1) begin:gentest - adder comb (.a(a[i]), .b(b[i]), .cin(cin[i]), .cout(cout[i]), .sum(sum[i])); + for(i=0; i<DATA_WIDTH; i=i+1) begin + ADDER comba (.a(a[i]), .b(b[i]), .cin(cin), .cout(a2b[i]), .sum(sum[i])); + end + + genvar j; + for(j=0; j<DATA_WIDTH; j=j+1) begin + if ( j < DATA_WIDTH-1 ) begin + ADDER combb (.a(c[j]), .b(d[j]), .cin(a2b[j]), .sum(sum[DATA_WIDTH+j])); + end else begin + ADDER combb (.a(c[j]), .b(d[j]), .cin(a2b[j]), .cout(cout), .sum(sum[DATA_WIDTH+j])); + end end endmodule
diff --git a/tests/simple_pll/simple_pll.sim.v b/tests/simple_pll/simple_pll.sim.v index d8a0cb5..68ae816 100644 --- a/tests/simple_pll/simple_pll.sim.v +++ b/tests/simple_pll/simple_pll.sim.v
@@ -1,5 +1,5 @@ /* Simple model of a PLL which divides the input block by 64 */ -module simple_pll (in_clock, out_clock); +module SIMPLE_PLL (in_clock, out_clock); input wire in_clock;