gem5Op.java revision 11358
18547Sprakash.ramrakhyani@arm.com/* 28547Sprakash.ramrakhyani@arm.com * Copyright (c) 2010 ARM Limited 38547Sprakash.ramrakhyani@arm.com * All rights reserved 48547Sprakash.ramrakhyani@arm.com * 58547Sprakash.ramrakhyani@arm.com * The license below extends only to copyright in the software and shall 68547Sprakash.ramrakhyani@arm.com * not be construed as granting a license to any other intellectual 78547Sprakash.ramrakhyani@arm.com * property including but not limited to intellectual property relating 88547Sprakash.ramrakhyani@arm.com * to a hardware implementation of the functionality of the software 98547Sprakash.ramrakhyani@arm.com * licensed hereunder. You may use the software subject to the license 108547Sprakash.ramrakhyani@arm.com * terms below provided that you ensure that this notice is replicated 118547Sprakash.ramrakhyani@arm.com * unmodified and in its entirety in all distributions of the software, 128547Sprakash.ramrakhyani@arm.com * modified or unmodified, in source code or in binary form. 138547Sprakash.ramrakhyani@arm.com * 148547Sprakash.ramrakhyani@arm.com * Redistribution and use in source and binary forms, with or without 158547Sprakash.ramrakhyani@arm.com * modification, are permitted provided that the following conditions are 168547Sprakash.ramrakhyani@arm.com * met: redistributions of source code must retain the above copyright 178547Sprakash.ramrakhyani@arm.com * notice, this list of conditions and the following disclaimer; 188547Sprakash.ramrakhyani@arm.com * redistributions in binary form must reproduce the above copyright 198547Sprakash.ramrakhyani@arm.com * notice, this list of conditions and the following disclaimer in the 208547Sprakash.ramrakhyani@arm.com * documentation and/or other materials provided with the distribution; 218547Sprakash.ramrakhyani@arm.com * neither the name of the copyright holders nor the names of its 228547Sprakash.ramrakhyani@arm.com * contributors may be used to endorse or promote products derived from 238547Sprakash.ramrakhyani@arm.com * this software without specific prior written permission. 248547Sprakash.ramrakhyani@arm.com * 258547Sprakash.ramrakhyani@arm.com * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 268547Sprakash.ramrakhyani@arm.com * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 278547Sprakash.ramrakhyani@arm.com * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 288547Sprakash.ramrakhyani@arm.com * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 298547Sprakash.ramrakhyani@arm.com * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 308547Sprakash.ramrakhyani@arm.com * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 318547Sprakash.ramrakhyani@arm.com * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 328547Sprakash.ramrakhyani@arm.com * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 338547Sprakash.ramrakhyani@arm.com * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 348547Sprakash.ramrakhyani@arm.com * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 358547Sprakash.ramrakhyani@arm.com * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 368547Sprakash.ramrakhyani@arm.com * 378547Sprakash.ramrakhyani@arm.com * Authors: Prakash Ramrakhyani 388547Sprakash.ramrakhyani@arm.com */ 398547Sprakash.ramrakhyani@arm.com 408547Sprakash.ramrakhyani@arm.compackage jni; 418547Sprakash.ramrakhyani@arm.com 428547Sprakash.ramrakhyani@arm.com/** 438547Sprakash.ramrakhyani@arm.com * Java class to implement JNI for m5Ops 448547Sprakash.ramrakhyani@arm.com */ 458547Sprakash.ramrakhyani@arm.com 468547Sprakash.ramrakhyani@arm.compublic class gem5Op { 478547Sprakash.ramrakhyani@arm.com public native void arm(long address); 488547Sprakash.ramrakhyani@arm.com public native void quiesce(); 498547Sprakash.ramrakhyani@arm.com public native void quiesceNs(long ns); 508547Sprakash.ramrakhyani@arm.com public native void quiesceCycle(long cycles); 518547Sprakash.ramrakhyani@arm.com public native long quiesceTime(); 528547Sprakash.ramrakhyani@arm.com public native long rpns(); 538547Sprakash.ramrakhyani@arm.com public native void wakeCPU(long cpuid); 548547Sprakash.ramrakhyani@arm.com 558547Sprakash.ramrakhyani@arm.com public native void exit(long ns_delay); 5611358Sprakash.ramrakhyani@arm.com public native void fail(long ns_delay, long code); 5711358Sprakash.ramrakhyani@arm.com public native long initparam(long key_str1, long key_str2); 588547Sprakash.ramrakhyani@arm.com public native void checkpoint(long ns_delay, long ns_period); 598547Sprakash.ramrakhyani@arm.com public native void reset_stats(long ns_delay, long ns_period); 608547Sprakash.ramrakhyani@arm.com public native void dump_stats(long ns_delay, long ns_period); 618547Sprakash.ramrakhyani@arm.com public native void dumpreset_stats(long ns_delay, long ns_period); 628547Sprakash.ramrakhyani@arm.com public native void debugbreak(); 638547Sprakash.ramrakhyani@arm.com public native void switchcpu(); 648547Sprakash.ramrakhyani@arm.com public native void panic(); 658547Sprakash.ramrakhyani@arm.com public native void work_begin(long workid, long threadid); 668547Sprakash.ramrakhyani@arm.com public native void work_end(long workid, long threadid); 678547Sprakash.ramrakhyani@arm.com 688547Sprakash.ramrakhyani@arm.com} 69