reading values from file in verilog

Status
Not open for further replies.

anne rachel

Junior Member level 2
Joined
Jan 11, 2011
Messages
20
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,435
I am not able to simulate a verilog code where i am reading the input values from a .txt file.Kindly help me in solving dis issue....



Thanks in advance....
 

I guess, you should start with showing your code.
 

the code is quite big ..this is the piece of code which reads values from the file...

module data_mem(index,A,B);
input wire[0:2] index;
output reg[0:128] A;
output reg[0:128] B;
reg [0:128] dmem[0:4];
initial $readmemb("data.txt", dmem);

always @(index) begin
A<=dmem[index];
B<=dmem[index+1];
end
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…