Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

reading values from file in verilog

Status
Not open for further replies.

anne rachel

Junior Member level 2
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....
 

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.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top