@@ -45,12 +45,12 @@ module axi_dac_interpolate_reg(
45
45
output [ 2 :0 ] dac_filter_mask_b,
46
46
output dma_transfer_suspend,
47
47
output start_sync_channels,
48
+ output stop_sync_channels,
48
49
output dac_correction_enable_a,
49
50
output dac_correction_enable_b,
50
51
output [15 :0 ] dac_correction_coefficient_a,
51
52
output [15 :0 ] dac_correction_coefficient_b,
52
53
output [19 :0 ] trigger_config,
53
- output [ 1 :0 ] lsample_hold_config,
54
54
// bus interface
55
55
56
56
input up_rstn,
@@ -67,24 +67,26 @@ module axi_dac_interpolate_reg(
67
67
68
68
// internal registers
69
69
70
- reg [31 :0 ] up_version = 32'h00020100 ;
70
+ reg [31 :0 ] up_version = {16'h0002 , /* MAJOR */
71
+ 8'h02 , /* MINOR */
72
+ 8'h00 }; /* PATCH */
71
73
reg [31 :0 ] up_scratch = 32'h0 ;
72
74
73
75
reg [31 :0 ] up_interpolation_ratio_a = 32'h0 ;
74
76
reg [ 2 :0 ] up_filter_mask_a = 3'h0 ;
75
77
reg [31 :0 ] up_interpolation_ratio_b = 32'h0 ;
76
78
reg [ 2 :0 ] up_filter_mask_b = 3'h0 ;
77
- reg [1 :0 ] up_flags = 2 'h2 ;
79
+ reg [2 :0 ] up_flags = 3 'h2 ;
78
80
reg [1 :0 ] up_config = 2'h0 ;
79
81
reg [15 :0 ] up_correction_coefficient_a = 16'h0 ;
80
82
reg [15 :0 ] up_correction_coefficient_b = 16'h0 ;
81
83
reg [19 :0 ] up_trigger_config = 20'h0 ;
82
- reg [ 1 :0 ] up_lsample_hold_config = 2'h0 ;
83
84
84
- wire [ 1 :0 ] flags;
85
+ wire [ 2 :0 ] flags;
85
86
86
87
assign dma_transfer_suspend = flags[0 ];
87
88
assign start_sync_channels = flags[1 ];
89
+ assign stop_sync_channels = flags[2 ];
88
90
89
91
always @(negedge up_rstn or posedge up_clk) begin
90
92
if (up_rstn == 0 ) begin
@@ -99,7 +101,6 @@ module axi_dac_interpolate_reg(
99
101
up_correction_coefficient_a <= 'd0;
100
102
up_correction_coefficient_b <= 'd0;
101
103
up_trigger_config <= 'd0;
102
- up_lsample_hold_config <= 'h0;
103
104
end else begin
104
105
up_wack <= up_wreq;
105
106
if ((up_wreq == 1'b1 ) && (up_waddr[4 :0 ] == 5'h1 )) begin
@@ -118,7 +119,7 @@ module axi_dac_interpolate_reg(
118
119
up_filter_mask_b <= up_wdata[2 :0 ];
119
120
end
120
121
if ((up_wreq == 1'b1 ) && (up_waddr[4 :0 ] == 5'h14 )) begin
121
- up_flags <= {30 'h0 ,up_wdata[1 :0 ]};
122
+ up_flags <= {29 'h0 ,up_wdata[2 :0 ]};
122
123
end
123
124
if ((up_wreq == 1'b1 ) && (up_waddr[4 :0 ] == 5'h15 )) begin
124
125
up_config <= up_wdata[1 :0 ];
@@ -132,9 +133,6 @@ module axi_dac_interpolate_reg(
132
133
if ((up_wreq == 1'b1 ) && (up_waddr[4 :0 ] == 5'h18 )) begin
133
134
up_trigger_config <= up_wdata[19 :0 ];
134
135
end
135
- if ((up_wreq == 1'b1 ) && (up_waddr[4 :0 ] == 5'h19 )) begin
136
- up_lsample_hold_config <= up_wdata[1 :0 ];
137
- end
138
136
end
139
137
end
140
138
@@ -154,12 +152,11 @@ module axi_dac_interpolate_reg(
154
152
5'h11 : up_rdata <= {29'h0 ,up_filter_mask_a};
155
153
5'h12 : up_rdata <= up_interpolation_ratio_b;
156
154
5'h13 : up_rdata <= {29'h0 ,up_filter_mask_b};
157
- 5'h14 : up_rdata <= {30 'h0 ,up_flags};
155
+ 5'h14 : up_rdata <= {29 'h0 ,up_flags};
158
156
5'h15 : up_rdata <= {30'h0 ,up_config};
159
157
5'h16 : up_rdata <= {16'h0 ,up_correction_coefficient_a};
160
158
5'h17 : up_rdata <= {16'h0 ,up_correction_coefficient_b};
161
159
5'h18 : up_rdata <= {12'h0 ,up_trigger_config};
162
- 5'h19 : up_rdata <= {30'h0 ,up_lsample_hold_config};
163
160
default : up_rdata <= 0 ;
164
161
endcase
165
162
end else begin
@@ -169,7 +166,7 @@ module axi_dac_interpolate_reg(
169
166
end
170
167
171
168
up_xfer_cntrl #(
172
- .DATA_WIDTH(128 )
169
+ .DATA_WIDTH(127 )
173
170
) i_xfer_cntrl (
174
171
.up_rstn (up_rstn),
175
172
.up_clk (up_clk),
@@ -178,8 +175,7 @@ module axi_dac_interpolate_reg(
178
175
up_correction_coefficient_b,// 16
179
176
up_correction_coefficient_a,// 16
180
177
up_trigger_config, // 20
181
- up_lsample_hold_config, // 2
182
- up_flags, // 2
178
+ up_flags, // 3
183
179
up_interpolation_ratio_b, // 32
184
180
up_interpolation_ratio_a, // 32
185
181
up_filter_mask_b, // 3
@@ -193,8 +189,7 @@ module axi_dac_interpolate_reg(
193
189
dac_correction_coefficient_b, // 16
194
190
dac_correction_coefficient_a, // 16
195
191
trigger_config, // 20
196
- lsample_hold_config, // 2
197
- flags, // 2
192
+ flags, // 3
198
193
dac_interpolation_ratio_b, // 32
199
194
dac_interpolation_ratio_a, // 32
200
195
dac_filter_mask_b, // 3
0 commit comments