?? readmemh.v
字號(hào):
// Illustrates how to initialize a memory array from data
// stored as hexadecimal values in a data file
//
// Simulate this file directly to see the results
//
// Note: The data file must reside in the same directory
// as the .v file for the module
module readmemh_demo;
// Declare memory array that is twelve words of 32-bits each
reg [31:0] Mem [0:11];
// Fill the memory with values taken from a data file
initial $readmemh("data.txt",Mem);
// Display the contents of memory
integer k;
initial begin
$display("Contents of Mem after reading data file:");
for (k=0; k<12; k=k+1) $display("%d:%h",k,Mem[k]);
end
endmodule
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -