Repost: ISE Webpack 8.1 adder wierdness

It appears my 1st attempt didn't make it through :(

The first two examples produce 16 4-input LUTs on a Spartan 3 and the third produces only 8 4-input LUTs. Is there a way to get ISE to use only 8 LUTs without adding flipflops or resorting to a structural (XORCY, MUXCY, etc.) description?

Note: to use this as a subtract-with-borrow, invert the carry input.

module adder_test_16_luts_1(a, b, c, result); input[7:0] a, b; input c; output[8:0] result;

assign result = a + (~b) + c; endmodule

module adder_test_16_luts_2(a, b, c, result); input[7:0] a, b; input c; output[8:0] result;

wire[8:0] inv_b = ~b; assign result = a + inv_b + c; endmodule

module adder_test_8_luts(clk, a, b, c, result); input clk; input[7:0] a, b; input c; output[8:0] result;

reg[8:0] inv_b; always @(posedge clk) inv_b

Reply to
Todd Fleming
Loading thread data ...

Please ignore this copy; my previous post with some replies just appeared.

Todd

Todd Flem> It appears my 1st attempt didn't make it through :(

Reply to
Todd Fleming

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.