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

Subversion Repositories xilinx_virtex_fp_library

[/] [xilinx_virtex_fp_library/] [trunk/] [GeneralPrecMAF/] [accumulate.v] - Blame information for rev 4

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 3 constantin
`timescale 1ns / 1ps
2
//////////////////////////////////////////////////////////////////////////////////
3
// Company: 
4
// Engineer: 
5
// 
6
// Create Date:    17:59:10 10/15/2013 
7
// Design Name: 
8
// Module Name:    accumulate 
9
// Project Name: 
10
// Target Devices: 
11
// Tool versions: 
12
// Description: 
13
//
14
// Dependencies: 
15
//
16
// Revision: 
17
// Revision 0.01 - File Created
18
// Additional Comments: 
19
//
20
//////////////////////////////////////////////////////////////////////////////////
21
module accumulate #(    parameter size_mantissa = 24,   //mantissa bits
22
                                                        parameter size_counter  = 5,    //log2(size_quotient) + 1 = 5
23
                                                        parameter size_mul_mantissa = size_mantissa + size_mantissa)
24
                                                (       input [size_mul_mantissa-1:0] ab_number_i,
25
                                                        input [size_mul_mantissa-1:0] c_number_i,
26
                                                        input sub,
27
                                                        output ovf,
28
                                                        output[size_mul_mantissa  :0] acc_resulting_number_o);
29
 
30
assign {ovf, acc_resulting_number_o} = sub? ((ab_number_i >=c_number_i)? (ab_number_i - c_number_i) : (c_number_i - ab_number_i)) : c_number_i + ab_number_i;
31
 
32
endmodule

powered by: WebSVN 2.1.0

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