data/full_repos/permissive/508266496/sources/DataMemory.v
1: b'%Error: data/full_repos/permissive/508266496/sources/DataMemory.v:40: Unsupported or unknown PLI call: $writememb\n$writememb("dataMemory.mem", dMem);\n^~~~~~~~~~\n%Error: Exiting due to 1 error(s)\n        ... See the manual and https://verilator.org for more assistance.\n'
module DataMemory(input[15:0] Adresa, input[15:0] WriteData,
 input Clock, input MemWrite, input MemRead, output[15:0] ReadData);
reg[7:0] dMem[127:0];

initial $readmemb("dataMemory.mem", dMem);

always @(posedge Clock)
begin

if(MemWrite) 
begin
dMem[Adresa] <= WriteData[15:8];
dMem[Adresa+1] <= WriteData[7:0];
end

end

always @(negedge Clock)
begin
$writememb("dataMemory.mem", dMem);
end
assign ReadData = {dMem[Adresa],dMem[Adresa+1]};
endmodule
module DataMemory(input[15:0] Adresa, input[15:0] WriteData,
 input Clock, input MemWrite, input MemRead, output[15:0] ReadData);

reg[7:0] dMem[127:0];

initial $readmemb("dataMemory.mem", dMem);

always @(posedge Clock)
begin

if(MemWrite) 
begin
dMem[Adresa] <= WriteData[15:8];
dMem[Adresa+1] <= WriteData[7:0];
end

end

always @(negedge Clock)
begin
$writememb("dataMemory.mem", dMem);
end
assign ReadData = {dMem[Adresa],dMem[Adresa+1]};
endmodule