isa.hh revision 7320
16313Sgblack@eecs.umich.edu/*
27093Sgblack@eecs.umich.edu * Copyright (c) 2010 ARM Limited
37093Sgblack@eecs.umich.edu * All rights reserved
47093Sgblack@eecs.umich.edu *
57093Sgblack@eecs.umich.edu * The license below extends only to copyright in the software and shall
67093Sgblack@eecs.umich.edu * not be construed as granting a license to any other intellectual
77093Sgblack@eecs.umich.edu * property including but not limited to intellectual property relating
87093Sgblack@eecs.umich.edu * to a hardware implementation of the functionality of the software
97093Sgblack@eecs.umich.edu * licensed hereunder.  You may use the software subject to the license
107093Sgblack@eecs.umich.edu * terms below provided that you ensure that this notice is replicated
117093Sgblack@eecs.umich.edu * unmodified and in its entirety in all distributions of the software,
127093Sgblack@eecs.umich.edu * modified or unmodified, in source code or in binary form.
137093Sgblack@eecs.umich.edu *
146313Sgblack@eecs.umich.edu * Copyright (c) 2009 The Regents of The University of Michigan
156313Sgblack@eecs.umich.edu * All rights reserved.
166313Sgblack@eecs.umich.edu *
176313Sgblack@eecs.umich.edu * Redistribution and use in source and binary forms, with or without
186313Sgblack@eecs.umich.edu * modification, are permitted provided that the following conditions are
196313Sgblack@eecs.umich.edu * met: redistributions of source code must retain the above copyright
206313Sgblack@eecs.umich.edu * notice, this list of conditions and the following disclaimer;
216313Sgblack@eecs.umich.edu * redistributions in binary form must reproduce the above copyright
226313Sgblack@eecs.umich.edu * notice, this list of conditions and the following disclaimer in the
236313Sgblack@eecs.umich.edu * documentation and/or other materials provided with the distribution;
246313Sgblack@eecs.umich.edu * neither the name of the copyright holders nor the names of its
256313Sgblack@eecs.umich.edu * contributors may be used to endorse or promote products derived from
266313Sgblack@eecs.umich.edu * this software without specific prior written permission.
276313Sgblack@eecs.umich.edu *
286313Sgblack@eecs.umich.edu * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
296313Sgblack@eecs.umich.edu * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
306313Sgblack@eecs.umich.edu * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
316313Sgblack@eecs.umich.edu * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
326313Sgblack@eecs.umich.edu * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
336313Sgblack@eecs.umich.edu * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
346313Sgblack@eecs.umich.edu * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
356313Sgblack@eecs.umich.edu * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
366313Sgblack@eecs.umich.edu * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
376313Sgblack@eecs.umich.edu * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
386313Sgblack@eecs.umich.edu * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
396313Sgblack@eecs.umich.edu *
406313Sgblack@eecs.umich.edu * Authors: Gabe Black
416313Sgblack@eecs.umich.edu */
426313Sgblack@eecs.umich.edu
436313Sgblack@eecs.umich.edu#ifndef __ARCH_ARM_ISA_HH__
446313Sgblack@eecs.umich.edu#define __ARCH_MRM_ISA_HH__
456313Sgblack@eecs.umich.edu
466333Sgblack@eecs.umich.edu#include "arch/arm/registers.hh"
476313Sgblack@eecs.umich.edu#include "arch/arm/types.hh"
486313Sgblack@eecs.umich.edu
496333Sgblack@eecs.umich.educlass ThreadContext;
506313Sgblack@eecs.umich.educlass Checkpoint;
516313Sgblack@eecs.umich.educlass EventManager;
526313Sgblack@eecs.umich.edu
536313Sgblack@eecs.umich.edunamespace ArmISA
546313Sgblack@eecs.umich.edu{
556313Sgblack@eecs.umich.edu    class ISA
566313Sgblack@eecs.umich.edu    {
576313Sgblack@eecs.umich.edu      protected:
586333Sgblack@eecs.umich.edu        MiscReg miscRegs[NumMiscRegs];
596718Sgblack@eecs.umich.edu        const IntRegIndex *intRegMap;
606718Sgblack@eecs.umich.edu
616718Sgblack@eecs.umich.edu        void
626718Sgblack@eecs.umich.edu        updateRegMap(CPSR cpsr)
636718Sgblack@eecs.umich.edu        {
646718Sgblack@eecs.umich.edu            switch (cpsr.mode) {
656718Sgblack@eecs.umich.edu              case MODE_USER:
666718Sgblack@eecs.umich.edu              case MODE_SYSTEM:
676718Sgblack@eecs.umich.edu                intRegMap = IntRegUsrMap;
686718Sgblack@eecs.umich.edu                break;
696718Sgblack@eecs.umich.edu              case MODE_FIQ:
706718Sgblack@eecs.umich.edu                intRegMap = IntRegFiqMap;
716718Sgblack@eecs.umich.edu                break;
726718Sgblack@eecs.umich.edu              case MODE_IRQ:
736718Sgblack@eecs.umich.edu                intRegMap = IntRegIrqMap;
746718Sgblack@eecs.umich.edu                break;
756718Sgblack@eecs.umich.edu              case MODE_SVC:
766718Sgblack@eecs.umich.edu                intRegMap = IntRegSvcMap;
776718Sgblack@eecs.umich.edu                break;
786723Sgblack@eecs.umich.edu              case MODE_MON:
796723Sgblack@eecs.umich.edu                intRegMap = IntRegMonMap;
806723Sgblack@eecs.umich.edu                break;
816718Sgblack@eecs.umich.edu              case MODE_ABORT:
826718Sgblack@eecs.umich.edu                intRegMap = IntRegAbtMap;
836718Sgblack@eecs.umich.edu                break;
846718Sgblack@eecs.umich.edu              case MODE_UNDEFINED:
856718Sgblack@eecs.umich.edu                intRegMap = IntRegUndMap;
866718Sgblack@eecs.umich.edu                break;
876718Sgblack@eecs.umich.edu              default:
886718Sgblack@eecs.umich.edu                panic("Unrecognized mode setting in CPSR.\n");
896718Sgblack@eecs.umich.edu            }
906718Sgblack@eecs.umich.edu        }
916313Sgblack@eecs.umich.edu
926313Sgblack@eecs.umich.edu      public:
936333Sgblack@eecs.umich.edu        void clear()
946333Sgblack@eecs.umich.edu        {
956401Sgblack@eecs.umich.edu            memset(miscRegs, 0, sizeof(miscRegs));
966401Sgblack@eecs.umich.edu            CPSR cpsr = 0;
976719Sgblack@eecs.umich.edu            cpsr.mode = MODE_USER;
986401Sgblack@eecs.umich.edu            miscRegs[MISCREG_CPSR] = cpsr;
996718Sgblack@eecs.umich.edu            updateRegMap(cpsr);
1006735Sgblack@eecs.umich.edu
1016735Sgblack@eecs.umich.edu            SCTLR sctlr = 0;
1026735Sgblack@eecs.umich.edu            sctlr.nmfi = 1;
1036735Sgblack@eecs.umich.edu            sctlr.rao1 = 1;
1046735Sgblack@eecs.umich.edu            sctlr.rao2 = 1;
1056735Sgblack@eecs.umich.edu            sctlr.rao3 = 1;
1066735Sgblack@eecs.umich.edu            sctlr.rao4 = 1;
1077270Sgblack@eecs.umich.edu            miscRegs[MISCREG_SCTLR] = sctlr;
1086735Sgblack@eecs.umich.edu
1097271Sgblack@eecs.umich.edu            /*
1107271Sgblack@eecs.umich.edu             * Technically this should be 0, but we don't support those
1117271Sgblack@eecs.umich.edu             * settings.
1127271Sgblack@eecs.umich.edu             */
1137320Sgblack@eecs.umich.edu            CPACR cpacr = 0;
1147320Sgblack@eecs.umich.edu            // Enable CP 10, 11
1157320Sgblack@eecs.umich.edu            cpacr.cp10 = 0x3;
1167320Sgblack@eecs.umich.edu            cpacr.cp11 = 0x3;
1177320Sgblack@eecs.umich.edu            miscRegs[MISCREG_CPACR] = cpacr;
1187271Sgblack@eecs.umich.edu
1197298Sgblack@eecs.umich.edu            /* One region, unified map. */
1207298Sgblack@eecs.umich.edu            miscRegs[MISCREG_MPUIR] = 0x100;
1217298Sgblack@eecs.umich.edu
1227298Sgblack@eecs.umich.edu            /*
1237298Sgblack@eecs.umich.edu             * Implemented = '5' from "M5",
1247298Sgblack@eecs.umich.edu             * Variant = 0,
1257298Sgblack@eecs.umich.edu             */
1267298Sgblack@eecs.umich.edu            miscRegs[MISCREG_MIDR] =
1277298Sgblack@eecs.umich.edu                (0x35 << 24) | //Implementor is '5' from "M5"
1287298Sgblack@eecs.umich.edu                (0 << 20)    | //Variant
1297298Sgblack@eecs.umich.edu                (0xf << 16)  | //Architecture from CPUID scheme
1307298Sgblack@eecs.umich.edu                (0 << 4)     | //Primary part number
1317298Sgblack@eecs.umich.edu                (0 << 0)     | //Revision
1327298Sgblack@eecs.umich.edu                0;
1337298Sgblack@eecs.umich.edu
1346401Sgblack@eecs.umich.edu            //XXX We need to initialize the rest of the state.
1356333Sgblack@eecs.umich.edu        }
1366313Sgblack@eecs.umich.edu
1376333Sgblack@eecs.umich.edu        MiscReg
1386333Sgblack@eecs.umich.edu        readMiscRegNoEffect(int misc_reg)
1396333Sgblack@eecs.umich.edu        {
1406333Sgblack@eecs.umich.edu            assert(misc_reg < NumMiscRegs);
1416745Sgblack@eecs.umich.edu            if (misc_reg == MISCREG_SPSR) {
1426745Sgblack@eecs.umich.edu                CPSR cpsr = miscRegs[MISCREG_CPSR];
1436745Sgblack@eecs.umich.edu                switch (cpsr.mode) {
1446745Sgblack@eecs.umich.edu                  case MODE_USER:
1456745Sgblack@eecs.umich.edu                    return miscRegs[MISCREG_SPSR];
1466745Sgblack@eecs.umich.edu                  case MODE_FIQ:
1476745Sgblack@eecs.umich.edu                    return miscRegs[MISCREG_SPSR_FIQ];
1486745Sgblack@eecs.umich.edu                  case MODE_IRQ:
1496745Sgblack@eecs.umich.edu                    return miscRegs[MISCREG_SPSR_IRQ];
1506745Sgblack@eecs.umich.edu                  case MODE_SVC:
1516745Sgblack@eecs.umich.edu                    return miscRegs[MISCREG_SPSR_SVC];
1526745Sgblack@eecs.umich.edu                  case MODE_MON:
1536745Sgblack@eecs.umich.edu                    return miscRegs[MISCREG_SPSR_MON];
1546745Sgblack@eecs.umich.edu                  case MODE_ABORT:
1556745Sgblack@eecs.umich.edu                    return miscRegs[MISCREG_SPSR_ABT];
1566745Sgblack@eecs.umich.edu                  case MODE_UNDEFINED:
1576745Sgblack@eecs.umich.edu                    return miscRegs[MISCREG_SPSR_UND];
1586745Sgblack@eecs.umich.edu                  default:
1596745Sgblack@eecs.umich.edu                    return miscRegs[MISCREG_SPSR];
1606745Sgblack@eecs.umich.edu                }
1616745Sgblack@eecs.umich.edu            }
1626333Sgblack@eecs.umich.edu            return miscRegs[misc_reg];
1636333Sgblack@eecs.umich.edu        }
1646313Sgblack@eecs.umich.edu
1656333Sgblack@eecs.umich.edu        MiscReg
1666333Sgblack@eecs.umich.edu        readMiscReg(int misc_reg, ThreadContext *tc)
1676333Sgblack@eecs.umich.edu        {
1687093Sgblack@eecs.umich.edu            if (misc_reg == MISCREG_CPSR) {
1697093Sgblack@eecs.umich.edu                CPSR cpsr = miscRegs[misc_reg];
1707093Sgblack@eecs.umich.edu                Addr pc = tc->readPC();
1717093Sgblack@eecs.umich.edu                if (pc & (ULL(1) << PcJBitShift))
1727093Sgblack@eecs.umich.edu                    cpsr.j = 1;
1737093Sgblack@eecs.umich.edu                else
1747093Sgblack@eecs.umich.edu                    cpsr.j = 0;
1757093Sgblack@eecs.umich.edu                if (pc & (ULL(1) << PcTBitShift))
1767093Sgblack@eecs.umich.edu                    cpsr.t = 1;
1777093Sgblack@eecs.umich.edu                else
1787093Sgblack@eecs.umich.edu                    cpsr.t = 0;
1797093Sgblack@eecs.umich.edu                return cpsr;
1807093Sgblack@eecs.umich.edu            }
1817259Sgblack@eecs.umich.edu            if (misc_reg >= MISCREG_CP15_UNIMP_START &&
1827259Sgblack@eecs.umich.edu                misc_reg < MISCREG_CP15_END) {
1837259Sgblack@eecs.umich.edu                panic("Unimplemented CP15 register %s read.\n",
1847259Sgblack@eecs.umich.edu                      miscRegName[misc_reg]);
1857259Sgblack@eecs.umich.edu            }
1867273Sgblack@eecs.umich.edu            switch (misc_reg) {
1877273Sgblack@eecs.umich.edu              case MISCREG_CLIDR:
1887273Sgblack@eecs.umich.edu                warn("The clidr register always reports 0 caches.\n");
1897273Sgblack@eecs.umich.edu                break;
1907287Sgblack@eecs.umich.edu              case MISCREG_CCSIDR:
1917287Sgblack@eecs.umich.edu                warn("The ccsidr register isn't implemented and "
1927287Sgblack@eecs.umich.edu                        "always reads as 0.\n");
1937287Sgblack@eecs.umich.edu                break;
1947273Sgblack@eecs.umich.edu            }
1956745Sgblack@eecs.umich.edu            return readMiscRegNoEffect(misc_reg);
1966333Sgblack@eecs.umich.edu        }
1976333Sgblack@eecs.umich.edu
1986333Sgblack@eecs.umich.edu        void
1996333Sgblack@eecs.umich.edu        setMiscRegNoEffect(int misc_reg, const MiscReg &val)
2006333Sgblack@eecs.umich.edu        {
2016333Sgblack@eecs.umich.edu            assert(misc_reg < NumMiscRegs);
2026745Sgblack@eecs.umich.edu            if (misc_reg == MISCREG_SPSR) {
2036745Sgblack@eecs.umich.edu                CPSR cpsr = miscRegs[MISCREG_CPSR];
2046745Sgblack@eecs.umich.edu                switch (cpsr.mode) {
2056745Sgblack@eecs.umich.edu                  case MODE_USER:
2066745Sgblack@eecs.umich.edu                    miscRegs[MISCREG_SPSR] = val;
2076745Sgblack@eecs.umich.edu                    return;
2086745Sgblack@eecs.umich.edu                  case MODE_FIQ:
2096745Sgblack@eecs.umich.edu                    miscRegs[MISCREG_SPSR_FIQ] = val;
2106745Sgblack@eecs.umich.edu                    return;
2116745Sgblack@eecs.umich.edu                  case MODE_IRQ:
2126745Sgblack@eecs.umich.edu                    miscRegs[MISCREG_SPSR_IRQ] = val;
2136745Sgblack@eecs.umich.edu                    return;
2146745Sgblack@eecs.umich.edu                  case MODE_SVC:
2156745Sgblack@eecs.umich.edu                    miscRegs[MISCREG_SPSR_SVC] = val;
2166745Sgblack@eecs.umich.edu                    return;
2176745Sgblack@eecs.umich.edu                  case MODE_MON:
2186745Sgblack@eecs.umich.edu                    miscRegs[MISCREG_SPSR_MON] = val;
2196745Sgblack@eecs.umich.edu                    return;
2206745Sgblack@eecs.umich.edu                  case MODE_ABORT:
2216745Sgblack@eecs.umich.edu                    miscRegs[MISCREG_SPSR_ABT] = val;
2226745Sgblack@eecs.umich.edu                    return;
2236745Sgblack@eecs.umich.edu                  case MODE_UNDEFINED:
2246745Sgblack@eecs.umich.edu                    miscRegs[MISCREG_SPSR_UND] = val;
2256745Sgblack@eecs.umich.edu                    return;
2266745Sgblack@eecs.umich.edu                  default:
2276745Sgblack@eecs.umich.edu                    miscRegs[MISCREG_SPSR] = val;
2286745Sgblack@eecs.umich.edu                    return;
2296745Sgblack@eecs.umich.edu                }
2306745Sgblack@eecs.umich.edu            }
2316333Sgblack@eecs.umich.edu            miscRegs[misc_reg] = val;
2326333Sgblack@eecs.umich.edu        }
2336333Sgblack@eecs.umich.edu
2346333Sgblack@eecs.umich.edu        void
2356333Sgblack@eecs.umich.edu        setMiscReg(int misc_reg, const MiscReg &val, ThreadContext *tc)
2366333Sgblack@eecs.umich.edu        {
2377271Sgblack@eecs.umich.edu            MiscReg newVal = val;
2386718Sgblack@eecs.umich.edu            if (misc_reg == MISCREG_CPSR) {
2396718Sgblack@eecs.umich.edu                updateRegMap(val);
2407093Sgblack@eecs.umich.edu                CPSR cpsr = val;
2417093Sgblack@eecs.umich.edu                Addr npc = tc->readNextPC() & ~PcModeMask;
2427093Sgblack@eecs.umich.edu                if (cpsr.j)
2437093Sgblack@eecs.umich.edu                    npc = npc | (ULL(1) << PcJBitShift);
2447093Sgblack@eecs.umich.edu                if (cpsr.t)
2457093Sgblack@eecs.umich.edu                    npc = npc | (ULL(1) << PcTBitShift);
2467093Sgblack@eecs.umich.edu
2477093Sgblack@eecs.umich.edu                tc->setNextPC(npc);
2486718Sgblack@eecs.umich.edu            }
2497259Sgblack@eecs.umich.edu            if (misc_reg >= MISCREG_CP15_UNIMP_START &&
2507259Sgblack@eecs.umich.edu                misc_reg < MISCREG_CP15_END) {
2517259Sgblack@eecs.umich.edu                panic("Unimplemented CP15 register %s wrote with %#x.\n",
2527259Sgblack@eecs.umich.edu                      miscRegName[misc_reg], val);
2537259Sgblack@eecs.umich.edu            }
2547271Sgblack@eecs.umich.edu            switch (misc_reg) {
2557271Sgblack@eecs.umich.edu              case MISCREG_CPACR:
2567320Sgblack@eecs.umich.edu                {
2577320Sgblack@eecs.umich.edu                    CPACR newCpacr = 0;
2587320Sgblack@eecs.umich.edu                    CPACR valCpacr = val;
2597320Sgblack@eecs.umich.edu                    newCpacr.cp10 = valCpacr.cp10;
2607320Sgblack@eecs.umich.edu                    newCpacr.cp11 = valCpacr.cp11;
2617320Sgblack@eecs.umich.edu                    if (newCpacr.cp10 != 0x3 || newCpacr.cp11 != 3) {
2627320Sgblack@eecs.umich.edu                        panic("Disabling coprocessors isn't implemented.\n");
2637320Sgblack@eecs.umich.edu                    }
2647320Sgblack@eecs.umich.edu                    newVal = newCpacr;
2657271Sgblack@eecs.umich.edu                }
2667271Sgblack@eecs.umich.edu                break;
2677287Sgblack@eecs.umich.edu              case MISCREG_CSSELR:
2687287Sgblack@eecs.umich.edu                warn("The csselr register isn't implemented.\n");
2697287Sgblack@eecs.umich.edu                break;
2707271Sgblack@eecs.umich.edu            }
2717271Sgblack@eecs.umich.edu            return setMiscRegNoEffect(misc_reg, newVal);
2726333Sgblack@eecs.umich.edu        }
2736313Sgblack@eecs.umich.edu
2746313Sgblack@eecs.umich.edu        int
2756313Sgblack@eecs.umich.edu        flattenIntIndex(int reg)
2766313Sgblack@eecs.umich.edu        {
2776718Sgblack@eecs.umich.edu            assert(reg >= 0);
2786718Sgblack@eecs.umich.edu            if (reg < NUM_ARCH_INTREGS) {
2796718Sgblack@eecs.umich.edu                return intRegMap[reg];
2806726Sgblack@eecs.umich.edu            } else if (reg < NUM_INTREGS) {
2816726Sgblack@eecs.umich.edu                return reg;
2826718Sgblack@eecs.umich.edu            } else {
2837310Sgblack@eecs.umich.edu                int mode = reg / intRegsPerMode;
2847310Sgblack@eecs.umich.edu                reg = reg % intRegsPerMode;
2857310Sgblack@eecs.umich.edu                switch (mode) {
2867310Sgblack@eecs.umich.edu                  case MODE_USER:
2877310Sgblack@eecs.umich.edu                  case MODE_SYSTEM:
2887310Sgblack@eecs.umich.edu                    return INTREG_USR(reg);
2897310Sgblack@eecs.umich.edu                  case MODE_FIQ:
2907310Sgblack@eecs.umich.edu                    return INTREG_FIQ(reg);
2917310Sgblack@eecs.umich.edu                  case MODE_IRQ:
2927310Sgblack@eecs.umich.edu                    return INTREG_IRQ(reg);
2937310Sgblack@eecs.umich.edu                  case MODE_SVC:
2947310Sgblack@eecs.umich.edu                    return INTREG_SVC(reg);
2957310Sgblack@eecs.umich.edu                  case MODE_MON:
2967310Sgblack@eecs.umich.edu                    return INTREG_MON(reg);
2977310Sgblack@eecs.umich.edu                  case MODE_ABORT:
2987310Sgblack@eecs.umich.edu                    return INTREG_ABT(reg);
2997310Sgblack@eecs.umich.edu                  case MODE_UNDEFINED:
3007310Sgblack@eecs.umich.edu                    return INTREG_UND(reg);
3017310Sgblack@eecs.umich.edu                  default:
3027310Sgblack@eecs.umich.edu                    panic("Flattening into an unknown mode.\n");
3037310Sgblack@eecs.umich.edu                }
3046718Sgblack@eecs.umich.edu            }
3056313Sgblack@eecs.umich.edu        }
3066313Sgblack@eecs.umich.edu
3076313Sgblack@eecs.umich.edu        int
3086313Sgblack@eecs.umich.edu        flattenFloatIndex(int reg)
3096313Sgblack@eecs.umich.edu        {
3106313Sgblack@eecs.umich.edu            return reg;
3116313Sgblack@eecs.umich.edu        }
3126313Sgblack@eecs.umich.edu
3136678Sgblack@eecs.umich.edu        void serialize(EventManager *em, std::ostream &os)
3146333Sgblack@eecs.umich.edu        {}
3156678Sgblack@eecs.umich.edu        void unserialize(EventManager *em, Checkpoint *cp,
3166678Sgblack@eecs.umich.edu                const std::string &section)
3176333Sgblack@eecs.umich.edu        {}
3186313Sgblack@eecs.umich.edu
3196313Sgblack@eecs.umich.edu        ISA()
3206313Sgblack@eecs.umich.edu        {
3216313Sgblack@eecs.umich.edu            clear();
3226313Sgblack@eecs.umich.edu        }
3236313Sgblack@eecs.umich.edu    };
3246313Sgblack@eecs.umich.edu}
3256313Sgblack@eecs.umich.edu
3266313Sgblack@eecs.umich.edu#endif
327