root / usrp2 / custom / custom_dsp_rx.v @ ae1997f8
History | View | Annotate | Download (2.04 KB)
| 1 | 4f94819a | Josh Blum | // |
|---|---|---|---|
| 2 | // Copyright 2012 Ettus Research LLC |
||
| 3 | // |
||
| 4 | // This program is free software: you can redistribute it and/or modify |
||
| 5 | // it under the terms of the GNU General Public License as published by |
||
| 6 | // the Free Software Foundation, either version 3 of the License, or |
||
| 7 | // (at your option) any later version. |
||
| 8 | // |
||
| 9 | // This program is distributed in the hope that it will be useful, |
||
| 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
| 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||
| 12 | // GNU General Public License for more details. |
||
| 13 | // |
||
| 14 | // You should have received a copy of the GNU General Public License |
||
| 15 | // along with this program. If not, see <http://www.gnu.org/licenses/>. |
||
| 16 | // |
||
| 17 | |||
| 18 | e64b6e6c | Josh Blum | //COPY ME, CUSTOMIZE ME... |
| 19 | 4f94819a | Josh Blum | |
| 20 | //The following module effects the IO of the DDC chain. |
||
| 21 | //By default, this entire module is a simple pass-through. |
||
| 22 | |||
| 23 | //To implement DSP logic before the DDC: |
||
| 24 | //Implement custom DSP between frontend and ddc input. |
||
| 25 | |||
| 26 | //To implement DSP logic after the DDC: |
||
| 27 | //Implement custom DSP between ddc output and baseband. |
||
| 28 | |||
| 29 | //To bypass the DDC with custom logic: |
||
| 30 | //Implement custom DSP between frontend and baseband. |
||
| 31 | |||
| 32 | module custom_dsp_rx |
||
| 33 | #( |
||
| 34 | 7e6a0855 | Josh Blum | //frontend bus width |
| 35 | parameter WIDTH = 24 |
||
| 36 | 4f94819a | Josh Blum | ) |
| 37 | ( |
||
| 38 | //control signals |
||
| 39 | input clock, input reset, input enable, |
||
| 40 | |||
| 41 | 7e6a0855 | Josh Blum | //user settings bus, controlled through user setting regs API |
| 42 | e64b6e6c | Josh Blum | input set_stb, input [7:0] set_addr, input [31:0] set_data, |
| 43 | 4f94819a | Josh Blum | |
| 44 | //full rate inputs directly from the RX frontend |
||
| 45 | 7e6a0855 | Josh Blum | input [WIDTH-1:0] frontend_i, |
| 46 | input [WIDTH-1:0] frontend_q, |
||
| 47 | 4f94819a | Josh Blum | |
| 48 | //full rate outputs directly to the DDC chain |
||
| 49 | 7e6a0855 | Josh Blum | output [WIDTH-1:0] ddc_in_i, |
| 50 | output [WIDTH-1:0] ddc_in_q, |
||
| 51 | 4f94819a | Josh Blum | |
| 52 | //strobed samples {I16,Q16} from the RX DDC chain
|
||
| 53 | input [31:0] ddc_out_sample, |
||
| 54 | input ddc_out_strobe, //high on valid sample |
||
| 55 | |||
| 56 | //strobbed baseband samples {I16,Q16} from this module
|
||
| 57 | output [31:0] bb_sample, |
||
| 58 | e64b6e6c | Josh Blum | output bb_strobe //high on valid sample |
| 59 | 4f94819a | Josh Blum | ); |
| 60 | |||
| 61 | e64b6e6c | Josh Blum | assign ddc_in_i = frontend_i; |
| 62 | assign ddc_in_q = frontend_q; |
||
| 63 | assign bb_sample = ddc_out_sample; |
||
| 64 | assign bb_strobe = ddc_out_strobe; |
||
| 65 | 4f94819a | Josh Blum | |
| 66 | endmodule //custom_dsp_rx |