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

Subversion Repositories fft2_size

[/] [fft2_size/] [fft_int/] [yx_addr.sv] - Blame information for rev 9

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 9 Papayaved
`ifndef _yx_addr_
2
`define _yx_addr_
3
 
4
module yx_addr #(WIDTH = 9, POW = 2)(
5
        input [WIDTH-1:0] cnt,
6
        output [WIDTH-1:0] yx_cnt
7
);
8
 
9
generate
10
        if (POW < 1)
11
                begin
12
                        assign yx_cnt = cnt;
13
                end
14
        else if (POW == 1)
15
                begin
16
                        assign yx_cnt = {cnt[WIDTH-1:POW], !cnt[0]};
17
                end
18
        else if (POW == WIDTH)
19
                begin
20
                        assign yx_cnt = {!cnt[0], cnt[POW-1:1]};
21
                end
22
        else
23
                begin
24
                        assign yx_cnt = {cnt[WIDTH-1:POW], !cnt[0], cnt[POW-1:1]};
25
                end
26
endgenerate
27
 
28
endmodule :yx_addr
29
 
30
`endif

powered by: WebSVN 2.1.0

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