Hi Gilles,

Thanks for your questions - in answering them, we are effectively creating
documentation for everybody else. :)

--

The place to start when understanding a Flexus simulator is the wiring
file for the simulator.  This file lists all the components that are
included in the simulator and how they are connected to one another. For
example, take a look at simulators/UniFlex/wiring.cpp.  I hope to write a
brief document giving an overview of control/data flow through the
simulator and how components communicate within the next week, which will
hopefully clarify some of the high-level stuff.

We only support in-order simulation of x86. Our in-order simulation
approach does not use the MAI.  Instead, it uses the timing_model and
snoop_device interfaces provided by the CPU objects in Simics, much like
the "generic cache" module included with Simics.  You can find
documentation on these memory interfaces in Chapter 7 of the Simics
Programmers Guide.  Basically, Simics passes us every instruction fetch
and every memory access.  We then model the memory system that handles
these requests, and return delays to Simics.

The "entry point" on each cycle to the in-order simulator is actually in
the InorderSimicsFeeder component.  When the component is initialized, it
connects a SimicsTracer object to each of the CPUs that Simics is
simulating, via the memory interfaces described above.  As it accumulates
memory operations from Simics, it drives the rest of the Flexus simulation
by calling theFlexus->doCycle()  (in CycleManager.hpp)  whenever we have
enough information from Simics to advance time in Flexus (e.g., we know
what every CPU is trying to do in the next cycle).

In the in-order universe, there is no pipeline simulation per-se - the
Execute component runs every instruction with a fixed latency of one
cycle, except memory operations, which are passed on to the cache
simulation components.  The Execute component accounts for the various
stalls caused in the memory system, and reports time breakdown statistics.

We enforce time between Flexus and Simics such that there is a strict 2:1
ratio of cycles as counted by Simics, and cycles as counted in Flexus.
Thus, you can match the flow of time accounted for in the memory system to
the flow of time as observed by the peripheral devices that Simics is
simulating.  (There are obscure multiprocessor simulation reasons for the
2:1 ratio).

The actual entry point into Flexus when you first load it into Simics is
in init_local() in core/simics/startup.cpp.  This is standard for a Simics
plug-in module (see Chapter 2 of the Programming Guide).  That code prints
out the copyright message and starts connecting Flexus to various HAPs and
interfaces in Simics.  However, there are a bunch of global objects that
are constructed before init_local() is called, so the very first line of
Flexus code that is actually executed is usually the initialization of the
debugging library. The initialize() function of every component is called
when you start running the simulation in Simics.

Regards,
-Tom Wenisch




On Fri, 29 Jul 2005, Gilles Pokam wrote:

> Hi Thomas,
>
> I had to postpone using Flexus to finish some other work. Now that I'm
> done I'm getting back to Flexus. I will follow your instructions to run
> the x86 in-order version. But before doing that, I'm kind of confuse of
> how the code is organized. Where is the starting point of the x86
> simulator, for instance ? Or the entry point of the modeled pipeline ? I
> was trying to understand the code but I was unable to have a
> comprehensive understanding of the whole thing.  Do you make use of MAI
> or not in your x86 in-order simulator ?
>
> Thanks in advance.
>
> --
> Gilles
>
>
From mrinal at ece.umn.edu  Fri Aug  5 14:53:25 2005
From: mrinal at ece.umn.edu (Mrinal Nath)
List-Post: [email protected]
Date: Fri Aug  5 15:03:04 2005
Subject: [Simflex] Problem running Simics after 'make install'
Message-ID: <[email protected]>

Hi,
Initially I was able to run Simics (version 2.0.28) by following the 
'first steps' in the simics user guide.
Then I followed the instructions in the Flexus getting started manual to 
build Flexus.
After typing the 'make install' command, which replaces some files in 
SIMICS_PATH/x86-linux/sys/lib, I was unable to run Simics (following the 
'first steps' in the simics user guide).
The error that Simics reported was:

******
Failed to load module 'x86-p4' 
('/project/zhai-project01/mrinal/simics-2.0.28/x86-linux/lib/x86-p4.so'): 
"/project/zhai-project01/mrinal/simics-2.0.28/x86-linux/sys/lib/libstdc++.so.5: 
version `CXXABI_1.2' not found (required by 
/project/zhai-project01/mrinal/simics-2.0.28/x86-linux/lib/x86-p4.so)"
Failed to load module 'x86-p4-ma' 
('/project/zhai-project01/mrinal/simics-2.0.28/x86-linux/lib/x86-p4-ma.so'): 
"/project/zhai-project01/mrinal/simics-2.0.28/x86-linux/sys/lib/libstdc++.so.5: 
version `CXXABI_1.2' not found (required by 
/project/zhai-project01/mrinal/simics-2.0.28/x86-linux/lib/x86-p4-ma.so)"
Failed to load module 'x86-p4-stall' 
('/project/zhai-project01/mrinal/simics-2.0.28/x86-linux/lib/x86-p4-stall.so'): 
"/project/zhai-project01/mrinal/simics-2.0.28/x86-linux/sys/lib/libstdc++.so.5: 
version `CXXABI_1.2' not found (required by 
/project/zhai-project01/mrinal/simics-2.0.28/x86-linux/lib/x86-p4-stall.so)"

no such class: 'x86-p4'

Failed loading the configuration in Simics. This is probably
due to some misconfiguration, or that some required file is
missing. Please check the above output for error messages

[firststeps-common.simics:7] the command did not complete properly; 
interrupting script
******

Can you please determine why I am getting this error?

Temporarily, I have solved the problem by renaming the link 
'libstdc++.so.5' in SIMICS_PATH/x86-linux/sys/lib to 
'libstdc++.so.5.old' and pasting the 'libstdc++.so.5' from 
SIMICS_PATH/x86-linux/sys/lib/bak (the backup file) in 
SIMICS_PATH/x86-linux/sys/lib

This still allows me to build a simulator (e.g by running 'make 
CMPFlex'). However, there are some warinings like

******
make[11]: Warning: File `Makefile.depend.v9_iface_gcc' has modification 
time 0.01 s in the future
******

