[Avida-SVN] r1052 - in branches/coopcomm: consistencytests/Tests consistencytests/Tests/Researchers/dule consistencytests/Tests/Researchers/goingssh source/cpu

dknoester at myxo.css.msu.edu dknoester at myxo.css.msu.edu
Tue Oct 17 07:03:53 PDT 2006


Author: dknoester
Date: 2006-10-17 10:03:53 -0400 (Tue, 17 Oct 2006)
New Revision: 1052

Modified:
   branches/coopcomm/consistencytests/Tests/CMakeLists.txt
   branches/coopcomm/consistencytests/Tests/Researchers/dule/CMakeLists.txt
   branches/coopcomm/consistencytests/Tests/Researchers/goingssh/CMakeLists.txt
   branches/coopcomm/source/cpu/cHardwareCPU.cc
   branches/coopcomm/source/cpu/cHardwareCPU.h
Log:
Merged trunk changes r1023:1051 into coopcomm branch.

Modified: branches/coopcomm/consistencytests/Tests/CMakeLists.txt
===================================================================
--- branches/coopcomm/consistencytests/Tests/CMakeLists.txt	2006-10-17 02:11:14 UTC (rev 1051)
+++ branches/coopcomm/consistencytests/Tests/CMakeLists.txt	2006-10-17 14:03:53 UTC (rev 1052)
@@ -1,2 +1,2 @@
 SUBDIRS(Default SMT)
-SUBDIRS(Researchers)
+#SUBDIRS(Researchers)

Modified: branches/coopcomm/consistencytests/Tests/Researchers/dule/CMakeLists.txt
===================================================================
--- branches/coopcomm/consistencytests/Tests/Researchers/dule/CMakeLists.txt	2006-10-17 02:11:14 UTC (rev 1051)
+++ branches/coopcomm/consistencytests/Tests/Researchers/dule/CMakeLists.txt	2006-10-17 14:03:53 UTC (rev 1052)
@@ -1,2 +1,2 @@
-#SUBDIRS(LocalSex)
+SUBDIRS(LocalSex)
 #SUBDIRS(LocalSex modularity)

Modified: branches/coopcomm/consistencytests/Tests/Researchers/goingssh/CMakeLists.txt
===================================================================
--- branches/coopcomm/consistencytests/Tests/Researchers/goingssh/CMakeLists.txt	2006-10-17 02:11:14 UTC (rev 1051)
+++ branches/coopcomm/consistencytests/Tests/Researchers/goingssh/CMakeLists.txt	2006-10-17 14:03:53 UTC (rev 1052)
@@ -1 +1 @@
-#SUBDIRS(Kazi)
+SUBDIRS(Kazi)

Modified: branches/coopcomm/source/cpu/cHardwareCPU.cc
===================================================================
--- branches/coopcomm/source/cpu/cHardwareCPU.cc	2006-10-17 02:11:14 UTC (rev 1051)
+++ branches/coopcomm/source/cpu/cHardwareCPU.cc	2006-10-17 14:03:53 UTC (rev 1052)
@@ -3530,3 +3530,22 @@
     return false;
   }
 }
+
+
+/*! This returns the number of cycles that this organism has used, including those cycles that have
+been expended due to failed instructions.
+*/
+bool cHardwareCPU::Inst_GetTimeUsed(cAvidaContext& ctx)
+{
+  GetRegister(FindModifiedRegister(REG_BX)) = organism->GetPhenotype().GetTimeUsed();
+  return true;
+}
+
+
+/*! This returns the age of the organism in terms of the number of updates that it has survived.
+*/
+bool cHardwareCPU::Inst_GetAge(cAvidaContext& ctx)
+{
+  GetRegister(FindModifiedRegister(REG_BX)) = organism->GetPhenotype().GetAge();
+  return true;
+}

Modified: branches/coopcomm/source/cpu/cHardwareCPU.h
===================================================================
--- branches/coopcomm/source/cpu/cHardwareCPU.h	2006-10-17 02:11:14 UTC (rev 1051)
+++ branches/coopcomm/source/cpu/cHardwareCPU.h	2006-10-17 14:03:53 UTC (rev 1052)
@@ -481,6 +481,10 @@
   bool Inst_GetFacing(cAvidaContext& ctx); //!< Retrieve this organism's facing.
   bool Inst_SetLeader(cAvidaContext& ctx); //!< Set the leader of this organism.
   bool Inst_GetLeader(cAvidaContext& ctx); //!< Retrieve the leader of this organism.
+
+
+  bool Inst_GetTimeUsed(cAvidaContext& ctx); //!< Retrieve the number of cycles that this organism has used.
+  bool Inst_GetAge(cAvidaContext& ctx); //!< Return the number of updates that this organism has survived.    
 };
 
 




More information about the Avida-cvs mailing list