我想组织阅读记忆

时间:2013-03-23 05:37:48

标签: verilog computer-architecture modelsim

我想使用enable input MemRead以组合方式读取内存。 此外,输入i_data在时钟上升沿写入存储器。

但它不起作用。我使用always语句不正确吗?

文件datamemory.txt包含

00000000 00000000 00000000 00000001
00000000 00000000 00000000 00000001
00000000 00000000 00000000 00001000
00000000 00000000 00000000 00100000

此波形显示 enter image description here

我希望您更正我的代码中的错误。 但我必须遵循这个限制。

1. memory is read combinationally if Memread is 1

2. i_data is written into memory on rising clock edge and MemWrite 1.

内存观察窗口显示 enter image description here 提前谢谢。

0 个答案:

没有答案