IEE5650: VLSI Testing
Assignment #3 (Due: Apr. 9, 2018)
last update: Mar. 24, 2018
Reading:
- Source codes provided in homework #0.
-
Please put all results into a report and try to discuss them.
-
Please compress the folder containing your source codes and reports to a file named by " HW3_your student ID" and
upload it to E3 (
http://dcpc.nctu.edu.tw/)
-
The report should include
- The algorithm or idea of your code.
- Several case result
- Discuss your result
- How to compile your code
- Other information(optional)
Homework Problem:
-
(150 pts) (Parallel pattern logic simulator)
-
(20pts) Please pack different number of patterns (1, 4, 8, 16) into a simulation run. Compare CPU times and memory usage
of different circuits.
-
(30 pts) Please calculate the average number of gate evaluations for different number of packed patterns. We can collect
the number of gate evaluations of each pattern and then average the number of all patterns. Does this number has correlations
with the CPU times? What is the percentage of average gate evaluations over the total number of gates?
-
(100 pts) Please write a compiled code simulator based on a fixed number (16) of parallel patterns. You can implement the
"simulator" as a method of "CIRCUIT" class. In the method, you will output gate evaluation codes in a levelized way
(like ParallelLogicSim() in psim.cc), but all gates will be scheduled. Save the output codes in a .c or .cc file and
compile it as a program. Please compare the CPU/Memory with corresponding event-driven simulators.
When comparing CPU times, please do not perform any IO functions (i.e., cout), which will dramatically slow down
the program.
-
The parallel logic simulation result by your simulator about c7552 circuit should be named
c7552.out. The PI & PO sequence must follow the sequence in podem (PIlist & POlist).
For this assignment, TA will only use combintional circuits to evaluate your program.
Grading:
-
Correctness 90%
-
Report 10%
Attention:
-
New option "-simulator" you should create is as follows :
- ./atpg -simulator [output_name] -input [input_pattern_file] [circuit_name]
Example:
Input:
- ./atpg -simulator c17.cc -input c17.input c17.bench
Example files:
-
c17.cc
-
c17.input
-
c17.out
-
Memory usage examples:
-
In command line:
- /usr/bin/time -f "Average memory usage: %K \nMaximum memory usage: %M\n" ./atpg c17.bench
-
In main.cc, add:
-
#include <sys/types.h>
#include <unistd.h>
int pid=(int) getpid();
char buf[1024];
sprintf(buf, "cat /proc/%d/statm",pid);
system(buf);
-
In main.cc, add:
- system("ps aux|grep atpg");