[Avida-cvs] [Avida2-svn] r215 - in branches/brysonda/source: cpu main support
brysonda@myxo.css.msu.edu
brysonda at myxo.css.msu.edu
Tue Jun 21 08:48:53 PDT 2005
Author: brysonda
Date: 2005-06-21 11:48:53 -0400 (Tue, 21 Jun 2005)
New Revision: 215
Modified:
branches/brysonda/source/cpu/hardware_smt.cc
branches/brysonda/source/cpu/hardware_smt_constants.h
branches/brysonda/source/main/avida_driver_population.cc
branches/brysonda/source/support/genesis.smt
Log:
SMT hardware now works with default organism. Cleaned up primitive's output.
Modified: branches/brysonda/source/cpu/hardware_smt.cc
===================================================================
--- branches/brysonda/source/cpu/hardware_smt.cc 2005-06-21 14:49:28 UTC (rev 214)
+++ branches/brysonda/source/cpu/hardware_smt.cc 2005-06-21 15:48:53 UTC (rev 215)
@@ -50,8 +50,6 @@
cNOPEntry4Stack("Nop-B", nHardwareSMT::STACK_BX),
cNOPEntry4Stack("Nop-C", nHardwareSMT::STACK_CX),
cNOPEntry4Stack("Nop-D", nHardwareSMT::STACK_DX),
- cNOPEntry4Stack("Nop-E", nHardwareSMT::STACK_EX),
- cNOPEntry4Stack("Nop-F", nHardwareSMT::STACK_FX)
};
struct cInstEntry4Stack {
Modified: branches/brysonda/source/cpu/hardware_smt_constants.h
===================================================================
--- branches/brysonda/source/cpu/hardware_smt_constants.h 2005-06-21 14:49:28 UTC (rev 214)
+++ branches/brysonda/source/cpu/hardware_smt_constants.h 2005-06-21 15:48:53 UTC (rev 215)
@@ -13,14 +13,14 @@
// Constants can be used across different cpu models, wrap in namespace @DMB
namespace nHardwareSMT
{
- static const int NUM_LOCAL_STACKS = 5;
+ static const int NUM_LOCAL_STACKS = 3;
static const int NUM_GLOBAL_STACKS = 1;
static const int NUM_STACKS = NUM_LOCAL_STACKS + NUM_GLOBAL_STACKS;
- enum tStacks { STACK_AX = 0, STACK_BX, STACK_CX, STACK_DX, STACK_EX, STACK_FX };
+ enum tStacks { STACK_AX = 0, STACK_BX, STACK_CX, STACK_DX };
- static const int NUM_NOPS = 6;
- static const int NUM_MEMORY_SPACES = 6;
+ static const int NUM_NOPS = 4;
+ static const int NUM_MEMORY_SPACES = 4;
}
#endif
Modified: branches/brysonda/source/main/avida_driver_population.cc
===================================================================
--- branches/brysonda/source/main/avida_driver_population.cc 2005-06-21 14:49:28 UTC (rev 214)
+++ branches/brysonda/source/main/avida_driver_population.cc 2005-06-21 15:48:53 UTC (rev 215)
@@ -27,6 +27,7 @@
#include "tools.hh"
#include <iostream>
+#include <iomanip>
using namespace std;
@@ -94,8 +95,6 @@
void cAvidaDriver_Population::Run()
{
- // cout << "DEBUG: Turning control over to driver..." << endl;
-
assert( population != NULL );
// Process until done...
@@ -179,8 +178,6 @@
void cAvidaDriver_Population::ProcessOrganisms()
{
- // cout << "DEBUG: Running viewer-less update..." << endl;
-
// Process the update.
const int UD_size =
cConfig::GetAveTimeslice() * population->GetNumOrganisms();
@@ -199,9 +196,11 @@
// No viewer; print out status for this update....
cStats & stats = population->GetStats();
- cout << "UD: " << stats.GetUpdate() << "\t"
- << "Gen: " << stats.SumGeneration().Average() << "\t"
- << "Fit: " << stats.GetAveFitness() << "\t"
+ cout.setf(ios::left);
+ cout.setf(ios::showpoint);
+ cout << "UD: " << setw(6) << stats.GetUpdate() << " "
+ << "Gen: " << setw(9) << setprecision(7) << stats.SumGeneration().Average() << " "
+ << "Fit: " << setw(9) << setprecision(7) << stats.GetAveFitness() << " "
<< "Size: " << population->GetNumOrganisms()
<< endl;
}
Modified: branches/brysonda/source/support/genesis.smt
===================================================================
--- branches/brysonda/source/support/genesis.smt 2005-06-21 14:49:28 UTC (rev 214)
+++ branches/brysonda/source/support/genesis.smt 2005-06-21 15:48:53 UTC (rev 215)
@@ -20,7 +20,7 @@
MAX_CPU_THREADS 1 # Number of Threads CPUs can spawn
### Configuration Files ###
-DEFAULT_DIR ../work/ # Directory in which config files are found
+DEFAULT_DIR ../Avida2.work/ # Directory in which config files are found
INST_SET inst_set.smt # File containing instruction set
EVENT_FILE events.cfg # File containing list of events during run
ANALYZE_FILE analyze.cfg # File used for analysis mode
More information about the Avida-cvs
mailing list