我给你个5510采集部分的Verilog,至于FIFO要看你的FPGA型号,如用Altera公司的就可以在Quartus中用LPM定制
module ADC_TCL5510(clk,Res,AD_d,ADclk,ADOE,data,data_lock);
input clk;//采样时钟输入
input Res;//复位
input [7:0]AD_d;//8位AD数据
output ADclk;//到TCL5510的CLK
output ADOE;//到TCL5510的OE(使能)
output [7:0]data;//8位数据
output data_lock;//数据输出锁存信号
reg ADclk;//到TCL5510的CLK
reg ADOE;//到TCL5510的OE(使能)
reg [7:0]data;//8位数据
reg data_lock;//数据输出锁存信号
reg lock;
reg [1:0]State;
parameter S0=2'b00,
S1=2'b01;
always@(posedge clk or negedge Res)
begin
if(!Res)
begin
State<=S0;
ADOE<=1'b1;
end
else
begin
Do_ADC;
if(lock)
begin
data<=AD_d;
end
end
end
task Do_ADC;
begin
case(State)
S0:
begin
ADclk<=1'b1;
lock<=1'b1;
data_lock<=1'b0;
ADOE<=1'b0;
State<=S1;
end
S1:
begin
ADclk<=1'b0;
lock<=1'b0;
data_lock<=1'b1;
ADOE<=1'b0;
State<=S0;
end
default:
begin
ADclk<=1'b0;
lock<=1'b0;
data_lock<=1'b1;
ADOE<=1'b1;
State<=S0;
end
endcase
end
endtask
endmodule