always @(negedge iCLK or negedge Ram1Read )
begin
if (!Ram1Read) begin
RAM1_WriteAddr <= 18'h00000; //地址初始化
Ram1Write <= 1;
end
else begin
Ram1Write <= 0;
RAM1_Data <= count[15:0]; //指纹数据 count[15:0]
RAM1_WriteAddr <= RAM1_WriteAddr + 1;
end
end
always @(PA[7] or RAM1_ReadAddr or RAM1_WriteAddr )
begin
if (!PA[7]) begin
Ram1WriteEnable = 0; //复位时,初始值?≡馬AM1
end
else begin
if(RAM1_ReadAddr>=18'h3FF ) //当读地址大于读结束进入写状态4c000
begin
Ram1WriteEnable = 0;
end
else
if(RAM1_WriteAddr>=18'h3FF) //当写地址大于,写满进入读状态 4B8C4
begin
Ram1WriteEnable = 1;
end
end
end
always @(negedge USB_CLK or negedge Ram1WriteEnable)
begin
if (!Ram1WriteEnable) begin
RAM1_ReadAddr <= 18'h00000; //地址初始化
Ram1Read <= 1;
end
else begin
Ram1Read <= 0;
RAM1_ReadAddr <= RAM1_ReadAddr +18'h00001;
end
end
//RAM1读、写、片选信号
assign RAM1_OE = Ram1Read; //RAM1读信号,当RamSle?碦AM2时读RAM1
assign RAM1_WE = Ram1Write; //RAM1写信号,当RamSle=0,读RAM2时写RAM1
assign RAM1_CE = 0; //RAM1片选信号,一直有效
assign RAM1_D = (RAM1_WE) ? 16'bz : RAM1_Data; //写数据
assign RAM1_A = (Ram1WriteEnable)?RAM1_WriteAddr:RAM1_ReadAddr;
大家帮忙看一下,写时钟是12MHz,读时钟是48MHz,采用的是IS61LV25616 ,count值是从0递增1的数据,数据通过68013上传到上位机,接收的数据发现一个数据 重复接收两次,而且每接收512字节递增数据后,数据大跳变后再递增512,请问大侠们这会是什么原因呢。程序有什么问题?谢谢
https://bbs.21ic.com/frame.php?frameon=yes&referer=http%3A//bbs.21ic.com/iclist-120.html |