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.

how to address input pixels in test bench?

Status
Not open for further replies.

JKR1

Junior Member level 3
Joined
Aug 24, 2015
Messages
29
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
208
hi
i want to do some image processing,I have written codes that doing some process on one pixel,the input pixels are in text file,first read each line do some processing and save the output pixel,here is the testbench :
Code:
WHILE NOT(ENDFILE(infile)) LOOP
      READLINE (infile, my_line);
      READ (my_line, p_in1);
but now i want to do processing on 4 pixels together for example like this :
Code:
for i in 0 to 100
for j in 0 to 100
p_out=a(i)+a(i+j)
i assume the data in textfile as RAM named a.
my problem is that i dont know how to address the data in textfile?exactly I dont know how to do this addressing in testbench?
thanks
 

Either read the text file into RAM in a initiliazing function. Then perform the simulation out of the RAM.

Or make a two step simulation.
Read the data in one process into RAM, then pause it forever. Start the second process doing the actual simulation thereafter.

More generally speaking:
1. read a tutorial about writing testbenches
2. think
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top