|
本人由于可能要用到初始化一个LCD的功能寄存器,故需要用到FPGA的内部RAM,现在我调用了其 自带的 IP后,用波形仿真取得不到结果,忘有高人指点。。
verilog 如下面
module M4KTEST
(
//Input ports.
SYSCLK,
RST_B,
//Output ports
datas,
reads
);
//===========================================================================
//Input and output declaration
//===========================================================================
input SYSCLK;
input RST_B ;
output [7:0] datas;
output [4:0] reads;
reg [4:0] reads;
reg [4:0] reads_n;
wire [7:0] datas;
wire clk;
always @( negedge RST_B or negedge clk)
begin
if(!RST_B)
reads <= 5'h0;
else
reads <= reads_n ;
end
always @( negedge RST_B or negedge clk)
begin
if(!RST_B)
reads_n <= 5'h0;
// else if (reads==5'h1f)
// reads_n <= 5'h0;
else
reads_n <= reads_n + 5'h01;
end
m4k mym4k(
.address(reads),
.clock(SYSCLK),
.data(),
.wren(),
.q (datas)
);
pll mypll (
.inclk0(SYSCLK) ,
.c0 (clk)
);
endmodule |
阿莫论坛20周年了!感谢大家的支持与爱护!!
知道什么是神吗?其实神本来也是人,只不过神做了人做不到的事情 所以才成了神。 (头文字D, 杜汶泽)
|