and

******
make[11]: warning:  Clock skew detected.  Your build may be incomplete.
******

Are these warnings serious, or can I simply ignore them.

Thanks
- Mrinal Nath
From twenisch at ece.cmu.edu  Fri Aug  5 15:14:02 2005
From: twenisch at ece.cmu.edu (Thomas Wenisch)
List-Post: [email protected]
Date: Fri Aug  5 15:13:41 2005
Subject: [Simflex] Problem running Simics after 'make install'
In-Reply-To: <[email protected]>
References: <[email protected]>
Message-ID: <pine.lnx.4.53l-ece.cmu.edu.0508051503460.6...@dalmore.ece.cmu.edu>

Hi Mrinal,

The CXX_ABI errors you saw are related to library versioning issues with
Simics, Flexus (more specifically, gcc 3.4.x), and new distributions of
Linux.  Others have reported related problems with Fedora Core 3. We are
trying to get to the bottom of these issues, but do not have complete
answers yet.

Can you let us know what Linux distribution you are using?  Also, can you
tell me what version of glibc and binutils are installed?  You can
determine this on many systems by running "rpm -q glibc" and "rpm -q
binutils".

The solution of putting back the backup file will fix Simics, but will
most likely result in segfaults when you try to run Flexus, because Flexus
expects a newer version of the C++ standard library than Simics provides.
You can also trying using the libstdc++ from /usr/lib, but this will
probably give the same CXXABI errors.

The clock skew errors can generally be ignored - they come about when
the clocks of the various machines you are using are not perfectly
synchronized.  Make conservatively rebuilds stuff when it sees clock skew.

I will try to work with you to resolve the library issues, but it may take
a bit of trial and error.

Regards,
-Tom Wenisch

On Fri, 5 Aug 2005, Mrinal Nath wrote:

> Hi,
> Initially I was able to run Simics (version 2.0.28) by following the
> 'first steps' in the simics user guide.
> Then I followed the instructions in the Flexus getting started manual to
> build Flexus.
> After typing the 'make install' command, which replaces some files in
> SIMICS_PATH/x86-linux/sys/lib, I was unable to run Simics (following the
> 'first steps' in the simics user guide).
> The error that Simics reported was:
>
> ******
> Failed to load module 'x86-p4'
> ('/project/zhai-project01/mrinal/simics-2.0.28/x86-linux/lib/x86-p4.so'):
> "/project/zhai-project01/mrinal/simics-2.0.28/x86-linux/sys/lib/libstdc++.so.5:
> version `CXXABI_1.2' not found (required by
> /project/zhai-project01/mrinal/simics-2.0.28/x86-linux/lib/x86-p4.so)"
> Failed to load module 'x86-p4-ma'
> ('/project/zhai-project01/mrinal/simics-2.0.28/x86-linux/lib/x86-p4-ma.so'):
> "/project/zhai-project01/mrinal/simics-2.0.28/x86-linux/sys/lib/libstdc++.so.5:
> version `CXXABI_1.2' not found (required by
> /project/zhai-project01/mrinal/simics-2.0.28/x86-linux/lib/x86-p4-ma.so)"
> Failed to load module 'x86-p4-stall'
> ('/project/zhai-project01/mrinal/simics-2.0.28/x86-linux/lib/x86-p4-stall.so'):
> "/project/zhai-project01/mrinal/simics-2.0.28/x86-linux/sys/lib/libstdc++.so.5:
> version `CXXABI_1.2' not found (required by
> /project/zhai-project01/mrinal/simics-2.0.28/x86-linux/lib/x86-p4-stall.so)"
>
> no such class: 'x86-p4'
>
> Failed loading the configuration in Simics. This is probably
> due to some misconfiguration, or that some required file is
> missing. Please check the above output for error messages
>
> [firststeps-common.simics:7] the command did not complete properly;
> interrupting script
> ******
>
> Can you please determine why I am getting this error?
>
> Temporarily, I have solved the problem by renaming the link
> 'libstdc++.so.5' in SIMICS_PATH/x86-linux/sys/lib to
> 'libstdc++.so.5.old' and pasting the 'libstdc++.so.5' from
> SIMICS_PATH/x86-linux/sys/lib/bak (the backup file) in
> SIMICS_PATH/x86-linux/sys/lib
>
> This still allows me to build a simulator (e.g by running 'make
> CMPFlex'). However, there are some warinings like
>
> ******
> make[11]: Warning: File `Makefile.depend.v9_iface_gcc' has modification
> time 0.01 s in the future
> ******
>
> and
>
> ******
> make[11]: warning:  Clock skew detected.  Your build may be incomplete.
> ******
>
> Are these warnings serious, or can I simply ignore them.
>
> Thanks
> - Mrinal Nath
> _______________________________________________
> SimFlex mailing list
> [email protected]
> https://sos.ece.cmu.edu/mailman/listinfo/simflex
> SimFlex web page: http://www.ece.cmu.edu/~simflex
>
From msahn at neo.tamu.edu  Fri Aug  5 17:29:08 2005
From: msahn at neo.tamu.edu (Ahn, Min Seon)
List-Post: [email protected]
Date: Fri Aug  5 17:37:30 2005
Subject: [Simflex] Problem running Simics after 'make install'
In-Reply-To: <[email protected]>
Message-ID: <[email protected]>

