This is the mail archive of the sid@sourceware.org mailing list for the SID project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch][commit] Dynamic Configuration for MeP


Hi,

I've committed the attached patch which contains some fixes for dynamic configuration of the MeP port.

Dave

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.

Index: sid/main/dynamic/commonCfg.cxx
===================================================================
RCS file: /cvs/src/src/sid/main/dynamic/commonCfg.cxx,v
retrieving revision 1.21
diff -c -p -r1.21 commonCfg.cxx
*** sid/main/dynamic/commonCfg.cxx	5 Feb 2007 20:28:42 -0000	1.21
--- sid/main/dynamic/commonCfg.cxx	19 Feb 2007 16:26:33 -0000
*************** SessionCfg::SessionCfg (const string nam
*** 582,587 ****
--- 582,588 ----
      use_stdio (true),
      need_gprof (false),
      need_core_probe (false),
+     maybe_model_busses (false),
      board_count (0),
      gdb_count (0)
  {
*************** SessionCfg::profile_config (const string
*** 884,889 ****
--- 885,893 ----
  	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: sid/main/dynamic/commonCfg.h
===================================================================
RCS file: /cvs/src/src/sid/main/dynamic/commonCfg.h,v
retrieving revision 1.11
diff -c -p -r1.11 commonCfg.h
*** sid/main/dynamic/commonCfg.h	5 Feb 2007 20:28:42 -0000	1.11
--- sid/main/dynamic/commonCfg.h	19 Feb 2007 16:26:33 -0000
*************** struct SessionCfg :
*** 243,248 ****
--- 243,249 ----
    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: sid/main/dynamic/mepCfg.cxx
===================================================================
RCS file: /cvs/src/src/sid/main/dynamic/mepCfg.cxx,v
retrieving revision 1.1
diff -c -p -r1.1 mepCfg.cxx
*** sid/main/dynamic/mepCfg.cxx	5 Feb 2007 20:28:42 -0000	1.1
--- sid/main/dynamic/mepCfg.cxx	19 Feb 2007 16:26:34 -0000
*************** public:
*** 514,519 ****
--- 514,524 ----
        {
  	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);
*************** void MepBoardCfg::need_mm_int (sid::big_
*** 1372,1386 ****
      }
  }
  
- 
- 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)
--- 1377,1382 ----
*************** MepMemCfg::write_config(Writer &w)
*** 2379,2384 ****
--- 2375,2384 ----
  
  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)
*************** void MepBoardCfg::write_config (Writer &
*** 2418,2423 ****
--- 2418,2428 ----
    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)
      {
*************** void MepBoardCfg::write_config (Writer &
*** 2767,2772 ****
--- 2772,2789 ----
  	  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)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]