Changeset 86 for trunk/MultiChannelUSB/Paella.v
- Timestamp:
- Dec 21, 2009, 11:55:05 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MultiChannelUSB/Paella.v
r84 r86 149 149 reg [15:0] mux_min_addr, mux_max_addr; 150 150 151 wire adc_clk [N-1:0];152 151 wire [11:0] adc_data [N-1:0]; 153 152 154 wire data_ready [N-1:0];153 wire data_ready; 155 154 wire [11:0] data [N-1:0]; 156 155 wire [11:0] int_data [N-1:0]; 157 156 158 wire cmp_data_ready;159 157 wire [11:0] cmp_data; 160 161 wire ept_data_ready;162 wire [47:0] ept_data;163 158 164 159 wire [11:0] nowhere; … … 166 161 wire sys_clk; 167 162 168 169 /*170 assign osc_thrs[0] = 16'd40;171 assign osc_thrs[1] = 16'd60;172 assign osc_thrs[2] = 16'd40;173 assign osc_thrs[3] = 16'd1650;174 */175 163 wire [31:0] uwt_d1 [N-1:0]; 176 164 wire [31:0] uwt_a1 [N-1:0]; … … 187 175 wire [1:0] uwt_flag3 [N-1:0]; 188 176 189 assign adc_clk[0] = ADC_FCO;190 assign adc_clk[1] = ADC_FCO;191 assign adc_clk[2] = ADC_FCO;192 193 /*194 assign adc_clk[2] = CON_CCLK[0];195 assign adc_data[2] = CON_C[11:0];196 */197 177 /* 198 178 adc_para adc_para_unit ( … … 219 199 .data(adc_data[2])); 220 200 // .data(nowhere); 221 222 201 223 202 adc_lvds #( … … 232 211 adc_data[1], 233 212 adc_data[0] })); 234 235 213 236 214 reg [15:0] cfg_memory [31:0]; … … 262 240 end 263 241 264 assign ept_data_ready = cmp_data_ready & data_ready[2] & data_ready[1] & data_ready[0]; 265 assign ept_data = {cmp_data, int_data[2], int_data[1], int_data[0]}; 266 267 adc_fifo cmp_fifo_unit ( 242 adc_fifo #(.W(48)) adc_fifo_unit ( 268 243 .adc_clk(ADC_FCO), 269 .adc_data( CON_B[11:0]),244 .adc_data({CON_B[11:0], adc_data[2], adc_data[1], adc_data[0]}), 270 245 .clk(sys_clk), 271 .data_ready( cmp_data_ready),272 .data( cmp_data));246 .data_ready(data_ready), 247 .data({cmp_data, int_data[2], int_data[1], int_data[0]})); 273 248 274 249 genvar i; … … 289 264 assign bln_mux_sel[i] = cfg_memory[23+i][7:4]; 290 265 291 adc_fifo adc_fifo_unit (292 .adc_clk(adc_clk[i]),293 .adc_data(adc_data[i]),294 .clk(sys_clk),295 .data_ready(data_ready[i]),296 .data(int_data[i]));297 298 266 assign data[i] = (cfg_polarity[i]) ? (int_data[i] ^ 12'hfff) : (int_data[i]); 299 267 300 268 uwt_bior31 #(.L(1)) uwt_1_unit ( 301 269 .clk(sys_clk), 302 .data_ready(data_ready [i]),270 .data_ready(data_ready), 303 271 .x({20'h00000, data[i]}), 304 272 .d(uwt_d1[i]), … … 309 277 uwt_bior31 #(.L(2)) uwt_2_unit ( 310 278 .clk(sys_clk), 311 .data_ready(data_ready [i]),279 .data_ready(data_ready), 312 280 .x(uwt_a1[i]), 313 281 .d(uwt_d2[i]), … … 318 286 uwt_bior31 #(.L(3)) uwt_3_unit ( 319 287 .clk(sys_clk), 320 .data_ready(data_ready [i]),288 .data_ready(data_ready), 321 289 .x(uwt_a2[i]), 322 290 .d(uwt_d3[i]), … … 364 332 .sel(hst_mux_sel[i][0]), 365 333 .data({ {uwt_peak3[i][11:0], ana_peak_ready[i]}, 366 {data[i], data_ready [i]} }),334 {data[i], data_ready} }), 367 335 .result(hst_mux_data[i])); 368 336 … … 379 347 .clk(sys_clk), 380 348 .reset(bln_reset[i]), 381 .data_ready(data_ready [i]),349 .data_ready(data_ready), 382 350 .uwt_flag(uwt_flag3[i]), 383 351 .uwt_data(uwt_peak3[i]), … … 387 355 .clk(sys_clk), 388 356 .reset(ana_reset[i]), 389 .data_ready(data_ready [i]),357 .data_ready(data_ready), 390 358 .uwt_flag(uwt_flag3[i]), 391 359 .peak_ready(ana_peak_ready[i]), … … 411 379 .clk(sys_clk), 412 380 .reset(trg_reset[i]), 413 .data_ready(data_ready [i]),381 .data_ready(data_ready), 414 382 .data(trg_mux_data[i]), 415 383 .threshold(cfg_trg_threshold[i]), … … 420 388 .clk(sys_clk), 421 389 .reset(osc_reset[i]), 422 .data_ready(data_ready [i]),390 .data_ready(data_ready), 423 391 .data(osc_mux_data[i]), 424 392 .trigger(osc_trig[i]), … … 440 408 441 409 case(mux_type) 442 // case({mux_type, mux_chan})443 410 1'b0: 444 // 3'b000, 3'b001, 3'b010, 3'b011:445 411 begin 446 412 osc_reset[mux_chan] = mux_reset; … … 452 418 453 419 1'b1: 454 // 3'b100, 3'b101, 3'b110, 3'b011:455 420 begin 456 421 hst_reset[mux_chan] = mux_reset; … … 524 489 .ram_addr(RAM_ADDR), 525 490 .ram_data({RAM_DQA, RAM_DQAP, RAM_DQB, RAM_DQBP}), 526 .ept_data_ready( ept_data_ready),527 .ept_data( ept_data),491 .ept_data_ready(data_ready), 492 .ept_data({cmp_data, data[2], data[1], data[0]}), 528 493 .i2c_wrreq(i2c_wrreq), 529 494 .i2c_data(i2c_data),
Note:
See TracChangeset
for help on using the changeset viewer.