Statistics
| Branch: | Tag: | Revision:

root / gr-gpio / src / fpga / lib / tx_chain_dig.v @ 48fefc9b

History | View | Annotate | Download (1.5 kB)

1
// -*- verilog -*-
2
//
3
//  USRP - Universal Software Radio Peripheral
4
//
5
//  Copyright (C) 2008 Corgan Enterprises LLC
6
//
7
//  This program is free software; you can redistribute it and/or modify
8
//  it under the terms of the GNU General Public License as published by
9
//  the Free Software Foundation; either version 2 of the License, or
10
//  (at your option) any later version.
11
//
12
//  This program is distributed in the hope that it will be useful,
13
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
14
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
//  GNU General Public License for more details.
16
//
17
//  You should have received a copy of the GNU General Public License
18
//  along with this program; if not, write to the Free Software
19
//  Foundation, Inc., 51 Franklin Street, Boston, MA  02110-1301  USA
20
//
21
22
module tx_chain_dig
23
  (input clock,
24
   input reset,
25
   input enable,
26
   input wire [15:0] i_in,
27
   input wire [15:0] q_in,
28
   output wire [15:0] i_out_ana,
29
   output wire [15:0] q_out_ana,
30
   output wire i_out_dig,
31
   output wire q_out_dig
32
   );
33
34
   //assign upper 15 bits to analog processing, discard lowest bit
35
   //output lower two bits of I and Q  as digital signal (to be output on gpio pins)
36
   assign i_out_ana = (enable)?{i_in[15:1],1'b0}:i_in;
37
   assign q_out_ana = (enable)?{q_in[15:1],1'b0}:q_in;
38
   //wire out_dig   = (enable)?{i_in[0],q_in[0]}:2'b00;
39
   assign i_out_dig = (enable)?i_in[0]:1'b0;
40
   assign q_out_dig = (enable)?q_in[0]:1'b0;
41
42
endmodule // tx_chain_dig