Module Characterization Flow
(DACHAR ==> Dave's
Characterization)
pronounced (day-care)
This page is intended to give you a brief explanation and resources for our module
characterization flow. I will document the overall structure of the
scripts, and what future enhancements/modifications need to be done.
There are three primary processes that are used in the characterization
1
Ocean/Vector Script Generation
2 Ocean
Simulation (this produces a database file for the module)
3
Fetching the desired data from the correct module database file
When modifying the source code, i advise you to use a copy of emacs located in
~dvwang/bin/emacs it will color code the source code. Very nice.
Ocean/Vector generation File Structure:
usage: charmultiadder.pl <model_path>
<netlists path> <output dir path> <wordlength lists>
<corners list> <supply lists> <load lists> <period>
<input slopes> <number of vectors>
an example of this for charmultidadd.pl is shown here: add
command
note the format of each parameter!!!
You basically pass in arguments though the GUI or with the
command line using the ARGV method. Essentially modchar.pl
(look for the big green comments)
extracts the variables from the GUI and passes it to
char<module>.pl. It is this program which does most of the
work. There should be a char<module>.pl per module. An example
i have given is for an adder:
charmultiadder.pl
I have implemented it this way in the interest of time.
If you want to read in a command file or whatever, the initial variables are
initialized in the source code under "VARIABLE
INITIALIZATION" so look for that section in the source code
and that should be all you need to modify.
It will generate three types of files. The first type
is an OCEAN file which will step through and simulate over all parameters.
The second one is an EPIC vector file that will excite the critical path and
generate random numbers for power analysis. The third is a stimulus file
for OCEAN that is converted into a piece-wise-linear construction of the epic
vectors.
Also note that treesed.pl is a outside program that I
use and is needed for you to run the program.

Ocean Simulation
After the Ocean and stimulus file is created, make sure your
cadence environment is set up (also make sure you're running Exceed and F-secure
Ssh so it can forward display info) and type:
prompt% cdsup (if
you're using Rhett's script)
prompt% ocean < module.ocn

This will run through many simulations and write the output file
to the Database file, which should be called <module> in all caps, (you
can change the code as you see fit.) Please look over the adder
ocean file to see what's going on. I have marked things that you
should note in red.
Fetching info from the Database:
I've also written a script that will go
through the Database and return the values you ask for it:
usage: fetch.pl "database_directory"
"module_name" wordlength supply load "corner" "query"
by passing the program the needed database directory, module name,
wordlength, supply, load and corner as
well as your query ("delay", "input_cap", "avg_power"...
see source code)
Example:
fetch.pl "/vol/hitz/home/dvwang/char/example/ADDER" "add" 9 2.2 50e-15 "typ" "delay"

The way fetch works is it approaches the problem
from three cases. 1) if the supply lower than the data 2)if it lies within
the simulated data 3)if the supply exceeds the simulated data
For the 2nd case, it will perform a linear
interpolation of the delay, and for cases 1 and 2, it will perform a linear
interpolation with either double or half the slope, depending on the
case.
Since power is a squared law like delay, the template
for the delay search can easily be extended to include the power.
Please make this addition to the source code when you have time.
IMPORTANT: Make sure that the database file has data in it, otherwise it
will not work.
Final Comments:
Nathan: please make sure that all the directory
paths are correct when you port everything over. The OCEAN file
directories, stimulus file vecfiles, etc will all change once you move the
stuff. Please update them when you modify the code. Good Luck!!!
email me at: bdojklfds@hotmail.com
Useful File Paths:
The current location of the perl scripts is located in: /vol/hitz/home/dvwang/char/example/*
- modchar.pl -this is the Graphical User Interface which will call upon other
scripts to generate. It uses the scripting language of perl/Tk. Please talk to
Kevin Zimmerman on setting up the environment if there are problems. However, as
long as you include the two lines:
#!/usr/local/bin/perl
use Tk;
You should be able to program in perl/Tk.
- charmultiadd.pl
- treesed.pl :
- fetch.pl
Example Code as well as Online
Documentation are available. Please pick up a copy of Programming Perl by O'reilly. It's pretty
useful.
|