On Tue, Jan 3, 2012 at 2:43 AM, Teng-Feng Yang <[email protected]> wrote:

> Thanks for your quick reply!
>
> I got an additional question here.
> Since I only parallelize the out-of-order pipeline, I directly replace the
> *BaseCore* object array in *BaseMachine* with *OooCore* object array.
> For some reason, I also need to call methods of *OOO_CORE_MODEL::ThreadContext
> *in *machine.cpp*. However, SCons linker complains about undefined
> reference to these methods when linking qemu binary.
> It seems to me that the linker does not link the proper object files of
> these methods, but I can't really find how to make this right even with
> SCons user guide.
>
> To keep the modular structure intact, you must create some virtual
interface in BaseCore and use that to call your functions in OoO core.  The
reason for errors you are seeing is because an auto-generated code
mechanism used to compile different types of core configurations into
different namespaces.  The thought behind this design is to keep things
modular and use the smallest possible interface to simulate a core/module.
 'OOO_CORE_MODEL' namespace will be defined in a auto-generated header file
based on core model name in the config file.

- Avadh

PS: If you are looking to push back change to public please let me know how
you have designed so it makes easy to integrate your code to upstream.  We
are working on multi-threaded support for simulating large number of cores
and will be making it public within a week.

Any help would be truly grateful!
>
> Dennis
>
>
> 2012/1/1 avadh patel <[email protected]>
>
>>
>>
>> On Sat, Dec 31, 2011 at 5:37 AM, Teng-Feng Yang <[email protected]>wrote:
>>
>>> Hello
>>>
>>> Recently I try to parallelize the out-or-order pipeline of marss-0.2.1,
>>> which I have already done before on marss-0.1.2.
>>> I need to add some global variables in ooo.h which will be used in
>>> ptlsim/sim/machine.cpp and ptlsim/core/ooo-core/*.
>>> So I declare these global variables as "*extern* *(global variables
>>> definition)*" in *ooo.h* and define "*(global variable definitions)*"
>>> in *ooo.cpp*
>>> However, the linker keeps complaining about the multiple definition
>>> errors of all those newly added global variables.
>>> The error message is:
>>>
>>> ptlsim/build/core/ooo-core/ooo-pipe_ooo_2.o: In function
>>> `ooo_2::PhysicalRegister::unspecref(int, unsigned char)':
>>> /home/iris/Work/marss-0.2.1/ptlsim/core/ooo-core/ooo.h:957: multiple
>>> definition of `*(global variables)*'
>>> ptlsim/build/core/ooo-core/ooo-pipe_ooo.o:/home/iris/Work/marss-0.2.1/ptlsim/core/ooo-core/ooo.h:957:
>>> first defined here
>>>
>>> Since the SCONS omits the details of program compilation and linking
>>> info, I have nearly no clue to resolve these errors.
>>> Any help would be grateful!
>>>
>>> All cores are compiled multiple times because of the configuration
>> mechanism.  Because of that you'r getting this error.  If you want any
>> global variable place it in machine.cpp/h files.
>>
>> - Avadh
>>
>>> Dennis
>>>
>>>
>>>
>>> _______________________________________________
>>> http://www.marss86.org
>>> Marss86-Devel mailing list
>>> [email protected]
>>> https://www.cs.binghamton.edu/mailman/listinfo/marss86-devel
>>>
>>>
>>
>
>
> --
> Teng Feng Yang
> Research Assistant of Director. P.C. Yew
> Parallel Processing Laboratory
> Institute of Information Science
> Academia Sinica, Taiwan
> Tel: 886-2-27883799#1676
> E-mail:[email protected]
>
_______________________________________________
http://www.marss86.org
Marss86-Devel mailing list
[email protected]
https://www.cs.binghamton.edu/mailman/listinfo/marss86-devel

Reply via email to