gem5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
pseudo_inst.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2012 ARM Limited
3  * All rights reserved
4  *
5  * The license below extends only to copyright in the software and shall
6  * not be construed as granting a license to any other intellectual
7  * property including but not limited to intellectual property relating
8  * to a hardware implementation of the functionality of the software
9  * licensed hereunder. You may use the software subject to the license
10  * terms below provided that you ensure that this notice is replicated
11  * unmodified and in its entirety in all distributions of the software,
12  * modified or unmodified, in source code or in binary form.
13  *
14  * Copyright (c) 2003-2006 The Regents of The University of Michigan
15  * All rights reserved.
16  *
17  * Redistribution and use in source and binary forms, with or without
18  * modification, are permitted provided that the following conditions are
19  * met: redistributions of source code must retain the above copyright
20  * notice, this list of conditions and the following disclaimer;
21  * redistributions in binary form must reproduce the above copyright
22  * notice, this list of conditions and the following disclaimer in the
23  * documentation and/or other materials provided with the distribution;
24  * neither the name of the copyright holders nor the names of its
25  * contributors may be used to endorse or promote products derived from
26  * this software without specific prior written permission.
27  *
28  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
31  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
32  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
33  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
34  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
35  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
36  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
37  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
38  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39  *
40  * Authors: Nathan Binkert
41  */
42 
43 #ifndef __SIM_PSEUDO_INST_HH__
44 #define __SIM_PSEUDO_INST_HH__
45 
46 class ThreadContext;
47 
48 //We need the "Tick" and "Addr" data types from here
49 #include "base/types.hh"
50 
51 namespace PseudoInst {
52 
64 uint64_t pseudoInst(ThreadContext *tc, uint8_t func, uint8_t subfunc);
65 
66 void arm(ThreadContext *tc);
67 void quiesce(ThreadContext *tc);
68 void quiesceSkip(ThreadContext *tc);
69 void quiesceNs(ThreadContext *tc, uint64_t ns);
70 void quiesceCycles(ThreadContext *tc, uint64_t cycles);
71 uint64_t quiesceTime(ThreadContext *tc);
72 uint64_t readfile(ThreadContext *tc, Addr vaddr, uint64_t len,
73  uint64_t offset);
74 uint64_t writefile(ThreadContext *tc, Addr vaddr, uint64_t len,
75  uint64_t offset, Addr filenameAddr);
76 void loadsymbol(ThreadContext *xc);
77 void addsymbol(ThreadContext *tc, Addr addr, Addr symbolAddr);
78 uint64_t initParam(ThreadContext *xc, uint64_t key_str1, uint64_t key_str2);
79 uint64_t rpns(ThreadContext *tc);
80 void wakeCPU(ThreadContext *tc, uint64_t cpuid);
81 void m5exit(ThreadContext *tc, Tick delay);
82 void m5fail(ThreadContext *tc, Tick delay, uint64_t code);
83 void resetstats(ThreadContext *tc, Tick delay, Tick period);
84 void dumpstats(ThreadContext *tc, Tick delay, Tick period);
85 void dumpresetstats(ThreadContext *tc, Tick delay, Tick period);
86 void m5checkpoint(ThreadContext *tc, Tick delay, Tick period);
87 void debugbreak(ThreadContext *tc);
88 void switchcpu(ThreadContext *tc);
89 void workbegin(ThreadContext *tc, uint64_t workid, uint64_t threadid);
90 void workend(ThreadContext *tc, uint64_t workid, uint64_t threadid);
91 void togglesync(ThreadContext *tc);
92 
93 } // namespace PseudoInst
94 
95 #endif // __SIM_PSEUDO_INST_HH__
void m5fail(ThreadContext *tc, Tick delay, uint64_t code)
Definition: pseudo_inst.cc:304
void quiesceNs(ThreadContext *tc, uint64_t ns)
Definition: pseudo_inst.cc:254
void arm(ThreadContext *tc)
Definition: pseudo_inst.cc:229
ip6_addr_t addr
Definition: inet.hh:335
void dumpresetstats(ThreadContext *tc, Tick delay, Tick period)
Definition: pseudo_inst.cc:455
uint64_t quiesceTime(ThreadContext *tc)
Definition: pseudo_inst.cc:268
void quiesceSkip(ThreadContext *tc)
Definition: pseudo_inst.cc:247
void m5checkpoint(ThreadContext *tc, Tick delay, Tick period)
Definition: pseudo_inst.cc:469
uint64_t writefile(ThreadContext *tc, Addr vaddr, uint64_t len, uint64_t offset, Addr filename_addr)
Definition: pseudo_inst.cc:525
Bitfield< 23, 0 > offset
Definition: types.hh:149
Bitfield< 28, 21 > cpuid
Definition: dt_constants.hh:94
void quiesceCycles(ThreadContext *tc, uint64_t cycles)
Definition: pseudo_inst.cc:261
ThreadContext is the external interface to all thread state for anything outside of the CPU...
void togglesync(ThreadContext *tc)
Definition: pseudo_inst.cc:584
uint64_t initParam(ThreadContext *tc, uint64_t key_str1, uint64_t key_str2)
Definition: pseudo_inst.cc:382
Bitfield< 0 > ns
Definition: miscregs.hh:1521
void quiesce(ThreadContext *tc)
Definition: pseudo_inst.cc:240
uint64_t Tick
Tick count type.
Definition: types.hh:63
void switchcpu(ThreadContext *tc)
Definition: pseudo_inst.cc:577
Defines global host-dependent types: Counter, Tick, and (indirectly) {int,uint}{8,16,32,64}_t.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:142
uint64_t pseudoInst(ThreadContext *tc, uint8_t func, uint8_t subfunc)
Execute a decoded M5 pseudo instruction.
Definition: pseudo_inst.cc:95
void debugbreak(ThreadContext *tc)
Definition: pseudo_inst.cc:570
void workbegin(ThreadContext *tc, uint64_t workid, uint64_t threadid)
Definition: pseudo_inst.cc:596
void resetstats(ThreadContext *tc, Tick delay, Tick period)
Definition: pseudo_inst.cc:427
uint64_t readfile(ThreadContext *tc, Addr vaddr, uint64_t len, uint64_t offset)
Definition: pseudo_inst.cc:483
void wakeCPU(ThreadContext *tc, uint64_t cpuid)
Definition: pseudo_inst.cc:284
void dumpstats(ThreadContext *tc, Tick delay, Tick period)
Definition: pseudo_inst.cc:441
Bitfield< 18, 16 > len
Definition: miscregs.hh:1626
void m5exit(ThreadContext *tc, Tick delay)
Definition: pseudo_inst.cc:294
void addsymbol(ThreadContext *tc, Addr addr, Addr symbolAddr)
Definition: pseudo_inst.cc:364
void loadsymbol(ThreadContext *tc)
Definition: pseudo_inst.cc:312
void workend(ThreadContext *tc, uint64_t workid, uint64_t threadid)
Definition: pseudo_inst.cc:659
uint64_t rpns(ThreadContext *tc)
Definition: pseudo_inst.cc:277

Generated on Fri Jun 9 2017 13:03:36 for gem5 by doxygen 1.8.6