OSDN Git Service

2007-02-19 Dave Brolley <brolley@redhat.com>
authorbrolley <brolley>
Mon, 19 Feb 2007 17:00:54 +0000 (17:00 +0000)
committerbrolley <brolley>
Mon, 19 Feb 2007 17:00:54 +0000 (17:00 +0000)
        * mepCfg.cxx (MepMemCfg::set_dynamic_config): Relate the gbmif as a
        client of the dynamic_configurator if it exists.
        (MepBoardCfg::map_mm_int): Removed.
        (MepBoardCfg::write_load): Call set_model_busses, if necessary.
        (MepBoardCfg::write_config): Call shared_main_mem->mep_mm_int, if
        necessary. Relate the gbif and lbif clients of the dynamic_configurator
        if they exist and may be wrapped.
        * commonCfg.cxx (SessionCfg): Initialize maybe_model_busses.
        (profile_config): Set maybe_model_busses, if necessary.
        * commonCfg.h (maybe_model_busses): New member of SessionCfg.

sid/main/dynamic/ChangeLog
sid/main/dynamic/commonCfg.cxx
sid/main/dynamic/commonCfg.h
sid/main/dynamic/mepCfg.cxx

index 9b24a09..289a0ba 100644 (file)
@@ -1,3 +1,16 @@
+2007-02-19  Dave Brolley  <brolley@redhat.com>
+
+       * mepCfg.cxx (MepMemCfg::set_dynamic_config): Relate the gbmif as a
+       client of the dynamic_configurator if it exists.
+       (MepBoardCfg::map_mm_int): Removed.
+       (MepBoardCfg::write_load): Call set_model_busses, if necessary.
+       (MepBoardCfg::write_config): Call shared_main_mem->mep_mm_int, if
+       necessary. Relate the gbif and lbif clients of the dynamic_configurator
+       if they exist and may be wrapped.
+       * commonCfg.cxx (SessionCfg): Initialize maybe_model_busses.
+       (profile_config): Set maybe_model_busses, if necessary.
+       * commonCfg.h (maybe_model_busses): New member of SessionCfg.
+
 2007-02-05  Dave Brolley  <brolley@redhat.com>
 
        * Contribute the following changes:
index 4016ee9..4975dbc 100644 (file)
@@ -582,6 +582,7 @@ SessionCfg::SessionCfg (const string name)
     use_stdio (true),
     need_gprof (false),
     need_core_probe (false),
+    maybe_model_busses (false),
     board_count (0),
     gdb_count (0)
 {
@@ -884,6 +885,9 @@ SessionCfg::profile_config (const string &spec)
        model_busses = profile_opt_value (opt, opt_parts, 1);
     }
 
+  if (model_busses != "false")
+    maybe_model_busses = true;
+
   // Now contruct a string representing the complete configuration
   add_profile_config (name,
                      "trace-extract="     + trace_extract     + ":" +
index 11e69cc..bd132f8 100644 (file)
@@ -243,6 +243,7 @@ struct SessionCfg :
   bool use_stdio;
   bool need_gprof;
   bool need_core_probe;
+  bool maybe_model_busses;
   void add_ulog_file (const string filename);
 
   map<const string, AtomicCfg *> ulog_map;
index faa5089..926f7fc 100644 (file)
@@ -514,6 +514,11 @@ public:
       {
        Relation (dynamic_configurator, "client", global_mapper).write_to (w);
       }
+    // The GBMIF uses ulog, so it may be reconfigured.
+    if (gbmif)
+      {
+       Relation (dynamic_configurator, "client", gbmif).write_to (w);
+      }
   }
 
   void set_model_busses (bool b = true);
@@ -1372,15 +1377,6 @@ void MepBoardCfg::need_mm_int (sid::big_int_4 mapped_addr, unsigned reg_num,
     }
 }
 
-
-void MepBoardCfg::map_mm_int ()
-{
-  // Create a mapping from the main mapper to the global mapper, where
-  // the mm_int is already mapped.
-  assert (shared_mm_int);
-  shared_main_mem->map_mm_int (this, shared_mm_int);
-}
-
 void MepBoardCfg::add_memory (const Mapping &m)
 {
   if (main_mapper)
@@ -2379,6 +2375,10 @@ MepMemCfg::write_config(Writer &w)
 
 void MepBoardCfg::write_load (Writer &w)
 {
+  assert (sess);
+  if (sess->maybe_model_busses)
+    set_model_busses (true);
+
   if (opt_bit_p)
     {
       if (dmem_bank_num && dmem_size)
@@ -2418,6 +2418,11 @@ void MepBoardCfg::write_config (Writer &w)
   set (cpu, "config-index", sidutil::make_attribute (config_index));
   set (cpu, "corrupt-caches?", sidutil::make_attribute (corrupt_caches));
 
+  // Create a mapping from the main mapper to the global mapper, where
+  // the mm_int is already mapped.
+  if (shared_mm_int)
+    shared_main_mem->map_mm_int (this, shared_mm_int);
+
   // Setup the bus model, if requested
   if (gbif)
     {
@@ -2767,6 +2772,18 @@ void MepBoardCfg::write_config (Writer &w)
          Relation (dynamic_configurator, "client", dmac).write_to (w);
        }
 
+      // The GBIF uses ulog.
+      if (gbif && ! gbif->possibly_wrapped ())
+       {
+         Relation (dynamic_configurator, "client", gbif).write_to (w);
+       }
+
+      // The LBIF uses ulog.
+      if (lbif && ! lbif->possibly_wrapped ())
+       {
+         Relation (dynamic_configurator, "client", lbif).write_to (w);
+       }
+
       // Toshapi hardware engines...
       for (map<string, MepHWengineCfg*>::iterator it = hwe.begin();
           it != hwe.end (); ++it)