Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试在 matlab 中读取文本文件并将其转换为位。然后我想访问它们并将它们存储在我的模块中的一个寄存器中。然后我在模块内使用这些位。我可以这样做吗?如果是,如何?谢谢你。
有几种方法可以将文本文件读入 Verilog 并将数值存储到变量中。最简单的方法是使用$readmemb系统任务并将值存储到reg数组中。
$readmemb
reg
另一种工作量更大但也更灵活的方法是使用$fopen系统任务。请参阅 IEEE Verilog 标准(例如,1800-2009)。
$fopen