1 | ////////////////////////////////////////////////////////// |
---|
2 | // Copyright (c) 2013 Mango Communications, Inc. |
---|
3 | // All Rights Reserved |
---|
4 | // This code is covered by the WARP license |
---|
5 | // See http://warpproject.org/license/ for details |
---|
6 | ////////////////////////////////////////////////////////// |
---|
7 | |
---|
8 | module radio_bridge |
---|
9 | ( |
---|
10 | input samp_clock, |
---|
11 | |
---|
12 | output reg [0:13] user_ADC_I, |
---|
13 | output reg [0:13] user_ADC_Q, |
---|
14 | |
---|
15 | input [0:15] user_DAC_I, |
---|
16 | input [0:15] user_DAC_Q, |
---|
17 | |
---|
18 | output reg user_ADC_I_OTR, |
---|
19 | output reg user_ADC_Q_OTR, |
---|
20 | |
---|
21 | output reg [0:9] user_RSSI_ADC_D, |
---|
22 | input user_RSSI_ADC_CLK, |
---|
23 | |
---|
24 | output reg [0:15] radio_DAC_I, |
---|
25 | output reg [0:15] radio_DAC_Q, |
---|
26 | |
---|
27 | input [0:13] radio_ADC_I, |
---|
28 | input [0:13] radio_ADC_Q, |
---|
29 | |
---|
30 | input radio_ADC_I_OTR, |
---|
31 | input radio_ADC_Q_OTR, |
---|
32 | |
---|
33 | input [0:9] radio_RSSI_ADC_D, |
---|
34 | output reg radio_RSSI_ADC_CLK |
---|
35 | ); |
---|
36 | |
---|
37 | parameter C_FAMILY = "virtex4"; |
---|
38 | |
---|
39 | reg [0:13] radio_ADC_I_nReg; |
---|
40 | reg [0:13] radio_ADC_Q_nReg; |
---|
41 | reg radio_ADC_I_OTR_nReg; |
---|
42 | reg radio_ADC_Q_OTR_nReg; |
---|
43 | |
---|
44 | //Capture the incoming ADC signals on the negative |
---|
45 | // edge of the converter clock |
---|
46 | //synthesis attribute IOB of radio_ADC_I_nReg IS true; |
---|
47 | //synthesis attribute IOB of radio_ADC_Q_nReg IS true; |
---|
48 | always @( negedge samp_clock ) |
---|
49 | begin |
---|
50 | radio_ADC_I_nReg <= radio_ADC_I; |
---|
51 | radio_ADC_Q_nReg <= radio_ADC_Q; |
---|
52 | |
---|
53 | radio_ADC_I_OTR_nReg <= radio_ADC_I_OTR; |
---|
54 | radio_ADC_Q_OTR_nReg <= radio_ADC_Q_OTR; |
---|
55 | end |
---|
56 | |
---|
57 | always @( posedge samp_clock ) |
---|
58 | begin |
---|
59 | user_ADC_I <= radio_ADC_I_nReg; |
---|
60 | user_ADC_Q <= radio_ADC_Q_nReg; |
---|
61 | |
---|
62 | radio_DAC_I <= user_DAC_I; |
---|
63 | radio_DAC_Q <= user_DAC_Q; |
---|
64 | |
---|
65 | user_ADC_I_OTR <= radio_ADC_I_OTR_nReg; |
---|
66 | user_ADC_Q_OTR <= radio_ADC_Q_OTR_nReg; |
---|
67 | end |
---|
68 | |
---|
69 | always @( posedge samp_clock ) |
---|
70 | begin |
---|
71 | radio_RSSI_ADC_CLK <= user_RSSI_ADC_CLK; |
---|
72 | user_RSSI_ADC_D <= radio_RSSI_ADC_D; |
---|
73 | end |
---|
74 | |
---|
75 | //Use XST attributes to force the registers for these signals into the IOBs |
---|
76 | //synthesis attribute IOB of radio_DAC_I IS true; |
---|
77 | //synthesis attribute IOB of radio_DAC_Q IS true; |
---|
78 | //synthesis attribute IOB of radio_ADC_I_nReg IS true; |
---|
79 | //synthesis attribute IOB of radio_ADC_I_nReg IS true; |
---|
80 | //synthesis attribute IOB of radio_ADC_I_OTR_nReg IS true; |
---|
81 | //synthesis attribute IOB of radio_ADC_Q_OTR_nReg IS true; |
---|
82 | //synthesis attribute IOB of radio_RSSI_ADC_CLK IS true; |
---|
83 | //synthesis attribute IOB of radio_RSSI_ADC_D IS true; |
---|
84 | |
---|
85 | |
---|
86 | endmodule |
---|