专家
公告
财富商城
电子网
旗下网站
首页
问题库
专栏
标签库
话题
专家
NEW
门户
发布
提问题
发文章
lattice双口ram读写
2019-03-25 08:25
发布
×
打开微信“扫一扫”,打开网页后点击屏幕右上角分享按钮
站内问答
/
FPGA
6223
3
1415
lattice双口ram怎么不能写入数据呀??? 此帖出自
小平头技术问答
友情提示:
此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
该问题目前已经被作者或者管理员关闭, 无法添加新回复
3条回答
lxglovehome
1楼-- · 2019-03-25 16:20
< / module TEST_DPRAM(clk,outA);
input clk;
output wire [7:0] outA;
wire [7:0] dpraminaddr;
wire [7:0] dpramindata;
wire [7:0] ramoutdataA;
wire WrEn;
// wire clken;
// assign clken = ~clk;
assign WrEn = (count == 3) ? clk : 0;
assign dpraminaddr = addrin;
assign dpramindata = datain;
assign outA = ramoutdataA;
integer count = 0;
always @(posedge clk)
begin
if(count == 3)
begin
count <= 3;
end
else
begin
count <= count + 1;
end
end
reg [7:0] addrin = 0;
always @(posedge clk)
begin
if(addrin == 255)
begin
addrin <= 0;
end
else
begin
addrin <= addrin + 1;
end
end
reg [7:0] datain = 0;
always @(posedge clk)
begin
if(datain == 255)
begin
datain <= 0;
end
else
begin
datain <= datain + 1;
end
end
GSR GSR_INST (.GSR(1'b1));
PUR PUR_INST (.PUR(1'b1));
RAM_DP RAM_DP_BLOCK(.Clock(clk), .ClockEn(1'b1), .Reset(1'b0),
.WE(clk), .Address(addrin), .Data(datain), .Q(ramoutdataA));
/* DPRAM DPRAM_BLOCK(.DataInA(datain), .DataInB(datain), .AddressA(addrin),
.AddressB(addrin),.ClockA(clken), .ClockB(clken),
.ClockEnA(1'b1), .ClockEnB(1'b1), .WrA(WrEn), .WrB(WrEn),
.ResetA(1'b0), .ResetB(1'b0), .QA(ramoutdataA), .QB(ramoutdataB));*/
endmodule
加载中...
lxglovehome
2楼-- · 2019-03-25 17:35
module TEST_DPRAM(clk,outA);
input clk;
output wire [7:0] outA;
wire [7:0] dpraminaddr;
wire [7:0] dpramindata;
wire [7:0] ramoutdataA;
wire WrEn;
// wire clken;
// assign clken = ~clk;
assign WrEn = (count == 3) ? clk : 0;
assign dpraminaddr = addrin;
assign dpramindata = datain;
assign outA = ramoutdataA;
integer count = 0;
always @(posedge clk)
begin
if(count == 3)
begin
count <= 3;
end
else
begin
count <= count + 1;
end
end
reg [7:0] addrin = 0;
always @(posedge clk)
begin
if(addrin == 255)
begin
addrin <= 0;
end
else
begin
addrin <= addrin + 1;
end
end
reg [7:0] datain = 0;
always @(posedge clk)
begin
if(datain == 255)
begin
datain <= 0;
end
else
begin
datain <= datain + 1;
end
end
GSR GSR_INST (.GSR(1'b1));
PUR PUR_INST (.PUR(1'b1));
RAM_DP RAM_DP_BLOCK(.Clock(clk), .ClockEn(1'b1), .Reset(1'b0),
.WE(clk), .Address(addrin), .Data(datain), .Q(ramoutdataA));
/* DPRAM DPRAM_BLOCK(.DataInA(datain), .DataInB(datain), .AddressA(addrin),
.AddressB(addrin),.ClockA(clken), .ClockB(clken),
.ClockEnA(1'b1), .ClockEnB(1'b1), .WrA(WrEn), .WrB(WrEn),
.ResetA(1'b0), .ResetB(1'b0), .QA(ramoutdataA), .QB(ramoutdataB));*/
endmodule
加载中...
lxglovehome
3楼-- · 2019-03-25 18:52
问题在哪里??请看看!
加载中...
一周热门
更多
>
相关问题
相关文章
基于FPGA的详细设计流程
0个评论
Xilinx的FPGA开发工具——ISE开发流程
0个评论
嵌入式领域,FPGA的串口通信接口设计,VHDL编程,altera平台
0个评论
干货分享,FPGA硬件系统的设计技巧
0个评论
你知道Verilog HDL程序是如何构成的吗
0个评论
一种通过FPGA对AD9558时钟管理芯片进行配置的方法
0个评论
×
关闭
采纳回答
向帮助了您的网友说句感谢的话吧!
非常感谢!
确 认
×
关闭
编辑标签
最多设置5个标签!
保存
关闭
×
关闭
举报内容
检举类型
检举内容
检举用户
检举原因
广告推广
恶意灌水
回答内容与提问无关
抄袭答案
其他
检举说明(必填)
提交
关闭
×
关闭
您已邀请
15
人回答
查看邀请
擅长该话题的人
回答过该话题的人
我关注的人
input clk;
output wire [7:0] outA;
wire [7:0] dpraminaddr;
wire [7:0] dpramindata;
wire [7:0] ramoutdataA;
wire WrEn;
// wire clken;
// assign clken = ~clk;
assign WrEn = (count == 3) ? clk : 0;
assign dpraminaddr = addrin;
assign dpramindata = datain;
assign outA = ramoutdataA;
integer count = 0;
always @(posedge clk)
begin
if(count == 3)
begin
count <= 3;
end
else
begin
count <= count + 1;
end
end
reg [7:0] addrin = 0;
always @(posedge clk)
begin
if(addrin == 255)
begin
addrin <= 0;
end
else
begin
addrin <= addrin + 1;
end
end
reg [7:0] datain = 0;
always @(posedge clk)
begin
if(datain == 255)
begin
datain <= 0;
end
else
begin
datain <= datain + 1;
end
end
GSR GSR_INST (.GSR(1'b1));
PUR PUR_INST (.PUR(1'b1));
RAM_DP RAM_DP_BLOCK(.Clock(clk), .ClockEn(1'b1), .Reset(1'b0),
.WE(clk), .Address(addrin), .Data(datain), .Q(ramoutdataA));
/* DPRAM DPRAM_BLOCK(.DataInA(datain), .DataInB(datain), .AddressA(addrin),
.AddressB(addrin),.ClockA(clken), .ClockB(clken),
.ClockEnA(1'b1), .ClockEnB(1'b1), .WrA(WrEn), .WrB(WrEn),
.ResetA(1'b0), .ResetB(1'b0), .QA(ramoutdataA), .QB(ramoutdataB));*/
endmodule
input clk;
output wire [7:0] outA;
wire [7:0] dpraminaddr;
wire [7:0] dpramindata;
wire [7:0] ramoutdataA;
wire WrEn;
// wire clken;
// assign clken = ~clk;
assign WrEn = (count == 3) ? clk : 0;
assign dpraminaddr = addrin;
assign dpramindata = datain;
assign outA = ramoutdataA;
integer count = 0;
always @(posedge clk)
begin
if(count == 3)
begin
count <= 3;
end
else
begin
count <= count + 1;
end
end
reg [7:0] addrin = 0;
always @(posedge clk)
begin
if(addrin == 255)
begin
addrin <= 0;
end
else
begin
addrin <= addrin + 1;
end
end
reg [7:0] datain = 0;
always @(posedge clk)
begin
if(datain == 255)
begin
datain <= 0;
end
else
begin
datain <= datain + 1;
end
end
GSR GSR_INST (.GSR(1'b1));
PUR PUR_INST (.PUR(1'b1));
RAM_DP RAM_DP_BLOCK(.Clock(clk), .ClockEn(1'b1), .Reset(1'b0),
.WE(clk), .Address(addrin), .Data(datain), .Q(ramoutdataA));
/* DPRAM DPRAM_BLOCK(.DataInA(datain), .DataInB(datain), .AddressA(addrin),
.AddressB(addrin),.ClockA(clken), .ClockB(clken),
.ClockEnA(1'b1), .ClockEnB(1'b1), .WrA(WrEn), .WrB(WrEn),
.ResetA(1'b0), .ResetB(1'b0), .QA(ramoutdataA), .QB(ramoutdataB));*/
endmodule
一周热门 更多>