problem of memory initialization
时间:10-02
整理:3721RD
点击:
hi,everyone
i simulate my design with an off-chip memory with these steps below:
1.if my memory is defined as following:
module memory(...);
...
reg[31:0] mem [07:00];
...
2.then i initialize it in my testbench:
$readmemh("mem0.in", memory0.mem);
3. and my "mem0.in" :
@000C012340
@0113057A21
@0202000002
@0311222335
@0452578847
@051565A005
@0650003847
@0715A00705
but i find that my memory is not initialized, what's wrong ?
plz help me!
thanks in advance !
sevid
i simulate my design with an off-chip memory with these steps below:
1.if my memory is defined as following:
module memory(...);
...
reg[31:0] mem [07:00];
...
2.then i initialize it in my testbench:
$readmemh("mem0.in", memory0.mem);
3. and my "mem0.in" :
@000C012340
@0113057A21
@0202000002
@0311222335
@0452578847
@051565A005
@0650003847
@0715A00705
but i find that my memory is not initialized, what's wrong ?
plz help me!
thanks in advance !
sevid
3
nice see you again
你尝试看看先把阵列的值初始化一下, 在调用$readmemh.