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

Subversion Repositories fft2_size

[/] [fft2_size/] [fft_int_size/] [round32.sv] - Blame information for rev 7

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 7 Papayaved
`ifndef _round32_
2
`define _round32_
3
 
4
// Round cut value
5
module round32 #(parameter WIDTH)(input signed [31:0] x, output signed [WIDTH-1:0] y);
6
        generate
7
                if (WIDTH == 32)
8
                        begin
9
                                assign y = x;
10
                        end
11
                else
12
                        begin
13
                                 // overflow check don't need
14
                                assign y = (x < 'sh0) ? x[31-:WIDTH] - x[31-WIDTH] : x[31-:WIDTH] + x[31-WIDTH];
15
                        end
16
        endgenerate
17
endmodule :round32
18
 
19
`endif

powered by: WebSVN 2.1.0

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