Difference between revisions of "Frequently Asked Questions"
From gem5
Line 2: | Line 2: | ||
#* By creating a Etherdump object, setting it's file parameter, and setting the dump parameter on the EtherLink to it. This is most easily accomplished by setting the enivornment variable <code>-EDUMPFILE=<file></code>. The resulting file will be named <code><file></code> and be in a standard pcap format. | #* By creating a Etherdump object, setting it's file parameter, and setting the dump parameter on the EtherLink to it. This is most easily accomplished by setting the enivornment variable <code>-EDUMPFILE=<file></code>. The resulting file will be named <code><file></code> and be in a standard pcap format. | ||
# How do I create a disk image? | # How do I create a disk image? | ||
− | #* | + | #* You can use the <code>mkblankimage.sh</code> script that is provided in our distribution of [http://m5.eecs.umich.edu/dist/linux-dist.tgz linux-dist] to create a blank image of arbitrary size. |
+ | # How do I add files to a disk image? | ||
+ | #* Using either sudo or the root account run <code>/bin/mount -o loop,offset=32256 /z/foo.img /mount/point</code>. You can then copy the desired files to the image. Remember to unmount it before running the simulator with <code>/bin/umount /mount/point</code> or you may get unexpected results. | ||
# How do I access reference counted pointers in GDB? | # How do I access reference counted pointers in GDB? | ||
− | #* Objects such as DynInsts are reference counted, making it slightly harder to obtain the data inside. In gdb you must access them through the pointer that is stored in the ref counted pointer, which is called data. Thus given a ref counted pointer ptr, in gdb you would say ptr->data to get the pointer to the actual object. | + | #* Objects such as DynInsts are reference counted, making it slightly harder to obtain the data inside. In gdb you must access them through the pointer that is stored in the ref counted pointer, which is called data. Thus given a ref counted pointer <code>ptr</code>, in gdb you would say <code>(gdb) ptr->data</code> to get the pointer to the actual object. |
# How do I build a cross compiler? | # How do I build a cross compiler? | ||
#* [http://www.kegel.com/crosstool/ Download cross-tool] here. It is a script to simplify the creation of cross-compilers. | #* [http://www.kegel.com/crosstool/ Download cross-tool] here. It is a script to simplify the creation of cross-compilers. | ||
+ | # How many CPUs can M5 run? | ||
+ | #* We have Linux support for up to 64 processors. Be warned that simulating 64 processors will be quite slow. | ||
+ | # Where are the classes for each ISA instruction? Where are the execute() methods for the StaticInst class? | ||
+ | #* Both the classes and the execute() methods are generated through Python upon building any version of M5. For example, After building ALPHA_SE, they will be located in the build/ALPHA_SE/arch/alpha/ folder. The key files are decoder.hh, decoder.cc (which describe the ISA instructions), and *_exec.cc (which describe the execute() methods). The definitions for both exist in the .isa files found in src/arch/*/isa/, which are processed by src/arch/isa_parser.py to generate the previously mentioned .hh/.cc files. |
Revision as of 15:14, 12 June 2006
- How can I see the packets on the ethernet link?
- By creating a Etherdump object, setting it's file parameter, and setting the dump parameter on the EtherLink to it. This is most easily accomplished by setting the enivornment variable
-EDUMPFILE=<file>
. The resulting file will be named<file>
and be in a standard pcap format.
- By creating a Etherdump object, setting it's file parameter, and setting the dump parameter on the EtherLink to it. This is most easily accomplished by setting the enivornment variable
- How do I create a disk image?
- You can use the
mkblankimage.sh
script that is provided in our distribution of linux-dist to create a blank image of arbitrary size.
- You can use the
- How do I add files to a disk image?
- Using either sudo or the root account run
/bin/mount -o loop,offset=32256 /z/foo.img /mount/point
. You can then copy the desired files to the image. Remember to unmount it before running the simulator with/bin/umount /mount/point
or you may get unexpected results.
- Using either sudo or the root account run
- How do I access reference counted pointers in GDB?
- Objects such as DynInsts are reference counted, making it slightly harder to obtain the data inside. In gdb you must access them through the pointer that is stored in the ref counted pointer, which is called data. Thus given a ref counted pointer
ptr
, in gdb you would say(gdb) ptr->data
to get the pointer to the actual object.
- Objects such as DynInsts are reference counted, making it slightly harder to obtain the data inside. In gdb you must access them through the pointer that is stored in the ref counted pointer, which is called data. Thus given a ref counted pointer
- How do I build a cross compiler?
- Download cross-tool here. It is a script to simplify the creation of cross-compilers.
- How many CPUs can M5 run?
- We have Linux support for up to 64 processors. Be warned that simulating 64 processors will be quite slow.
- Where are the classes for each ISA instruction? Where are the execute() methods for the StaticInst class?
- Both the classes and the execute() methods are generated through Python upon building any version of M5. For example, After building ALPHA_SE, they will be located in the build/ALPHA_SE/arch/alpha/ folder. The key files are decoder.hh, decoder.cc (which describe the ISA instructions), and *_exec.cc (which describe the execute() methods). The definitions for both exist in the .isa files found in src/arch/*/isa/, which are processed by src/arch/isa_parser.py to generate the previously mentioned .hh/.cc files.