|
楼主 |
发表于 2015-5-27 09:26:36
|
显示全部楼层
实验室的女生,伤不起阿!adc的控制不难,但是与fifo结合起来就有点麻烦!控制部分时序我贴出来了。fifo存储部分还在看,希望有大神帮忙呢!感激不尽阿
]
adc时序图
module adc_save(clk,ioclk,datain,pd,rst_n);
input clk,rst_n;
input [7:0]datain;
output ioclk,pd;
reg ioclk,pd;
//reg [7:0]count;
reg [3:0]cnt;
reg [7:0]data_t;//temp_data
///////////////////initial
///////////////////
assign ioclk=clk;
always (posedge ioclk,negedge ioclk,negedge rst_n)
begin
if (!rst_n)
begin
pd<=0;
cnt<=0;
state<=sample;
end
case(state)
sample:
begin
if (!ioclk)
begin data_t<=datain;state<=save;end
else begin state<=sample; end
end
save:
begin
if (ioclk)
begin
...
end
end
end
endmodule |
|