... <看更多>
「verilog readmemh」的推薦目錄:
- 關於verilog readmemh 在 [問題] Verilog $readmemh數值錯誤如何debug - 看板Electronics 的評價
- 關於verilog readmemh 在 What is the function of $readmemh and $writememh in Verilog? 的評價
- 關於verilog readmemh 在 lf-/readmem: Verilog $readmemb/$readmemh for Rust - GitHub 的評價
- 關於verilog readmemh 在 Verilog——文件读写 - East1203 的評價
- 關於verilog readmemh 在 Verilog... - Engineers & Students of Front-End Chip Design 的評價
- 關於verilog readmemh 在 verilog readmemh or readmemb code with complete test-bench. 的評價
verilog readmemh 在 lf-/readmem: Verilog $readmemb/$readmemh for Rust - GitHub 的推薦與評價
readmem. A rust library to read data of the format required by the Verilog system tasks $readmemb and $readmemh . Example:. ... <看更多>
verilog readmemh 在 Verilog——文件读写 - East1203 的推薦與評價
$readmemb和$readmemh用来从文件中读取数据到存储器中。 读取的内容只包括:空白位置(空格、换行、制表格(tab和form-feeds),注释行、二进制或十六进 ... ... <看更多>
verilog readmemh 在 Verilog... - Engineers & Students of Front-End Chip Design 的推薦與評價
Verilog readmemh (or readmemb) function. Start with test-bench file operations for hex and binary values. http://www.fullchipdesign.com/readmemh.htm. ... <看更多>
verilog readmemh 在 [問題] Verilog $readmemh數值錯誤如何debug - 看板Electronics 的推薦與評價
各位前輩好,自學Verilog大約2個月
現在遇到的專案問題,是想要用$readmemh載入memory數值,但發現載入的數值是錯誤的
我寫了一支簡單的.v如下:
`timescale 1ns/100ps
`define DELAY #1
module mem_rd(rst_n, clk, data, data2);
input rst_n;
input clk;
output [15:0] data;
output [15:0] data2;
reg [15:0] data;
reg [15:0] data2;
reg [15:0] data_mem[0:1];
initial begin
$readmemh("test_data.mem", data_mem);
end
always @(posedge clk or negedge rst_n)
if (!rst_n)
data <= `DELAY 16'h1000;
else begin
data <= `DELAY data_mem[0][15:0];
end
always @(posedge clk or negedge rst_n)
if (!rst_n)
data2 <= `DELAY 16'h2000;
else begin
data2 <= `DELAY data_mem[1][15:0];
end
endmodule
在test_data.mem中的資料為:
f0f0,0f0f
預期執行結果為
initial 經過clk正緣觸發後
data 16'h1000 16'hf0f0
data2 16'h2000 16'h0f0f
經過測試,data & data2在clk正緣觸發後,數值皆為16'hffff
我的模擬環境比較特殊,是在SIMetrix/SIMPLIS v8.20a下跑的,
但SIMetrix應該是用VVP來處理verilog的部分
我覺得很有可能是我的verilog code犯了很蠢的錯誤,但找了很久還是沒有發現...
希望有前輩們可以提供一些建議,我再去試試看
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 111.249.65.183 (臺灣)
※ 文章網址: https://www.ptt.cc/bbs/Electronics/M.1567290945.A.3FB.html
※ 編輯: piliGTcat (111.249.65.183 臺灣), 09/01/2019 06:36:38
... <看更多>