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/] [special_cases_mul_acc.v] - Diff between revs 3 and 5

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 3 Rev 5
`timescale 1ns / 1ps
`timescale 1ns / 1ps
//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
// Company: 
// Company: 
// Engineer: 
// Engineer: 
// 
// 
// Create Date:    18:56:11 10/07/2013 
// Create Date:    18:56:11 10/07/2013 
// Design Name: 
// Design Name: 
// Module Name:    special_cases_mul_acc
// Module Name:    special_cases_mul_acc
// Project Name: 
// Project Name: 
// Target Devices: 
// Target Devices: 
// Tool versions: 
// Tool versions: 
// Description: 
// Description: 
//
//
// Dependencies: 
// Dependencies: 
//
//
// Revision: 
// Revision: 
// Revision 0.01 - File Created
// Revision 0.01 - File Created
// Additional Comments: 
// Additional Comments: 
//
//
//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
module special_cases_mul_acc    #(      parameter size_exception_field = 2'd2,
module special_cases_mul_acc    #(      parameter size_exception_field = 2'd2,
                                                                        parameter [size_exception_field - 1 : 0] zero = 0, //00
                                                                                        parameter [size_exception_field - 1 : 0] zero = 0, //00
                                                                        parameter [size_exception_field - 1 : 0] normal_number   = 1, //01
                                                                                        parameter [size_exception_field - 1 : 0] normal_number   = 1, //01
                                                                        parameter [size_exception_field - 1 : 0] infinity                = 2, //10
                                                                                        parameter [size_exception_field - 1 : 0] infinity                = 2, //10
                                                                        parameter [size_exception_field - 1 : 0] NaN                     = 3) //11
                                                                                        parameter [size_exception_field - 1 : 0] NaN                     = 3) //11
                                                                (       input [size_exception_field - 1 : 0] sp_case_a_number,
                                                                                (       input [size_exception_field - 1 : 0] sp_case_a_number,
                                                                        input [size_exception_field - 1 : 0] sp_case_b_number,
                                                                                        input [size_exception_field - 1 : 0] sp_case_b_number,
                                                                        input [size_exception_field - 1 : 0] sp_case_c_number,
                                                                                        input [size_exception_field - 1 : 0] sp_case_c_number,
                                                                        output reg [size_exception_field - 1 : 0] sp_case_result_o);
                                                                                        output reg [size_exception_field - 1 : 0] sp_case_result_o);
 
 
        always
        always
                @(*)
                @(*)
        begin
        begin
                case ({sp_case_a_number, sp_case_b_number, sp_case_c_number})
                case ({sp_case_a_number, sp_case_b_number, sp_case_c_number})
                        {zero, zero, zero}:                                                             sp_case_result_o = zero;
                        {zero, zero, zero}:                                                                             sp_case_result_o = zero;
                        {zero, zero, normal_number}:                                    sp_case_result_o = normal_number;
                        {zero, zero, normal_number}:                                                    sp_case_result_o = normal_number;
                        {zero, zero, infinity}:                                                 sp_case_result_o = infinity;
                        {zero, zero, infinity}:                                                                 sp_case_result_o = infinity;
                        {zero, zero, NaN}:                                                              sp_case_result_o = NaN;
                        {zero, zero, NaN}:                                                                              sp_case_result_o = NaN;
 
 
                        {zero, normal_number,zero}:                                     sp_case_result_o = zero;
                        {zero, normal_number,zero}:                                                     sp_case_result_o = zero;
                        {zero, normal_number,normal_number}:            sp_case_result_o = normal_number;
                        {zero, normal_number,normal_number}:                            sp_case_result_o = normal_number;
                        {zero, normal_number,infinity}:                         sp_case_result_o = infinity;
                        {zero, normal_number,infinity}:                                         sp_case_result_o = infinity;
                        {zero, normal_number,NaN}:                                              sp_case_result_o = NaN;
                        {zero, normal_number,NaN}:                                                              sp_case_result_o = NaN;
 
 
                        {zero, infinity, zero}:                                                 sp_case_result_o = NaN;
                        {zero, infinity, zero}:                                                                 sp_case_result_o = NaN;
                        {zero, infinity, normal_number}:                        sp_case_result_o = NaN;
                        {zero, infinity, normal_number}:                                        sp_case_result_o = NaN;
                        {zero, infinity, infinity}:                                     sp_case_result_o = NaN;
                        {zero, infinity, infinity}:                                                     sp_case_result_o = NaN;
                        {zero, infinity, NaN}:                                                  sp_case_result_o = NaN;
                        {zero, infinity, NaN}:                                                                  sp_case_result_o = NaN;
 
 
                        {zero, NaN, zero}:                                                              sp_case_result_o = NaN;
                        {zero, NaN, zero}:                                                                              sp_case_result_o = NaN;
                        {zero, NaN, normal_number}:                                     sp_case_result_o = NaN;
                        {zero, NaN, normal_number}:                                                     sp_case_result_o = NaN;
                        {zero, NaN, infinity}:                                                  sp_case_result_o = NaN;
                        {zero, NaN, infinity}:                                                                  sp_case_result_o = NaN;
                        {zero, NaN, NaN}:                                                               sp_case_result_o = NaN;
                        {zero, NaN, NaN}:                                                                               sp_case_result_o = NaN;
 
 
                        {normal_number, zero, zero}:                                    sp_case_result_o = zero;
                        {normal_number, zero, zero}:                                                    sp_case_result_o = zero;
                        {normal_number, zero, normal_number}:           sp_case_result_o = zero;
                        {normal_number, zero, normal_number}:                           sp_case_result_o = zero;
                        {normal_number, zero, infinity}:                        sp_case_result_o = infinity;
                        {normal_number, zero, infinity}:                                        sp_case_result_o = infinity;
                        {normal_number, zero, NaN}:                                     sp_case_result_o = NaN;
                        {normal_number, zero, NaN}:                                                     sp_case_result_o = NaN;
 
 
                        {normal_number, normal_number, zero}:                           sp_case_result_o = normal_number;
                        {normal_number, normal_number, zero}:                           sp_case_result_o = normal_number;
                        {normal_number, normal_number, normal_number}:  sp_case_result_o = normal_number;
                        {normal_number, normal_number, normal_number}:  sp_case_result_o = normal_number;
                        {normal_number, normal_number, infinity}:               sp_case_result_o = infinity;
                        {normal_number, normal_number, infinity}:               sp_case_result_o = infinity;
                        {normal_number, normal_number, NaN}:                            sp_case_result_o = NaN;
                        {normal_number, normal_number, NaN}:                            sp_case_result_o = NaN;
 
 
                        {normal_number, infinity, zero}:                        sp_case_result_o = infinity;
                        {normal_number, infinity, zero}:                                        sp_case_result_o = infinity;
                        {normal_number, infinity, normal_number}: sp_case_result_o = infinity;
                        {normal_number, infinity, normal_number}:               sp_case_result_o = infinity;
                        {normal_number, infinity, infinity}:            sp_case_result_o = infinity;
                        {normal_number, infinity, infinity}:                            sp_case_result_o = infinity;
                        {normal_number, infinity, NaN}:                                 sp_case_result_o = NaN;
                        {normal_number, infinity, NaN}:                                                 sp_case_result_o = NaN;
 
 
                        {normal_number, NaN, zero}:                                     sp_case_result_o = NaN;
                        {normal_number, NaN, zero}:                                                     sp_case_result_o = NaN;
                        {normal_number, NaN, normal_number}:            sp_case_result_o = NaN;
                        {normal_number, NaN, normal_number}:                            sp_case_result_o = NaN;
                        {normal_number, NaN, infinity}:                                 sp_case_result_o = NaN;
                        {normal_number, NaN, infinity}:                                                 sp_case_result_o = NaN;
                        {normal_number, NaN, NaN}:                                      sp_case_result_o = NaN;
                        {normal_number, NaN, NaN}:                                                      sp_case_result_o = NaN;
 
 
                        {infinity, zero, zero}:                                                 sp_case_result_o = NaN;
                        {infinity, zero, zero}:                                                                 sp_case_result_o = NaN;
                        {infinity, zero, normal_number}:                        sp_case_result_o = NaN;
                        {infinity, zero, normal_number}:                                        sp_case_result_o = NaN;
                        {infinity, zero, infinity}:                                     sp_case_result_o = NaN;
                        {infinity, zero, infinity}:                                                     sp_case_result_o = NaN;
                        {infinity, zero, NaN}:                                                  sp_case_result_o = NaN;
                        {infinity, zero, NaN}:                                                                  sp_case_result_o = NaN;
 
 
                        {infinity, normal_number, zero}:                        sp_case_result_o = infinity;
                        {infinity, normal_number, zero}:                                        sp_case_result_o = infinity;
                        {infinity, normal_number, normal_number}: sp_case_result_o = infinity;
                        {infinity, normal_number, normal_number}:               sp_case_result_o = infinity;
                        {infinity, normal_number, infinity}:            sp_case_result_o = infinity;
                        {infinity, normal_number, infinity}:                            sp_case_result_o = infinity;
                        {infinity, normal_number, NaN}:                                 sp_case_result_o = NaN;
                        {infinity, normal_number, NaN}:                                                 sp_case_result_o = NaN;
 
 
                        {infinity, infinity, zero}:                                     sp_case_result_o = infinity;
                        {infinity, infinity, zero}:                                                     sp_case_result_o = infinity;
                        {infinity, infinity, normal_number}:            sp_case_result_o = infinity;
                        {infinity, infinity, normal_number}:                            sp_case_result_o = infinity;
                        {infinity, infinity, infinity}:                                 sp_case_result_o = infinity;
                        {infinity, infinity, infinity}:                                                 sp_case_result_o = infinity;
                        {infinity, infinity, NaN}:                                              sp_case_result_o = NaN;
                        {infinity, infinity, NaN}:                                                              sp_case_result_o = NaN;
 
 
                        {infinity, NaN, zero}:                                                  sp_case_result_o = NaN;
                        {infinity, NaN, zero}:                                                                  sp_case_result_o = NaN;
                        {infinity, NaN, normal_number}:                                 sp_case_result_o = NaN;
                        {infinity, NaN, normal_number}:                                                 sp_case_result_o = NaN;
                        {infinity, NaN, infinity}:                                      sp_case_result_o = NaN;
                        {infinity, NaN, infinity}:                                                      sp_case_result_o = NaN;
                        {infinity, NaN, NaN}:                                                   sp_case_result_o = NaN;
                        {infinity, NaN, NaN}:                                                                   sp_case_result_o = NaN;
 
 
                        {NaN, zero, zero}:                                                              sp_case_result_o = NaN;
                        {NaN, zero, zero}:                                                                              sp_case_result_o = NaN;
                        {NaN, zero, normal_number}:                                     sp_case_result_o = NaN;
                        {NaN, zero, normal_number}:                                                     sp_case_result_o = NaN;
                        {NaN, zero, infinity}:                                                  sp_case_result_o = NaN;
                        {NaN, zero, infinity}:                                                                  sp_case_result_o = NaN;
                        {NaN, zero, NaN}:                                                               sp_case_result_o = NaN;
                        {NaN, zero, NaN}:                                                                               sp_case_result_o = NaN;
 
 
                        {NaN, normal_number, zero}:                                     sp_case_result_o = NaN;
                        {NaN, normal_number, zero}:                                                     sp_case_result_o = NaN;
                        {NaN, normal_number, normal_number}:            sp_case_result_o = NaN;
                        {NaN, normal_number, normal_number}:                            sp_case_result_o = NaN;
                        {NaN, normal_number, infinity}:                                 sp_case_result_o = NaN;
                        {NaN, normal_number, infinity}:                                                 sp_case_result_o = NaN;
                        {NaN, normal_number, NaN}:                                      sp_case_result_o = NaN;
                        {NaN, normal_number, NaN}:                                                      sp_case_result_o = NaN;
 
 
                        {NaN, infinity, zero}:                                                  sp_case_result_o = NaN;
                        {NaN, infinity, zero}:                                                                  sp_case_result_o = NaN;
                        {NaN, infinity, normal_number}:                                 sp_case_result_o = NaN;
                        {NaN, infinity, normal_number}:                                                 sp_case_result_o = NaN;
                        {NaN, infinity, infinity}:                                      sp_case_result_o = NaN;
                        {NaN, infinity, infinity}:                                                      sp_case_result_o = NaN;
                        {NaN, infinity, NaN}:                                                   sp_case_result_o = NaN;
                        {NaN, infinity, NaN}:                                                                   sp_case_result_o = NaN;
 
 
                        {NaN, NaN, zero}:                                                               sp_case_result_o = NaN;
                        {NaN, NaN, zero}:                                                                               sp_case_result_o = NaN;
                        {NaN, NaN, normal_number}:                                      sp_case_result_o = NaN;
                        {NaN, NaN, normal_number}:                                                      sp_case_result_o = NaN;
                        {NaN, NaN, infinity}:                                                   sp_case_result_o = NaN;
                        {NaN, NaN, infinity}:                                                                   sp_case_result_o = NaN;
                        {NaN, NaN, NaN}:                                                                        sp_case_result_o = NaN;
                        {NaN, NaN, NaN}:                                                                                        sp_case_result_o = NaN;
                        default:                                                                                                sp_case_result_o = zero;
                        default:                                                                                                                sp_case_result_o = zero;
                endcase
                endcase
        end
        end
 
 
endmodule
endmodule
 
 
 
 

powered by: WebSVN 2.1.0

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