Mrinal Nath,

See the SIMICS_PATH/x86-linux/sys/lib/bak directory. I'm not sure, but the old
lib files are moved to this directory by the "make install" command.

MINSEON AHN

Mrinal Nath <[email protected]> said:

> Hi,
> Initially I was able to run Simics (version 2.0.28) by following the 
> 'first steps' in the simics user guide.
> Then I followed the instructions in the Flexus getting started manual to 
> build Flexus.
> After typing the 'make install' command, which replaces some files in 
> SIMICS_PATH/x86-linux/sys/lib, I was unable to run Simics (following the 
> 'first steps' in the simics user guide).
> The error that Simics reported was:
> 
> ******
> Failed to load module 'x86-p4' 
> ('/project/zhai-project01/mrinal/simics-2.0.28/x86-linux/lib/x86-p4.so'): 
> "/project/zhai-project01/mrinal/simics-2.0.28/x86-linux/sys/lib/libstdc++.so.5:
>  
> version `CXXABI_1.2' not found (required by 
> /project/zhai-project01/mrinal/simics-2.0.28/x86-linux/lib/x86-p4.so)"
> Failed to load module 'x86-p4-ma' 
> ('/project/zhai-project01/mrinal/simics-2.0.28/x86-linux/lib/x86-p4-ma.so'): 
> "/project/zhai-project01/mrinal/simics-2.0.28/x86-linux/sys/lib/libstdc++.so.5:
>  
> version `CXXABI_1.2' not found (required by 
> /project/zhai-project01/mrinal/simics-2.0.28/x86-linux/lib/x86-p4-ma.so)"
> Failed to load module 'x86-p4-stall' 
> ('/project/zhai-project01/mrinal/simics-2.0.28/x86-linux/lib/x86-p4-stall.so'):
>  
> "/project/zhai-project01/mrinal/simics-2.0.28/x86-linux/sys/lib/libstdc++.so.5:
>  
> version `CXXABI_1.2' not found (required by 
> /project/zhai-project01/mrinal/simics-2.0.28/x86-linux/lib/x86-p4-stall.so)"
> 
> no such class: 'x86-p4'
> 
> Failed loading the configuration in Simics. This is probably
> due to some misconfiguration, or that some required file is
> missing. Please check the above output for error messages
> 
> [firststeps-common.simics:7] the command did not complete properly; 
> interrupting script
> ******
> 
> Can you please determine why I am getting this error?
> 
> Temporarily, I have solved the problem by renaming the link 
> 'libstdc++.so.5' in SIMICS_PATH/x86-linux/sys/lib to 
> 'libstdc++.so.5.old' and pasting the 'libstdc++.so.5' from 
> SIMICS_PATH/x86-linux/sys/lib/bak (the backup file) in 
> SIMICS_PATH/x86-linux/sys/lib
> 
> This still allows me to build a simulator (e.g by running 'make 
> CMPFlex'). However, there are some warinings like
> 
> ******
> make[11]: Warning: File `Makefile.depend.v9_iface_gcc' has modification 
> time 0.01 s in the future
> ******
> 
> and
> 
> ******
> make[11]: warning:  Clock skew detected.  Your build may be incomplete.
> ******
> 
> Are these warnings serious, or can I simply ignore them.
> 
> Thanks
> - Mrinal Nath
> _______________________________________________
> SimFlex mailing list
> [email protected]
> https://sos.ece.cmu.edu/mailman/listinfo/simflex
> SimFlex web page: http://www.ece.cmu.edu/~simflex
> 



-- 
MINSEON AHN
Computer Science Department
Dwight Look College of Engineering
Texas A&M University


Reply via email to