"I am a person who works hard and plays hard."

Yuan Wei
Second Year Graduate Student Department of Computer Science
University of Virginia Charlottesville, VA 22903
Email: yw3f@cs.virginia.edu


Source Code Analysis

Main Page   Compound List   File List   Compound Members   File Members  

eio.h

Go to the documentation of this file.
00001 /*
00002  * eio.h - external interfaces to external I/O files
00003  *
00004  * This file is a part of the SimpleScalar tool suite written by
00005  * Todd M. Austin as a part of the Multiscalar Research Project.
00006  *  
00007  * The tool suite is currently maintained by Doug Burger and Todd M. Austin.
00008  * 
00009  * Copyright (C) 1997, 1998 by Todd M. Austin
00010  *
00011  * This source file is distributed "as is" in the hope that it will be
00012  * useful.  The tool set comes with no warranty, and no author or
00013  * distributor accepts any responsibility for the consequences of its
00014  * use. 
00015  * 
00016  * Everyone is granted permission to copy, modify and redistribute
00017  * this tool set under the following conditions:
00018  * 
00019  *    This source code is distributed for non-commercial use only. 
00020  *    Please contact the maintainer for restrictions applying to 
00021  *    commercial use.
00022  *
00023  *    Permission is granted to anyone to make or distribute copies
00024  *    of this source code, either as received or modified, in any
00025  *    medium, provided that all copyright notices, permission and
00026  *    nonwarranty notices are preserved, and that the distributor
00027  *    grants the recipient permission for further redistribution as
00028  *    permitted by this document.
00029  *
00030  *    Permission is granted to distribute this file in compiled
00031  *    or executable form under the same conditions that apply for
00032  *    source code, provided that either:
00033  *
00034  *    A. it is accompanied by the corresponding machine-readable
00035  *       source code,
00036  *    B. it is accompanied by a written offer, with no time limit,
00037  *       to give anyone a machine-readable copy of the corresponding
00038  *       source code in return for reimbursement of the cost of
00039  *       distribution.  This written offer must permit verbatim
00040  *       duplication by anyone, or
00041  *    C. it is distributed by someone who received only the
00042  *       executable form, and is accompanied by a copy of the
00043  *       written offer of source code that they received concurrently.
00044  *
00045  * In other words, you are welcome to use, share and improve this
00046 
00047  * source file.  You are forbidden to forbid anyone else to use, share
00048  * and improve what you give them.
00049  *
00050  * INTERNET: dburger@cs.wisc.edu
00051  * US Mail:  1210 W. Dayton Street, Madison, WI 53706
00052  *
00053  * $Id: eio.h,v 1.1.1.1 2000/05/26 15:21:52 taustin Exp $
00054  *
00055  * $Log: eio.h,v $
00056  * Revision 1.1.1.1  2000/05/26 15:21:52  taustin
00057  * SimpleScalar Tool Set
00058  *
00059  *
00060  * Revision 1.1  1998/08/27 08:21:37  taustin
00061  * Initial revision
00062  *
00063  *
00064  */
00065 
00066 #ifndef EIO_H
00067 #define EIO_H
00068 
00069 #include <stdio.h>
00070 
00071 /* EIO file formats */
00072 #define EIO_PISA_FORMAT                 1
00073 #define EIO_ALPHA_FORMAT                2
00074 
00075 /* EIO file version */
00076 #define EIO_FILE_VERSION                3
00077 
00078 FILE *eio_create(char *fname);
00079 
00080 FILE *eio_open(char *fname);
00081 
00082 /* returns non-zero if file FNAME has a valid EIO header */
00083 int eio_valid(char *fname);
00084 
00085 void eio_close(FILE *fd);
00086 
00087 /* check point current architected state to stream FD, returns
00088    EIO transaction count (an EIO file pointer) */
00089 counter_t
00090 eio_write_chkpt(struct regs_t *regs,            /* regs to dump */
00091                 struct mem_t *mem,              /* memory to dump */
00092                 FILE *fd);                      /* stream to write to */
00093 
00094 /* read check point of architected state from stream FD, returns
00095    EIO transaction count (an EIO file pointer) */
00096 counter_t
00097 eio_read_chkpt(struct regs_t *regs,             /* regs to dump */
00098                 struct mem_t *mem,              /* memory to dump */
00099                 FILE *fd);                      /* stream to read */
00100 
00101 /* syscall proxy handler, with EIO tracing support, architect registers
00102    and memory are assumed to be precise when this function is called,
00103    register and memory are updated with the results of the sustem call */
00104 void
00105 eio_write_trace(FILE *eio_fd,                   /* EIO stream file desc */
00106                 counter_t icnt,                 /* instruction count */
00107                 struct regs_t *regs,            /* registers to update */
00108                 mem_access_fn mem_fn,           /* generic memory accessor */
00109                 struct mem_t *mem,              /* memory to update */
00110                 md_inst_t inst);                /* system call inst */
00111 
00112 /* syscall proxy handler from an EIO trace, architect registers
00113    and memory are assumed to be precise when this function is called,
00114    register and memory are updated with the results of the sustem call */
00115 void
00116 eio_read_trace(FILE *eio_fd,                    /* EIO stream file desc */
00117                counter_t icnt,                  /* instruction count */
00118                struct regs_t *regs,             /* registers to update */
00119                mem_access_fn mem_fn,            /* generic memory accessor */
00120                struct mem_t *mem,               /* memory to update */
00121                md_inst_t inst);                 /* system call inst */
00122 
00123 /* fast forward EIO trace EIO_FD to the transaction just after ICNT */
00124 void eio_fast_forward(FILE *eio_fd, counter_t icnt);
00125 
00126 #endif /* EIO_H */


UVa CS Department of Computer Science
School of Engineering, University of Virginia
151 Engineer's Way, P.O. Box 400740
Charlottesville, Virginia 22904-4740

(434) 982-2200  Fax: (434) 982-2214