/*------------------------------------------------------------------------------
 * This code was generated by Spiral Multiplier Block Generator, www.spiral.net
 * Copyright (c) 2006, Carnegie Mellon University
 * All rights reserved.
 * The code is distributed under a BSD style license
 * (see http://www.opensource.org/licenses/bsd-license.php)
 *------------------------------------------------------------------------------ */
/* ./multBlockGen.pl 23722 -fractionalBits 0*/
module multiplier_block (
    i_data0,
    o_data0
);

  // Port mode declarations:
  input   [31:0] i_data0;
  output  [31:0]
    o_data0;

  //Multipliers:

  wire [31:0]
    w1,
    w4,
    w5,
    w512,
    w507,
    w1280,
    w773,
    w12368,
    w11861,
    w23722;

  assign w1 = i_data0;
  assign w11861 = w12368 - w507;
  assign w12368 = w773 << 4;
  assign w1280 = w5 << 8;
  assign w23722 = w11861 << 1;
  assign w4 = w1 << 2;
  assign w5 = w1 + w4;
  assign w507 = w512 - w5;
  assign w512 = w1 << 9;
  assign w773 = w1280 - w507;

  assign o_data0 = w23722;

  //multiplier_block area estimate = 5924.31830465;
endmodule //multiplier_block

module surround_with_regs(
	i_data0,
	o_data0,
	clk
);

	// Port mode declarations:
	input   [31:0] i_data0;
	output  [31:0] o_data0;
	reg  [31:0] o_data0;
	input clk;

	reg [31:0] i_data0_reg;
	wire [30:0] o_data0_from_mult;

	always @(posedge clk) begin
		i_data0_reg <= i_data0;
		o_data0 <= o_data0_from_mult;
	end

	multiplier_block mult_blk(
		.i_data0(i_data0_reg),
		.o_data0(o_data0_from_mult)
	);

endmodule
