source: PlatformSupport/CustomPeripherals/pcores/analog_bridge_v1_00_a/hdl/verilog/analog_bridge.v

Last change on this file was 634, checked in by murphpo, 17 years ago

Changing analog bridge DAC ports to 14 bits

File size: 3.4 KB
Line 
1//////////////////////////////////////////////////////////
2// Copyright (c) 2006 Rice University           //
3// All Rights Reserved                  //
4// This code is covered by the Rice-WARP license    //
5// See http://warp.rice.edu/license/ for details    //
6//////////////////////////////////////////////////////////
7
8module analog_bridge
9(
10    clock_in,
11    clock_out,
12   
13    user_DAC1_A,
14    user_DAC1_B,
15    user_DAC2_A,
16    user_DAC2_B,
17    user_DAC1_sleep,
18    user_DAC2_sleep,
19    user_ADC_A,
20    user_ADC_B,
21    user_ADC_DFS,
22    user_ADC_DCS,
23    user_ADC_pdwnA,
24    user_ADC_pdwnB,
25    user_ADC_otrA,
26    user_ADC_otrB,
27    user_LED,
28       
29    analog_DAC1_A,
30    analog_DAC1_B,
31    analog_DAC2_A,
32    analog_DAC2_B,
33    analog_DAC1_sleep,
34    analog_DAC2_sleep,
35    analog_ADC_A,
36    analog_ADC_B,
37    analog_ADC_DFS,
38    analog_ADC_DCS,
39    analog_ADC_pdwnA,
40    analog_ADC_pdwnB,
41    analog_ADC_otrA,
42    analog_ADC_otrB,
43    analog_LED
44);
45
46/**********************/
47/* Clock & Data Ports */
48/**********************/
49input   clock_in;
50output  clock_out;
51
52input [0:13] user_DAC1_A;
53input [0:13] user_DAC1_B;
54input [0:13] user_DAC2_A;
55input [0:13] user_DAC2_B;
56input user_DAC1_sleep;
57input user_DAC2_sleep;
58
59output [0:13] user_ADC_A;
60output [0:13] user_ADC_B;
61reg [0:13] user_ADC_A;
62reg [0:13] user_ADC_B;
63
64input user_ADC_DFS;
65input user_ADC_DCS;
66input user_ADC_pdwnA;
67input user_ADC_pdwnB;
68output user_ADC_otrA;
69output user_ADC_otrB;
70input [0:2] user_LED;
71
72
73output [0:13] analog_DAC1_A;
74output [0:13] analog_DAC1_B;
75output [0:13] analog_DAC2_A;
76output [0:13] analog_DAC2_B;
77reg [0:13] analog_DAC1_A;
78reg [0:13] analog_DAC1_B;
79reg [0:13] analog_DAC2_A;
80reg [0:13] analog_DAC2_B;
81
82output analog_DAC1_sleep;
83output analog_DAC2_sleep;
84reg analog_DAC1_sleep;
85reg analog_DAC2_sleep;
86
87input [0:13] analog_ADC_A;
88input [0:13] analog_ADC_B;
89
90output analog_ADC_DFS;
91output analog_ADC_DCS;
92output analog_ADC_pdwnA;
93output analog_ADC_pdwnB;
94input analog_ADC_otrA;
95input analog_ADC_otrB;
96output [0:2] analog_LED;
97
98
99wire [0:13] temp_analog_DAC1_A;
100wire [0:13] temp_analog_DAC1_B;
101wire [0:13] temp_analog_DAC2_A;
102wire [0:13] temp_analog_DAC2_B;
103
104/**********************************/
105/* Clocks and analog data signals */
106/**********************************/
107assign clock_out = clock_in;
108
109
110assign temp_analog_DAC1_A = user_DAC1_A[0:13];
111assign temp_analog_DAC1_B = user_DAC1_B[0:13];
112assign temp_analog_DAC2_A = user_DAC2_A[0:13];
113assign temp_analog_DAC2_B = user_DAC2_B[0:13];
114
115assign analog_ADC_DFS = user_ADC_DFS;
116assign analog_ADC_DCS = user_ADC_DCS;
117assign analog_ADC_pdwnA = user_ADC_pdwnA;
118assign analog_ADC_pdwnB = user_ADC_pdwnB;
119assign user_ADC_otrA = analog_ADC_otrA;
120assign user_ADC_otrB = analog_ADC_otrB;
121assign analog_LED = user_LED;
122
123
124// synthesis attribute iob of analog_DAC1_A is true;
125// synthesis attribute iob of analog_DAC1_B is true;
126// synthesis attribute iob of analog_DAC2_A is true;
127// synthesis attribute iob of analog_DAC2_B is true;
128always @(posedge clock_in)
129begin
130    analog_DAC1_A <= {temp_analog_DAC1_A[0], ~temp_analog_DAC1_A[1:13]};
131    analog_DAC1_B <= {temp_analog_DAC1_B[0], ~temp_analog_DAC1_B[1:13]};
132    analog_DAC2_A <= {temp_analog_DAC2_A[0], ~temp_analog_DAC2_A[1:13]};
133    analog_DAC2_B <= {temp_analog_DAC2_B[0], ~temp_analog_DAC2_B[1:13]};
134    analog_DAC1_sleep <= user_DAC1_sleep;
135    analog_DAC2_sleep <= user_DAC2_sleep;
136    user_ADC_A <= analog_ADC_A;
137    user_ADC_B <= analog_ADC_B;
138end
139
140endmodule
Note: See TracBrowser for help on using the repository browser.