Changeset 42
- Timestamp:
- Sep 12, 2009, 2:04:57 AM (15 years ago)
- Location:
- trunk/MultiChannelUSB
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MultiChannelUSB/Paella.v
r41 r42 134 134 reg [11:0] adc_data; 135 135 136 wire adc_lvds_clk;137 136 wire [11:0] adc_lvds_data [2:0]; 138 137 … … 161 160 .lvds_fco(ADC_FCO), 162 161 .lvds_d(ADC_D), 163 .adc_clk(adc_lvds_clk),164 162 .adc_db(adc_lvds_data[0]), 165 163 .adc_dc(adc_lvds_data[1]), … … 167 165 168 166 adc_fifo adc_fifo_unit ( 169 .adc_clk( adc_lvds_clk),167 .adc_clk(ADC_FCO), 170 168 .adc_data(adc_lvds_data[1]), 171 169 .aclr(adc_fifo_aclr), -
trunk/MultiChannelUSB/adc_lvds.v
r41 r42 5 5 input wire [2:0] lvds_d, 6 6 7 output wire adc_clk, 8 output wire [11:0] adc_db, 9 output wire [11:0] adc_dc, 10 output wire [11:0] adc_dd 7 output reg [11:0] adc_db, 8 output reg [11:0] adc_dc, 9 output reg [11:0] adc_dd 11 10 ); 12 11 13 12 14 13 wire [2:0] int_data_h, int_data_l; 15 reg [11:0] int_data_ sr[2:0];14 reg [11:0] int_data_next [2:0]; 16 15 reg [11:0] int_data [2:0]; 17 reg int_fco;18 19 integer i;20 16 21 17 altddio_in #( 22 18 .intended_device_family("Cyclone III"), 23 .invert_input_clocks("O FF"),19 .invert_input_clocks("ON"), 24 20 .lpm_type("altddio_in"), 25 21 .width(3)) altddio_in_unit ( … … 36 32 always @ (posedge lvds_dco) 37 33 begin 38 for(i = 0; i < 3; i = i + 1) 39 begin 40 int_data_sr[i] <= {int_data_sr[i][9:0], int_data_h[i], int_data_l[i]}; 41 end 42 43 // one clock delay for FCO 44 int_fco <= lvds_fco; 45 46 if((lvds_fco) & (~int_fco)) 47 begin 48 for(i = 0; i < 3; i = i + 1) 49 begin 50 int_data[i] <= {int_data_sr[i][9:0], int_data_h[i], int_data_l[i]}; 51 end 52 end 34 int_data[0] <= int_data_next[0]; 35 int_data[1] <= int_data_next[1]; 36 int_data[2] <= int_data_next[2]; 53 37 end 54 38 55 assign adc_clk = int_fco; 56 assign adc_db = int_data[0]; 57 assign adc_dc = int_data[1]; 58 assign adc_dd = int_data[2]; 39 always @ (posedge lvds_fco) 40 begin 41 adc_db <= int_data_next[0]; 42 adc_dc <= int_data_next[1]; 43 adc_dd <= int_data_next[2]; 44 end 45 46 always @* 47 begin 48 int_data_next[0] = {int_data[0][9:0], int_data_l[0], int_data_h[0]}; 49 int_data_next[1] = {int_data[1][9:0], int_data_l[1], int_data_h[1]}; 50 int_data_next[2] = {int_data[2][9:0], int_data_l[2], int_data_h[2]}; 51 end 59 52 60 53 endmodule -
trunk/MultiChannelUSB/oscilloscope.v
r27 r42 106 106 trig_addr_next = addr_reg; 107 107 end 108 state_next <= 4'd4;108 state_next = 4'd4; 109 109 end 110 110 end … … 113 113 begin 114 114 // stop write 115 wren_next <= 1'b0;115 wren_next = 1'b0; 116 116 addr_next = addr_reg + 10'd1; 117 117 if (trig_reg | (counter_reg < 10'd512))
Note:
See TracChangeset
for help on using the changeset viewer.