In general there are 3 functions that the CPU calls on instructions in order to execute them. These are all functions within the "StaticInst" class.
1) initiateAcc 2) completeAcc 3) execute The first 2 are used for memory operations while the 3rd is what you care about for your integer example. Look at src/cpu/minor/execute.cc:938 That call to staticInst->execute() will call a generated function that actually does the add. This has to deal with how gem5 runs generic ISAs on multiple CPUs. The actual function that reads values and adds them together is located within the ISA description files somewhere under src/arch/<isa>. Depending on the ISA and actual instruction. On Thu, Nov 6, 2014 at 2:01 PM, Wei Miao via gem5-users <[email protected] > wrote: > Hello: > > I am now using Gem5 to do some simulation and design on CPU. I am now > looking at the minor CPU model. However, I cannot find where the > instruction will be truly "executed". For example, if I have a add > instruction, where will the "add" itself happened? I try to find it in > /src/cpu/minor/execute.cc and /src/cpu/minor/func_unit.cc but I cannot > find it. I will appreciate any ideas and helps. > > Thank you very much! > > Wei Miao > 11/6/2014 > > _______________________________________________ > gem5-users mailing list > [email protected] > http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users >
_______________________________________________ gem5-users mailing list [email protected] http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
