source: PlatformSupport/CustomPeripherals/pcores/radio_bridge_v2_00_a/hdl/verilog/radio_bridge.v

Last change on this file was 2032, checked in by murphpo, 11 years ago
File size: 2.2 KB
Line 
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
8module 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
37parameter C_FAMILY = "virtex4";
38
39reg [0:13] radio_ADC_I_nReg;
40reg [0:13] radio_ADC_Q_nReg;
41reg radio_ADC_I_OTR_nReg;
42reg 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;
48always @( negedge samp_clock )
49begin
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;
55end
56
57always @( posedge samp_clock )
58begin
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;
67end
68
69always @( posedge samp_clock )
70begin
71    radio_RSSI_ADC_CLK <= user_RSSI_ADC_CLK;
72    user_RSSI_ADC_D <= radio_RSSI_ADC_D;
73end
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
86endmodule
Note: See TracBrowser for help on using the repository browser.