Brian, with the following exploded setup I could finally instruct ISE to merge two 8-bit adders to create a 16-bit one and multiplex out the carry to get the half-carry. I don't know why my previous setups failed... It saves 4 slices in a SP3 instead of having two separate adders (the output mux is not considered) and the report indeed shows that the fanout of the half MUXCY is 2.
Regards.
---8out fanout Delay Delay Logical Name (Net Name) ---------------------------------------- ------------ IBUF:I->O 19 0.715 1.403 op_IBUF (op_IBUF) LUT2:I1->O 1 0.479 0.976 bl1 (bl) LUT2:I0->O 1 0.479 0.000 addsub1_yllut (N4) MUXCY:S->O 1 0.435 0.000 addsub1_ylcy (addsub1_yl_cyo) MUXCY:CI->O 1 0.056 0.000 addsub1_ylcy (addsub1_yl_cyo) MUXCY:CI->O 1 0.056 0.000 addsub1_ylcy (addsub1_yl_cyo) MUXCY:CI->O 1 0.056 0.000 addsub1_ylcy (addsub1_yl_cyo) MUXCY:CI->O 1 0.056 0.000 addsub1_ylcy (addsub1_yl_cyo) MUXCY:CI->O 1 0.056 0.000 addsub1_ylcy (addsub1_yl_cyo) MUXCY:CI->O 1 0.056 0.000 addsub1_ylcy (addsub1_yl_cyo) MUXCY:CI->O 2 0.056 0.000 addsub1_ylcy (d) MUXCY:CI->O 1 0.056 0.000 addsub1_yhcy (addsub1_yh_cyo) MUXCY:CI->O 1 0.056 0.000 addsub1_yhcy (addsub1_yh_cyo) MUXCY:CI->O 1 0.056 0.000 addsub1_yhcy (addsub1_yh_cyo) MUXCY:CI->O 1 0.056 0.000 addsub1_yhcy (addsub1_yh_cyo) MUXCY:CI->O 1 0.056 0.000 addsub1_yhcy (addsub1_yh_cyo) MUXCY:CI->O 1 0.056 0.000 addsub1_yhcy (addsub1_yh_cyo) MUXCY:CI->O 1 0.056 0.000 addsub1_yhcy (addsub1_yh_cyo) MUXCY:CI->O 1 0.265 0.976 addsub1_yhcy (e) LUT2:I0->O 1 0.479 0.681 c_out1 (c_out_OBUF) OBUF:I->O 4.909 c_out_OBUF (c_out) ---------------------------------------- Total 12.573ns (8.538ns logic, 4.035ns route) (67.9% logic, 32.1% route)
*/
/* Two separate adders */ module addsub2( op, oc, y, yl, a, b, c_in, c_out, h_out );
input op, oc; // 0: add, 1: sub output [`WIDTH-1:0] y; input [`WIDTH-1:0] a, b; input c_in; output c_out; output h_out;
output [`WIDTH/2-1:0] yl;
wire [`WIDTH/2-1:0] al = a[`WIDTH/2-1:0]; wire [`WIDTH-1:0] bs; wire [`WIDTH/2-1:0] bl; wire c = (!oc) ? 0 : (op) ? ~c_in : c_in; wire d, e;
assign bl = (op) ? ~b[`WIDTH/2-1:0] : b[`WIDTH/2-1:0]; assign bs = (op) ? ~b : b;
assign {d, yl} = al + bl + c; assign {e, y} = a + bs + c;
assign h_out = (op) ? ~d : d; assign c_out = (op) ? ~e : e;
endmodule
/
- =========================================================================
- =========================================================================
Synthesizing Unit . Related source file is "C:/src/pacoblaze/pacoblaze/addsub.v". Found 16-bit adder carry in/out for signal . Found 8-bit adder carry in/out for signal . Found 1-bit 4-to-1 multiplexer for signal . Summary: inferred 2 Adder/Subtractor(s). inferred 1 Multiplexer(s). Unit synthesized.
========================================================================= HDL Synthesis Report
Macro Statistics # Adders/Subtractors : 2 16-bit adder carry in/out : 1 8-bit adder carry in/out : 1 # Multiplexers : 1 1-bit 4-to-1 multiplexer : 1
=========================================================================
=========================================================================
- =========================================================================
========================================================================= Advanced HDL Synthesis Report
Macro Statistics # Adders/Subtractors : 2 16-bit adder carry in/out : 1 8-bit adder carry in/out : 1 # Multiplexers : 1 1-bit 4-to-1 multiplexer : 1
=========================================================================
=========================================================================
- =========================================================================
Loading device for application Rf_Device from file '3s200.nph' in environment C:\Xilinx.
Optimizing unit ...
Mapping all equations... Building and optimizing final netlist ... Found area constraint ratio of 100 (+ 5) on block addsub2, actual ratio is 1.
=========================================================================
- =========================================================================
Final Results RTL Top Level Output File Name : addsub2.ngr Top Level Output File Name : addsub2 Output Format : NGC Optimization Goal : Speed Keep Hierarchy : NO
Design Statistics # IOs : 61
Cell Usage : # BELS : 91 # LUT2 : 34 # LUT3 : 9 # MUXCY : 24 # XORCY : 24 # IO Buffers : 61 # IBUF : 35 # OBUF : 26 =========================================================================
Device utilization summary:
---------------------------
Selected Device : 3s200pq208-5
Number of Slices: 23 out of 1920 1% Number of 4 input LUTs: 43 out of 3840 1% Number of bonded IOBs: 61 out of 141 43%
========================================================================= TIMING REPORT
NOTE: THESE TIMING NUMBERS ARE ONLY A SYNTHESIS ESTIMATE. FOR ACCURATE TIMING INFORMATION PLEASE REFER TO THE TRACE REPORT GENERATED AFTER PLACE-and-ROUTE.
Clock Information:
------------------ No clock signals found in this design
Timing Summary:
--------------- Speed Grade: -5
Minimum period: No path found Minimum input arrival time before clock: No path found Maximum output required time after clock: No path found Maximum combinational path delay: 12.955ns
Timing Detail:
-------------- All values displayed in nanoseconds (ns)
========================================================================= Timing constraint: Default path analysis Total number of paths / destination ports: 1012 / 26
------------------------------------------------------------------------- Delay: 12.955ns (Levels of Logic = 21) Source: op (PAD) Destination: c_out (PAD)
Data Path: op to c_out Gate Net Cell:in->out fanout Delay Delay Logical Name (Net Name) ---------------------------------------- ------------ IBUF:I->O 27 0.715 1.721 op_IBUF (op_IBUF) LUT2:I1->O 2 0.479 1.040 bs1 (bs) LUT2:I0->O 1 0.479 0.000 addsub2_ylut (N4) MUXCY:S->O 1 0.435 0.000 addsub2_ycy (addsub2_y_cyo) MUXCY:CI->O 1 0.056 0.000 addsub2_ycy (addsub2_y_cyo) MUXCY:CI->O 1 0.056 0.000 addsub2_ycy (addsub2_y_cyo) MUXCY:CI->O 1 0.056 0.000 addsub2_ycy (addsub2_y_cyo) MUXCY:CI->O 1 0.056 0.000 addsub2_ycy (addsub2_y_cyo) MUXCY:CI->O 1 0.056 0.000 addsub2_ycy (addsub2_y_cyo) MUXCY:CI->O 1 0.056 0.000 addsub2_ycy (addsub2_y_cyo) MUXCY:CI->O 1 0.056 0.000 addsub2_ycy (addsub2_y_cyo) MUXCY:CI->O 1 0.056 0.000 addsub2_ycy (addsub2_y_cyo) MUXCY:CI->O 1 0.056 0.000 addsub2_ycy (addsub2_y_cyo) MUXCY:CI->O 1 0.056 0.000 addsub2_ycy (addsub2_y_cyo) MUXCY:CI->O 1 0.056 0.000 addsub2_ycy (addsub2_y_cyo) MUXCY:CI->O 1 0.056 0.000 addsub2_ycy (addsub2_y_cyo) MUXCY:CI->O 1 0.056 0.000 addsub2_ycy (addsub2_y_cyo) MUXCY:CI->O 1 0.056 0.000 addsub2_ycy (addsub2_y_cyo) MUXCY:CI->O 1 0.265 0.976 addsub2_ycy (e) LUT2:I0->O 1 0.479 0.681 c_out1 (c_out_OBUF) OBUF:I->O 4.909 c_out_OBUF (c_out) ---------------------------------------- Total 12.955ns (8.538ns logic, 4.418ns route) (65.9% logic, 34.1% route)
*/
-- PabloBleyerKocik / pablo /"It is a terrible thing to see and have no vision." @bleyer.org / -- Helen Keller