OpenCores
URL https://opencores.org/ocsvn/two_dimensional_fast_hartley_transform/two_dimensional_fast_hartley_transform/trunk

Subversion Repositories two_dimensional_fast_hartley_transform

[/] [two_dimensional_fast_hartley_transform/] [trunk/] [signed_mult_const_fpga.v] - Diff between revs 2 and 4

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 2 Rev 4
Line 1... Line 1...
//
/**********************************************************************
// File: signed_mult_const_fpga.v
 * File  : signed_mult_const_fpga.v
// Author: Ivan Rezki
 * Author: Ivan Rezki
// Topic: RTL Core
 * email : irezki@gmail.com
//                2-Dimensional Fast Hartley Transform
 * Topic : RTL Core
//
 *                2-Dimensional Fast Hartley Transform
 
 *
// Signed Multiplier - constant sqrt(2) = 1.41421
 *
 
 * Function: Signed Multiplier - constant sqrt(2) = 1.41421
// 8 bit accuracy:
 *
// 1.41421*a = (256*1.41421)*a/256 = 362.03776*a/256 = 362*a/256
 * 8 bit accuracy:
// product = 362*a/2^8
 * 1.41421*a = (256*1.41421)*a/256 = 362.03776*a/256 = 362*a/256
// wire [8:0] mult_constant = 9'd362;
 * product = 362*a/2^8
 
 * wire [8:0] mult_constant = 9'd362;
// 15 bit accuracy:
 *
// 1.41421*a = (32768*1.41421)*a/32768 = 46340.95*a/32768
 * 15 bit accuracy:
// product = 46341*a/2^15
 * 1.41421*a = (32768*1.41421)*a/32768 = 46340.95*a/32768
// wire [15:0] mult_constant = 16'd46341;
 * product = 46341*a/2^15
 
 * wire [15:0] mult_constant = 16'd46341;
// 16 bit accuracy:
 *
// 1.41421*a = (65536*1.41421)*a/65536 = 92681*a/65536
 * 16 bit accuracy:
// product = 92681*a/2^16
 * 1.41421*a = (65536*1.41421)*a/65536 = 92681*a/65536
// wire [16:0] mult_constant = 17'd92681;
 * product = 92681*a/2^16
 
 * wire [16:0] mult_constant = 17'd92681;
 
 *
 
 * RIGHT TO USE: This code example, or any portion thereof, may be
 
 * used and distributed without restriction, provided that this entire
 
 * comment block is included with the example.
 
 *
 
 * DISCLAIMER: THIS CODE EXAMPLE IS PROVIDED "AS IS" WITHOUT WARRANTY
 
 * OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED
 
 * TO WARRANTIES OF MERCHANTABILITY, FITNESS OR CORRECTNESS. IN NO
 
 * EVENT SHALL THE AUTHOR OR AUTHORS BE LIABLE FOR ANY DAMAGES,
 
 * INCLUDING INCIDENTAL OR CONSEQUENTIAL DAMAGES, ARISING OUT OF THE
 
 * USE OF THIS CODE.
 
 **********************************************************************/
 
 
module signed_mult_const_fpga (
module signed_mult_const_fpga (
        rstn,
        rstn,
        clk,
        clk,
        valid,
        valid,

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.