完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
扫一扫,分享给好友
|
本人初学FPGA,想在ROM里存几个数,拿到VGA上显示,现在VGA显示数据已经可以完成了,想在ROM里存储几个数据,拿出来进行显示。ROM这块不会做,没有找到教程。
|
|
相关推荐
1个回答
|
|
|
你所使用的eda开发软件中就有rom的模板,如:
// Quartus Prime Verilog Template // Single Port ROM module single_port_rom #(parameter DATA_WIDTH=8, parameter ADDR_WIDTH=8) ( input [(ADDR_WIDTH-1):0] addr, input clk, output reg [(DATA_WIDTH-1):0] q ); // Declare the ROM variable reg [DATA_WIDTH-1:0] rom[2**ADDR_WIDTH-1:0]; // Initialize the ROM with $readmemb. Put the memory contents // in the file single_port_rom_init.txt. Without this file, // this design will not compile. // See Verilog LRM 1364-2001 Section 17.2.8 for details on the // format of this file, or see the "Using $readmemb and $readmemh" // template later in this section. initial begin $readmemb("single_port_rom_init.txt", rom); end always @ (posedge clk) begin q <= rom[addr]; end endmodule |
|
|
|
|
你正在撰写答案
如果你是对答案或其他答案精选点评或询问,请使用“评论”功能。
NVMe高速传输之摆脱XDMA设计50:主要功能测试结果与分析2 nvmePCIe高速存储
252 浏览 0 评论
NVMe高速传输之摆脱XDMA设计49:主要功能测试结果与分析1
1501 浏览 0 评论
907 浏览 0 评论
855 浏览 0 评论
658 浏览 0 评论
4426 浏览 63 评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-2 03:49 , Processed in 0.642123 second(s), Total 70, Slave 53 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
8640