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

Subversion Repositories pipelined_fft_64

[/] [pipelined_fft_64/] [trunk/] [RTL/] [bufram64c1.v] - Blame information for rev 12

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 8 unicore
/////////////////////////////////////////////////////////////////////
2
////                                                             ////
3
////  Storage Buffer                                             ////
4
////                                                             ////
5
////  Authors: Anatoliy Sergienko, Volodya Lepeha                ////
6
////  Company: Unicore Systems http://unicore.co.ua              ////
7
////                                                             ////
8
////  Downloaded from: http://www.opencores.org                  ////
9
////                                                             ////
10
/////////////////////////////////////////////////////////////////////
11
////                                                             ////
12
//// Copyright (C) 2006-2010 Unicore Systems LTD                 ////
13
//// www.unicore.co.ua                                           ////
14
//// o.uzenkov@unicore.co.ua                                     ////
15
////                                                             ////
16
//// This source file may be used and distributed without        ////
17
//// restriction provided that this copyright statement is not   ////
18
//// removed from the file and that any derivative work contains ////
19
//// the original copyright notice and the associated disclaimer.////
20
////                                                             ////
21
//// THIS SOFTWARE IS PROVIDED "AS IS"                           ////
22
//// AND ANY EXPRESSED OR IMPLIED WARRANTIES,                    ////
23
//// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED                  ////
24
//// WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT              ////
25
//// AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.        ////
26
//// IN NO EVENT SHALL THE UNICORE SYSTEMS OR ITS                ////
27
//// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,            ////
28
//// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL            ////
29
//// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT         ////
30
//// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,               ////
31
//// DATA, OR PROFITS; OR BUSINESS INTERRUPTION)                 ////
32
//// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,              ////
33
//// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT              ////
34
//// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING                 ////
35
//// IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,                 ////
36
//// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.          ////
37
////                                                             ////
38
/////////////////////////////////////////////////////////////////////
39
// Design_Version       : 1.0
40
// File name            : BUFRAM64C1.v
41
// File Revision        : 
42
// Last modification    : Sun Sep 30 20:11:56 2007
43
/////////////////////////////////////////////////////////////////////
44
// FUNCTION: FIFO - buffer with direct input order and 8-th inverse 
45
//           output order
46
// FILES: BUFRAM64C1.v  - 1-st,2-nd,3-d data buffer, contains:
47
//        RAM2x64C_1.v - dual ported synchronous RAM, contains:         
48
//          RAM64.v -single ported synchronous RAM
49
// PROPERTIES: 1)Has the volume of 2x64 complex data
50
//                 2)Contains 2- port RAM and address counter
51
//                 3)Has 64-clock cycle period starting with the START 
52
//               impulse and continuing forever    
53
//                 4)Signal RDY precedes the 1-st correct datum output 
54
//               from the buffer
55
/////////////////////////////////////////////////////////////////////
56
`timescale 1 ns / 1 ps
57
`include "FFT64_CONFIG.inc"
58
 
59
module BUFRAM64C1 ( CLK ,RST ,ED ,START ,DR ,DI ,RDY ,DOR ,DOI );
60
        `USFFT64paramnb
61
        output RDY ;
62
        reg RDY ;
63
        output [nb-1:0] DOR ;
64
        wire [nb-1:0] DOR ;
65
        output [nb-1:0] DOI ;
66
        wire [nb-1:0] DOI ;
67
 
68
        input CLK ;
69
        wire CLK ;
70
        input RST ;
71
        wire RST ;
72
        input ED ;
73
        wire ED ;
74
        input START ;
75
        wire START ;
76
        input [nb-1:0] DR ;
77
        wire [nb-1:0] DR ;
78
        input [nb-1:0] DI ;
79
        wire [nb-1:0] DI ;
80
 
81
        wire odd, we;
82
        wire [5:0] addrw,addrr;
83
        reg [6:0] addr;
84
        reg [7:0] ct2;           //counter for the RDY signal                              
85
 
86
        always @(posedge CLK)   //   CTADDR
87
                begin
88
                        if (RST) begin
89
                                        addr<=6'b000000;
90
                                        ct2<= 7'b1000001;
91
                                RDY<=1'b0; end
92
                        else if (START) begin
93
                                        addr<=6'b000000;
94
                                        ct2<= 6'b000000;
95
                                RDY<=1'b0;end
96
                        else if (ED)    begin
97
                                        RDY<=1'b0;
98
                                        addr<=addr+1;
99
                                        if (ct2!=65)
100
                                        ct2<=ct2+1;
101
                                        if (ct2==64)
102
                                        RDY<=1'b1;
103
                                end
104
                end
105
 
106
 
107
assign  addrw=  addr[5:0];
108
assign  odd=addr[6];                            // signal which switches the 2 parts of the buffer
109
assign  addrr={addr[2 : 0], addr[5 : 3]};          // 8-th inverse output address
110
assign  we = ED;
111
 
112
        RAM2x64C_1 #(nb)        URAM(.CLK(CLK),.ED(ED),.WE(we),.ODD(odd),
113
        .ADDRW(addrw),  .ADDRR(addrr),
114
        .DR(DR),.DI(DI),
115
        .DOR(DOR),      .DOI(DOI));
116
 
117
endmodule

powered by: WebSVN 2.1.0

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