110235Syasuko.eckert@amd.comregression.py
210235Syasuko.eckert@amd.com
310235Syasuko.eckert@amd.comCopyright (c) 2010-2014 Advanced Micro Devices, Inc.
410235Syasuko.eckert@amd.comAll rights reserved.
510235Syasuko.eckert@amd.com
610235Syasuko.eckert@amd.comRedistribution and use in source and binary forms, with or without
710235Syasuko.eckert@amd.commodification, are permitted provided that the following conditions are
810235Syasuko.eckert@amd.commet: redistributions of source code must retain the above copyright
910235Syasuko.eckert@amd.comnotice, this list of conditions and the following disclaimer;
1010235Syasuko.eckert@amd.comredistributions in binary form must reproduce the above copyright
1110235Syasuko.eckert@amd.comnotice, this list of conditions and the following disclaimer in the
1210235Syasuko.eckert@amd.comdocumentation and/or other materials provided with the distribution;
1310235Syasuko.eckert@amd.comneither the name of the copyright holders nor the names of its
1410235Syasuko.eckert@amd.comcontributors may be used to endorse or promote products derived from
1510235Syasuko.eckert@amd.comthis software without specific prior written permission.
1610235Syasuko.eckert@amd.com
1710235Syasuko.eckert@amd.comTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1810235Syasuko.eckert@amd.com"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1910235Syasuko.eckert@amd.comLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
2010235Syasuko.eckert@amd.comA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
2110235Syasuko.eckert@amd.comOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2210235Syasuko.eckert@amd.comSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
2310235Syasuko.eckert@amd.comLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2410235Syasuko.eckert@amd.comDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2510235Syasuko.eckert@amd.comTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2610235Syasuko.eckert@amd.com(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2710235Syasuko.eckert@amd.comOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2810235Syasuko.eckert@amd.com
2910235Syasuko.eckert@amd.comAuthors: Yasuko Eckert <yasuko.eckert@amd.com>
3010235Syasuko.eckert@amd.com         Joel Hestness <hestness@cs.wisc.edu> (while interning at AMD)
3110235Syasuko.eckert@amd.com
3210235Syasuko.eckert@amd.com
3310235Syasuko.eckert@amd.comIntroduction
3410235Syasuko.eckert@amd.com============
3510235Syasuko.eckert@amd.com
3610235Syasuko.eckert@amd.comThis regression tester is for the McPAT power model.
3710235Syasuko.eckert@amd.comThis tester can compile and runs McPAT on the input contained in the
3810235Syasuko.eckert@amd.comspecified directory, and then compares the output to that of a golden run in
3910235Syasuko.eckert@amd.comorder to ensure that specific power and area calculations do not change.
4010235Syasuko.eckert@amd.com
4110235Syasuko.eckert@amd.comNine tests are included in the initial version of this tester in the directories:
4210235Syasuko.eckert@amd.com    $GEM5/ext/mcpat/regression/test-*
4310235Syasuko.eckert@amd.com
4410235Syasuko.eckert@amd.comIn each directory, you will find a regression test input file
4510235Syasuko.eckert@amd.com(power_region0.xml) and the golden-run output (region0.out.bak).
4610235Syasuko.eckert@amd.comThe tester's output file is saved as region0.out, which is then checked against
4710235Syasuko.eckert@amd.comregion0.out.bak.
4810235Syasuko.eckert@amd.com
4910235Syasuko.eckert@amd.com
5010235Syasuko.eckert@amd.comOptions
5110235Syasuko.eckert@amd.com=======
5210235Syasuko.eckert@amd.com--help, -h      Show a help message and exit
5310235Syasuko.eckert@amd.com--build, -b     Build McPAT before running tests
5410235Syasuko.eckert@amd.com--cleanup, -c   Clean up the specified regression directory
5510235Syasuko.eckert@amd.com--force, -f     Force run regression even if directory isn't set up
5610235Syasuko.eckert@amd.com--maketest, -m  Set up the specified test directory
5710235Syasuko.eckert@amd.com--verbose, -v   Print verbose output
5810235Syasuko.eckert@amd.com
5910235Syasuko.eckert@amd.com
6010235Syasuko.eckert@amd.comHow to Use
6110235Syasuko.eckert@amd.com==========
6210235Syasuko.eckert@amd.com
6310235Syasuko.eckert@amd.comThe regression tester must be invoked from the McPAT directory.
6410235Syasuko.eckert@amd.com
6510235Syasuko.eckert@amd.com% cd $GEM5/ext/mcpat
6610235Syasuko.eckert@amd.com
6710235Syasuko.eckert@amd.com
6810235Syasuko.eckert@amd.comTo run all regression tests:
6910235Syasuko.eckert@amd.com% ./regression/regression.py ./regression/
7010235Syasuko.eckert@amd.com
7110235Syasuko.eckert@amd.com
7210235Syasuko.eckert@amd.comTo run a particular regression test, specify its directory to the tester:
7310235Syasuko.eckert@amd.com% ./regression/regression.py ./regression/test-0
7410235Syasuko.eckert@amd.com
7510235Syasuko.eckert@amd.comSpecify the "-v" option to see a diff of the regression output.
76