[patch][rfc] New Port: Toshiba Media Processor (MeP)

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[patch][rfc] New Port: Toshiba Media Processor (MeP)

Dave Brolley-2
Hi,

Attached is a patch which adds support for the Toshiba Media Processor
(MeP) to SID.

This simulation includes multiple cpus, peripheral devices, and
modelling of bus contention all configurable at the source level (see
src/utils/MeP-Integrator to be contributed soon), on the command line
and also dynamically.

This port has been in house at Red Hat since 2001, but Toshiba has now
given us the go ahead to contribute it. I will be the maintainer of this
port and am seeking approval to commit it.

The contents of sid/component/cgen-cpu/mep and
sid/component/families/mep are quite large. I can provide a tarball on
request or (with approval) commit these directories to avoid posting
such a large volume of sources.

Dave

sid/bsp/pregen/ChangeLog:
2007-01-17  Dave Brolley  <[hidden email]>

        * Contribute the following changes:
        2001-12-04  Frank Ch. Eigler  <[hidden email]>

        * mep*.conf: Regenerated with mepcfgtool tweaks.

        2001-10-29  Frank Ch. Eigler  <[hidden email]>

        * pregen-configs.in (mep): Add --tksm for some configurations.

        2001-10-04  Frank Ch. Eigler  <[hidden email]>

        * pregen-configs.in (mep): Make "-EB" explicit where needed.

        2001-07-30  Ben Elliston  <[hidden email]>

        * pregen-configs.in: Emit mep-gloss.conf.
        * mep-gdb-tksm.conf: Regenerate.
        * mep-gdb.conf: Likewise.
        * mep-little-gdb-tksm.conf: Likewise.
        * mep-little-gdb.conf: Likewise.
        * mep-gloss.conf: New file.

        2001-07-11  Ben Elliston  <[hidden email]>

        * pregen-configs.in (mep): Generate little endian versions.
        * mep-little-gdb.conf: New file.
        * mep-little-gdb-tksm.conf: Likewise.

        2001-07-02  Ben Elliston  <[hidden email]>

        * pregen-configs.in (mep): Create basic files.
        * mep-gdb.conf, mep-gdb-tksm.conf: New files.

sid/bsp/ChangeLog:
2007-01-17  Dave Brolley  <[hidden email]>

        * Contribute the following changes:
        2004-02-03  Dave Brolley  <[hidden email]>

        * Makefile.am (FAM9SCRIPTS): Removed.
        * Makefile.in: Regenerated.
        * mep-elf-sid: Removed.

        2003-10-07  Dave Brolley  <[hidden email]>

        Add pretty names for various scheduler connections.
        * mep-elf-sid: Run sid directly, rather than configrun-sid.in.
        For Ben Elliston  <[hidden email]>
        * mep-elf-sid: Pass updated --board and --gloss options to sid.

        2001-05-21  Ben Elliston  <[hidden email]>

        * mep-elf-sid: Remove --board none.

        2001-04-04  Ben Elliston  <[hidden email]>

        * Makefile.am (FAM9SCRIPTS): Add mep-elf-sid.
        (ALLFAMSCRIPTS): Add $(FAM9SCRIPTS).
        * Makefile.in: Regenerate.

        2001-04-03  Ben Elliston  <[hidden email]>

        * mep-elf-sid: New file.

sid/component/cache/ChangeLog:
2007-01-17  Dave Brolley  <[hidden email]>

        * Contribute the following changes:
        2005-08-22  Dave Brolley  <[hidden email]>

        * mep-cache.cxx (configure): New virtual override in mep_cache.
        * mep-cache.h (configure): Likewise.

        2005-05-10  Dave Brolley  <[hidden email]>

        * mep-cache.cxx (mep_cache): Inherit from blocking_cache_component.
        * mep-cache.h (mep_cache): Inherit from blocking_cache_component.

        2004-07-20  Dave Brolley  <[hidden email]>

        * mep-cache.h (clear_tag_pin): New member of mep_cache.
        (mep_cache::clear_tag): New method.
        (mep_cache_line::clear_tag): New method.
        * mep-cache.cxx (mep_cache): Initialize clear_tag_pin. Add clear-tag
        pin.
        (mep_cache::clear_tag): New method.
        (mep_cache_line::clear_tag): New method.

        2004-04-29  Dave Brolley  <[hidden email]>

        * mep-cache.cxx (mep_assoc_replacement_algorithm::expell): update the
        R bit here.
        (mep_assoc_replacement_algorithm::update): Removed.
        * mep-cache.h (mep_assoc_replacement_algorithm::update): Removed.

        2004-04-26  Dave Brolley  <[hidden email]>

        * cache.cxx (mep-cache.h): #include it.
        (mep_assoc_replacement): New mep_assoc_replacement_algorithm.
        (CacheListTypes): List hw-mep-cache-* types.
        (create_mep_cache): New static function.
        (CacheCreate): Call create_mep_cache.
        * Makefile.am (libcache_la_SOURCES): Add mep-cache.{cxx,h}.
        * Makefile.in: Regenerated.

sid/component/cgen-cpu/ChangeLog:
2007-01-17  Dave Brolley  <[hidden email]>

        * Contribute the following changes:
        2005-04-22  Richard Sandiford  <[hidden email]>

        * compCGEN.cxx: Apply automatic MeP-Integrator changes.

        2005-04-17  Nick Clifton  <[hidden email]>

        * common_model.h (class mep_common_model): Add default
          defintions of MAX_UNITS and UNIT_U_EXEC in case they are not
          defined.

        2003-10-07  Dave Brolley  <[hidden email]>

        * compCGEN.cxx: Remove references to mep_ext[2-6] and
         mep_ext_{core,cop}[2-6].

        2002-02-04  Frank Ch. Eigler  <[hidden email]>

        * compCGEN.cxx (mep): Add new hw-cpu-mep-extN types.

        2001-04-03  John Healy  <[hidden email]>

        * compCGEN.cxx (compCGENCreate): Added conditional statements so
        that the mep code is only included in the compilation when the
        target is mep.

        2001-04-03  Ben Elliston  <[hidden email]>

        * compCGEN.cxx (compCGENListTypes): Add hw-cpu-mep.
        (compCGENCreate): Handle it.

        * configure.in (cpu_subdirs): Reinstate mep.
        * configure: Regenerate.

        2001-03-28  Ben Elliston  <[hidden email]>

        * configure.in (cpu_subdirs): Back out today's change.
        * configure: Regenerate.

        * configure.in (cpu_subdirs): Add mep.
        * configure: Regenerate.

sid/component/memory/ChangeLog:
2007-01-17  Dave Brolley  <[hidden email]>

        * Contribute the following changes:
        2006-10-23  Dave Brolley  <[hidden email]>

        * Makefile.am (libmemory_la_SOURCES): Add mep-cache-tag.cxx.
        * Makefile.in: Regenerated.

        2004-04-29  Dave Brolley  <[hidden email]>

        * mep-cache-tag.cxx (log2): New static template function.

        2004-04-29  Dave Brolley  <[hidden email]>

        * components.cxx (mep-cache_tag): #include it.
        * generic.h (generic_memory): warn_rom_write,allow_rom_write now
         protected.
        (compMemoryListTypes): List hw-mep-cache-tag-memory.
        (compMemoryCreate): Create hw_mep_cache_tag_memory.
        * Makefile.am (libmemory_la_SOURCES): Add mep-cache-tag.cxx.
        * Makefile.in: Regenerated.

        2003-10-07  Dave Brolley  <[hidden email]>

        For Frank Ch. Eigler  <[hidden email]>
        * generic.cxx (generic_memory ctor): Add evil backdoor hack to
        read memory buffer base/size via attributes.
        For Stan Cox  <[hidden email]>
        * generic.h (SID_GB_WRITE): allow_rom_write implies warn_rom_write.

        2003-10-07  Dave Brolley  <[hidden email]>

        For Stan Cox  <[hidden email]>
        * generic.h (generic_memory): New member allow_rom_write.
        (SID_GB_WRITE): Use it.
        * generic.cxx (generic_memory): Initialize it.

        2003-10-07  Dave Brolley  <[hidden email]>

        * generic.h (generic_read_write_bus::write_any): Move to
        generic_read_only_bus.
        (generic_read_only_bus::SID_GB_WRITE): Allow write to read-only-port
        with a warning if ignore_rom_write is set.

        2003-10-07  Dave Brolley  <[hidden email]>

        * generic.h (generic_memory): New member: base_address.
        (SID_GB_WRITE): Add target->base_address to the address printed.
        * generic.cxx (generic_memory): Initialize base_address. Add
        base-address attribute.

        2003-10-07  Dave Brolley  <[hidden email]>

        For Stan Cox  <[hidden email]>
        * generic.cxx (generic_memory): New member ignore_rom_write.
        * generic.h (generic_read_only_bus::SID_GB_WRITE): Use it.


sid/component/testsuite/ChangeLog:
2007-01-17  Dave Brolley  <[hidden email]>

        * Contribute the following changes:
        2005-07-29  Dave Brolley  <[hidden email]>

        * sidcomp.families.mep/mep-dmac.exp: load
        mem_component_library and cache_component_library.
        * sidcomp.families.mep/mep-dsu.exp: Likewise.
        * sidcomp.families.mep/mep-interrupt.exp: Likewise.
        * sidcomp.families.mep/mep-timer.exp: Likewise.

        2004-07-20  Dave Brolley  <[hidden email]>

        * sidcomp.families.mep/mep-interrupt.exp
        (exhaustive_driven_test):  Make sure mask for checking ISR is
        non-negative.

        2002-03-15  Frank Ch. Eigler  <[hidden email]>

        * sidcomp.cgen-cpu.mep/INTC.conf: Update for new word-multiplier
        syntax.
        * sidcomp.families.mep/mep-dmac.exp: Ditto.

        2003-02-11  Dave Brolley  <[hidden email]>

        * sidcomp.families.mep/mep-timer.exp (stress_test): Set both CMP and CNT
        to zero to test immediate timeout.
        (timer_test): Ditto.

        2003-01-16  Dave Brolley  <[hidden email]>

        * sidcomp.families.mep/mep-timer.exp (check_one_timer_test): Adjust
        expected iteration count.

        2002-11-28  Dave Brolley  <[hidden email]>

        * sidcomp.families.mep/mep-dmac.exp: Cut down execution time by using
        a mix of priorities rather than running all tests with all priorities.

        2002-11-21  Dave Brolley  <[hidden email]>

        * sidcomp.families.mep/mep-timer.exp: New testcase.

        2002-10-25  Dave Brolley  <[hidden email]>

        * sidcomp.families.mep/mep-dmac.exp: Cut down execution time by using
        a mix of configurations rather than an exhaustive approach.

        2002-10-25  Dave Brolley  <[hidden email]>

        * sidcomp.families.mep/mep-dmac.exp: Completely rewritten to test new
        DMAC specification.

        2002-10-15  Dave Brolley  <[hidden email]>

        * sidcomp.families.mep/mep-dmac.exp: Update dmac control register bus
        names.
        (do_local_to_main_dma): Update control dmac register mapping.
        (do_main_to_local_dma): Ditto.

        2002-02-28  Graydon Hoare  <[hidden email]>

        * sidcomp.families.mep/mep-interrupt.exp: Correct little-endian
        control bus accesses. Cancel level-triggered interrupts by clearing
        interrupt channel rather than writing to ISR.

        2001-12-05  Ben Elliston  <[hidden email]>

        * sidcomp.families.mep/mep-interrupt.exp: Overhaul.

        2001-12-04  Ben Elliston  <[hidden email]>

        * sidcomp.families.mep/mep-dsu.exp: Make more robust.

        2001-09-17  Ben Elliston  <[hidden email]>

        * sidcomp.families.mep/mep-dsu.exp: Unset $bus for good measure.

        2001-09-05  Ben Elliston  <[hidden email]>

        * sidcomp.families.mep/mep-dsu.exp: Test unmasking of interrupts
        and NMIs when any are pending.

        2001-08-22  Ben Elliston  <[hidden email]>

        * sidcomp.families.mep/mep-dsu.exp: Revise for new features.

        2001-08-22  Ben Elliston  <[hidden email]>

        * sidcomp.families.mep/mepdocs.exp: Test hw-debug-mep docs.
        * sidcomp.families.mep/mep-dsu.exp: New test script.

        2001-07-24  Ben Elliston  <[hidden email]>

        * sidcomp.families.mep/mep-dmac.exp: Use new type names.
        * sidcomp.families.mep/mep-interrupt.exp: Likewise.
        * sidcomp.families.mep/mepdocs.exp: Likewise.

        2001-07-23  graydon hoare  <[hidden email]>

        * sidcomp.families.mep/mep-dmac.exp: Add tests for the DMA
        controller.

        2001-07-19  Ben Elliston  <[hidden email]>

        * sidcomp.families.mep/mep-interrupt.exp: Locate component from
        the correct component library.

        2001-07-18  Ben Elliston  <[hidden email]>

        * sidcomp.families.mep/mepdocs.exp: New file.

        2001-07-18  Ben Elliston  <[hidden email]>

        * sidcomp.interrupt/interruptdocs.exp: Remove hw-interrupt-mep.
        * sidcomp.interrupt/mep-interrupt.exp: Move from here ..
        * sidcomp.families.mep/mep-interrupt.exp: .. to here.

        2001-07-02  Ben Elliston  <[hidden email]>

        * sidcomp.interrupt/interruptdocs.exp: Test hw-interrupt-mep docs.

        2001-06-29  Ben Elliston  <[hidden email]>

        * sidcomp.interrupt/mep-interrupt.exp: Add level-triggered cases.

        2001-06-29  Ben Elliston  <[hidden email]>

        * sidcomp.interrupt/mep-interrupt.exp: New test script.

        2001-05-31  Ben Elliston  <[hidden email]>

        * sidcomp.cgen-cpu/cpudocs.exp: Test hw-cpu-mep documentation.
        * sidcomp.cgen-cpu/cpumonkey.exp: Monkey test hw-cpu-mep.

sid/component/ChangeLog:
2007-01-17  Dave Brolley  <[hidden email]>

        * Contribute the following changes:
        2005-07-29  Dave Brolley  <[hidden email]>

        * families/configure.in (family_subdirs): Add 'mep'.
        * families/configure: Regenerated.

        2001-08-20  Ben Elliston  <[hidden email]>

        * CATALOG: Document the mepfamily_component_library. Add
        hw-debug-mep and hw-dma-mep.

        2001-06-28  Ben Elliston  <[hidden email]>

        * CATALOG: Add hw-interrupt-mep.

        2001-05-31  Ben Elliston  <[hidden email]>

        * CATALOG: Add hw-cpu-mep.

        2001-04-03  Ben Elliston  <[hidden email]>

        * tconfig.in: Belatedly add support for mep.

sid/comfig/ChangeLog:
2001-03-22  Ben Elliston  <[hidden email]>

        * sidtargets.m4: Add support for SIDTARGET_MEP.
        * info.tcl.in: Add sidtarget(mep).

sid/main/dynamic/ChangeLog:
2007-01-17  Dave Brolley  <[hidden email]>

        * Contribute the following changes:
        2006-09-14  Dave Brolley  <[hidden email]>

        * mepCfg.h (get_local_shadow_bit_insn_probe): New method of MepBoardCfg.
        (shadow_covers_local_region): New method of MepBoardCfg.
        (local_shadow_bit_insn_probe): New member of MepBoardCfg.
        * mepCfg.cxx (map_boards): Call map_imem_dmem for each board here...
        (setup_memory_map): ... not here. Connect a probe to any mappings
        of local shadows onto another module's dmem in order to monitor
        access by bit insns.
        (MepCacheCfg): bit_insn_probes array is now a scalar, bit_insn_probe.
        (MepCacheCfg::configure): Connect bit_insn_probe's downstream accessor
        to the cache, if it exists.
        (cache): Insert bit_insn_probe into the mapping of any cached regions,
        if it exists. Remove instance which takes a second argument.
        (need_bit_insn_probe): Renamed from need_bit_insn_probes. Now creates
        only one probe.
        (MepBoardCfg): Initialize local_shadow_bit_insn_probe.
        (configure_dcache): Do not insert a probe to monitor access to cache tag
        and data areas.
        (shadow_covers_local_region): Multiply imem_size by 1024 when testing the
        imem range. Now takes a 5th argument which is a reference to a bool
        indicating whether the memory range covered is dmem.
        (write_load): If opt_bit_p is set, create local_shadow_bit_insn_probe.
        (MepMemRegionCfg): Use make_numeric_attribute and pass std::ios::hex.
        (mep_imem_dmem): Likewise.

        2006-08-29  Dave Brolley  <[hidden email]>

        * mepCfg.h (MepBoardCfg::write_load): New method.
        (dmem_probes): New member of MepBoardCfg.
        (opt_bit_p): New member of MepBoardCfg.
        * mepCfg.cxx (MepCacheCfg): Initizlize bit_insn_probes.
        (MepCacheCfg::configure): Connect the bit insn probes to main memory,
        if they exist.
        (MepCacheCfg::pass): New variant for passing a region with probing.
        (need_bit_insn_probes): New method of MepCacheCfg.
        (bit_insn_probes): New member of MepCacheCfg.
        (opt_bit_p): New member of MepBoardCfg.
        (configure_dcache): If opt_bit_p is set, pass the cache line area and cache
        tag area with probing.
        (map_imem_dmem): If opt_bit_p is set, set up a bus probe for the dmem regions.
        (MepBoardCfg::write_load): New method.
        (set_opt_bit): Set opt_bit_p.

        2005-06-30  Dave Brolley  <[hidden email]>

        * mepCfg.cxx (num_boards): New method of MepMemCfg.
        (irq_specs): New static member of MepBoardCfg.
        (MepBoardCfg::write_config): Call configure_irqs. Don't clear
        mep_peripherals. Use a static flag to process peripherals only once.
        (add_irq): Just add the spec to irq_specs.
        (configure_irqs): New method of MepBoardCfg.
        (configure_irq): New method of MepBoardCfg.
        * mepCfg.h (MepIrq): New struct type in MepBoardCfg.
        (configure_irqs): New method of MepBoardCfg.
        (configure_irq): New method of MepBoardCfg.

        2005-06-06  Dave Brolley  <[hidden email]>

        * mainDynamic.cxx (main): Add " --model-busses" to board_start_config instead of
        " --model_busses" (typo).
        * mepCfg.cxx (MepCacheCfg::set_dynamic_config): Check whether my_cache
        is wrapped before connecting it to the dynamic_configurator.
        (MepBoardCfg): Relate cpu to insn_buffer.
        (configure_icache): Don't set our loader member here. Use automatic
        temp, the_loader.
        (configure_dcache): Likewise.
        (MepBoardCfg::write_config): Connect the downstream-passthrough pin
        to the correct passthrough pin on the gbmif. Set the cpu's
        step-insn-count-1-required attribute. Check whether insn-buffer is
        wrapped before connecting it to the dynamic configurator. Likewise
        for the dmac, hardware engines and peripherals.

        2005-05-29  Dave Brolley  <[hidden email]>

        * mepCfg.cxx (set_dynamic_config): New method of mepCacheCfg.
        (mepBoardCfg::write_config): Make connections and set attributes to
        allow dynamic reconfiguration of mep components.

        2005-04-22  Richard Sandiford  <[hidden email]>

        * mepCfg.cxx (MepMemCfg::MepMemCfg, MepBoardCfg::MepBoardCfg)
        (MepBoardCfg::add_memory, MepBoardCfg::configure_icache)
        * mainDynamic.cxx, mepCfg.cxx: Apply automatic MeP-Integrator changes.

        2005-02-24  Dave Brolley  <[hidden email]>

        * mepCfg.h (MEP_CORE_C4): New macro.
        * mepCfg.cxx (map_imem_dmem): Don't check core type when checking
        dmem_fixed_start_address.
        (write_config): Likewise.

        2005-01-14  Dave Brolley  <[hidden email]>

        * mainDynamic.cxx (usage): Document --model-busses.

        2004-12-07  Dave Brolley  <[hidden email]>

        * commonCfg.h (set_opt_gbif): Removed.
        (set_opt_lbif): Removed.
        (set_opt_gbmif): Removed.
        * mainDynamic.cxx (usage): Removed description of --gbif, --lbif and
        --gbmif.
        (Defs): Removed gbmif.
        (option_num): Remove opt_gbif, opt_lbif and opt_gbmif.
        (long_options): Remove gbif, lbif and gbmif.
        (main): Remove default for gbmif. Remove handling of opt_gbif,
        opt_lbif, opt_gbmif.
        * mepCfg.cxx (MepBusArbitratorCfg): Now takes second argument for type.
        (gbmif_type): New member of MepMemCfg.
        (set_opt_gbmif): Removed from MepMemCfg and MepBoardCfg.
        (add_toshapi_gbmif): Renamed to add_toshapi_global_bus_model. Now sets
        gbmif_type.
        (MepBoardCfg): gbif_name and lbif_name renamed to gbif_type and
        lbif_type respectively.
        (add_toshapi_gbif): Renamed to add_toshapi_global_bus_if_model.
        (add_toshapi_lbif): Renamed to add toshapi_local_bus_model.
        (set_core_id): Update curr_core_id.
        (set_opt_gbif): Removed from MepBoardCfg.
        (set_opt_lbif): Removed from MepBoardCfg.
        * MepCfg.h (add_toshapi_gbmif): Renamed to add_toshapi_global_bus_model.
        (MepBoardCfg): gbif_name and lbif_name renamed to gbif_type and
        lbif_type respectively.
        (add_toshapi_gbif): Renamed to add_toshapi_global_bus_if_model.
        (add_toshapi_lbif): Renamed to add toshapi_local_bus_model.
        (set_opt_gbmif): Removed from MepMemCfg and MepBoardCfg.
        (set_opt_gbif): Removed from MepBoardCfg.
        (set_opt_lbif): Removed from MepBoardCfg.
        (gbif_map): Removed from MepBoardCfg.
        (lbif_map): Removed from MepBoardCfg.

        2004-11-08  Dave Brolley  <[hidden email]>

        * mepCfg.cxx (MepCacheCfg): Initialize data_width.
        (MepCacheCfg::configure): Set data-width attributeof the cache.
        (set_data_width): New method of MepCacheCfg.
        (data_width): New member of MepCacheCfg.
        (configure_icache): Call icache->set_data_width.
        (configure_dcache): Call dcache->set_data_width.
        (MepBoardCfg::write_config): Set the data-width attribute of the
        insn_buffer.
        * commonCfg.cxx (GprofCfg): Check the initial substring of comp_type ()
        not the entire string.

        2004-11-02  Dave Brolley  <[hidden email]>

        * mepCfg.cxx (MepCacheCfg::configure): Connect the cache's
        "operation-status" pin to the cpu's "cache-operation-status" pin.

        2004-10-28  Dave Brolley  <[hidden email]>

        * mepCfg.cxx (mep_boards): Only connect gbmif's global-bus-lock to the
        board's gbif global-bus-slave-lock if the board has a gbif.
        (MepBoardCfg::set_model_busses): Set insn_count_1.
        (MepBoardCfg::set_opt_gbmif): Don't call set_model_busses.

        2004-10-22  Dave Brolley  <[hidden email]>

        * commonCfg.h (set_opt_gbif): New method of BoardCfg.
        (set_opt_lbif): New method of BoardCfg.
        (set_opt_gbmif): New method of BoardCfg.
        * mepCfg.h (MepBusArbitratorCfg): New class.
        (set_opt_gbmif): New method of MepMemCfg and MepBoardCfg.
        (add_toshapi_gbmif): New method of MepMemCfg.
        (add_toshapi_gbif): New method of MepBoardCfg.
        (add_toshapi_lbif): New method of MepBoardCfg.
        (set_opt_gbif): New method of MepBoardCfg.
        (set_opt_lbif): New method of MepBoardCfg.
        (gbif_name,lbif_name): New members of MepBoardCfg.
        (gbif_map,lbif_map): Ditto.
        * mepCfg.cxx (MepBusArbitratorCfg): New class.
        (map_global_memory): Set latency of memory to 1 cycle if modelling
        busses.
        (setup_memory_map): Adjust base address of local memory if mapping
        via the lbif.
        (set_opt_gbmif): New method of MepMemCfg and MepBoardCfg.
        (add_toshapi_gbmif): New method of MepMemCfg.
        (set_model_busses): Create MepBusArbitratorCfg. Connect the gbmif to the
        global bus here.
        (MepCacheCfg): Map the "total-latency?" attribute the the cache.
        (MepBoardCfg): Initialize gbif_name and lbif_name.
        (add_toshapi_gbif): New method of MepBoardCfg.
        (add_toshapi_lbif): New method of MepBoardCfg.
        (MepBoardCfg::write_config): Set the "total-latency?" attribute of
        the caches here.
        (set_opt_gbif): New method of MepBoardCfg.
        (set_opt_lbif): New method of MepBoardCfg.
        * mainDynamic.cxx (usage): Describe --gbif, --lbif and --gbmif.
        (Defs): New member gbmif.
        (option_num): Add opt_gbif, opt_lbif and opt_gbmif.
        (long_options): Add gbif, lbif and gbmif.
        (main): Propogate default for gbmif to boards. Handle opt_gbif,
        opt_lbif, opt_gbmif.
       
        2004-10-12  Dave Brolley  <[hidden email]>

        * mepCfg.cxx (MepMemCfg): Initialize gbmif.
        (map_global_memory): Set the "ports" attribute of the gbmif.
        (map_boards): Connect the gbmif's "global-bus-lock" pin to the
        "global-bus-slave-lock" pin of each gbif.
        (setup_memory_map): Map local shadows to the global-bus-slave-interface
        of the gbif, if specified. Don't use a base address when mapping local
        shadows onto the lbif. Connect the gbmif's "global-bus" to the global
        mapper.
        (set_model_busses): Move the implementation out of the class
        declaration.
        (MepCacheCfg): Map the downstream-lock pin from the cache component.
        (set_loader): Connect the dmac's "check-address" pin to the "probe" pin.
        (set_model_busses): Schedule the gbif and the lbif.
        (MepBoardCfg::write_config): Connect the gbif to the gbmif. Connect
        the downstream-lock pins for all blockable and arbitrating components.
        Set up the dmac as a blockable component.
        (configure_dmac): Connect the dmac to the gbif and lbif if specified.

        2004-09-16  Dave Brolley  <[hidden email]>

        * mepCfg.h (MepBoardCfg::set_model_busses): New virtual method.
        (gbif,lbif): New members of MepBoardCfg.
        * mepCfg.cxx (MepMemCfg): Initialize model_busses.
        (MepMemCfg::setup_memory_map): Map global memory through the GBIF if
        necessary. Connect the GBIF and LBIF to downstream objects if
        necessary.
        (MepMemCfg::set_model_busses): New method.
        (MepMemCfg::model_busses_p): New method.
        (MepMemCfg::model_busses): New member.
        (map_peripheral): Map peripheral memory through the GBIF if necessary.
        (map_mm_int): Ditto for mm_int memory..
        (MepCacheComponentCfg): Inherit from BlockingCacheCfg.
        (MepCacheCfg): Map attributes "name", "blockable?", "ulog-*",
        "buffer-output" from my_cache.
        (MepBoardCfg): Initialize gbif and lbif. Construct insn_buffer using
        BlockingCacheCfg.
        (MepBoardCfg::set_model_busses): New virtual method.
        (MepBoardCfg)::map_local_mem): Map local memory through the GBIF if
        necessary.
        (MepBoardCfg::write_config): Set up the cpu, gbif, lbif, insn_buffer,
        icache and dcache as blockable is specified.
        * mainDynamic.cxx (model_busses): New member of Defs.
        (opt_model_busses): New member of option_num.
        (long_options): Add model-busses.
        (main): Set default for --model-busses. Handle opt_model_busses.

        2005-07-29  Dave Brolley  <[hidden email]>

        * mepCfg.cxx (set_cop_ccr): New method of MepBoardCfg.
        * mepCfg.h (set_cop_ccr): Likewise.

        2004-08-20  Dave Brolley  <[hidden email]>

        * mepCfg.cxx (configure_dmac): Connect the dmac's "error" pin to main's
        "stop!" pin and yield-net's "input" pin.

        2004-08-16  Dave Brolley  <[hidden email]>

        * commonCfg.cxx (GprofCfg): Connect the cpu's "sample-gprof" pin to
        the gprof's "sample" pin for instruction_count mode of sampling.
        * mepCfg.cxx (write_config): Don't set the gprof's "bucket-size" here.

        2004-08-11  Dave Brolley  <[hidden email]>

        * mepCfg.cxx (MepCacheTagMemCfg): Don't initialize read_latency
        and write_latency for MemCfg.
        (MepCacheCfg): Ditto for "data-test-mem".

        2004-07-22  Dave Brolley  <[hidden email]>

        * mepCfg.cxx (MepBoardCfg::write_config): Correct DRBN value for the
        case of no DMEM.

        2004-07-20  Dave Brolley  <[hidden email]>

        * mepCfg.cxx (MepCacheCfg::configure): connect "cache-invalidate" to
        "clear-tag".

        2004-06-24  Dave Brolley  <[hidden email]>

        * mepCfg.h (MEP_CORE_MEP, MEP_CORE_H1): New macros.
        (MEP_CORE_UNKNOWN): Removed.
        (set_dmem_fixed_start_address): New method.
        (set_opt_dmem_fixed_start_address): New method.
        * mepCfg.cxx (MepCacheCfg): Set latency of data_test_mem to be 10
        cycles.
        (MepCacheCfg::configure): Connect the cpu's insn-cache-invalidate-all
        pin, data-cache-invalidate-all pin and cache-prefetch pin.
        (MepDSUCfg): Now takes a core_type argument. Use it to set the range
        of the DSU registers on the control bus.
        (MepBoardCfg): Initialize core_type to MEP_CORE_MEP. Initialize
        dmem_fixed_start_address.
        (set_dmem_fixed_start_address): New method.
        (set_opt_dmem_fixed_start_address): New method.
        (map_imem_dmem): Only compute imem/dmem bases if they are configured.
        (MepBoardCfg::write_config): Set the dsu's core-type attribute.
        Handle dmem_fixed_start_address.
        (need_dsu): Pass core_type to MepDSUCfg.
        * mainDynamic.cxx (usage): Document --dmem-[no-]fixed-start-address.
        (option_num): Add dmem_[no_]fixed_start_address.
        (long_options): Add dmem-[no-]fixed-start-address.
        (main): Handle dmem_[no_]fixed_start_address.
        * commonCfg.h (BoardCfg): New virtual method
        set_opt_dmem_fixed_start_address.

        2004-06-24  Dave Brolley  <[hidden email]>

        * mepCfg.cxx (MepCacheCfg): Don't connect "invalidate-all" pin to the
        init-sequence.
        (MepBoardCfg): Initialize corrupt_caches.
        (MepBoardCfg::write_config): set the cpu's "corrupt-caches" attribute.
        * mainDynamic.cxx (usage): Document --corrupt-caches.
        (Defs): New member: corrupt_caches.
        (opt_corrupt_caches): New member of option_num.
        (long_options): Add "corrupt-caches".
        (main): Handle opt_corrupt_caches.
        * mepCfg.h (set_corrupt_caches): New virtual method of MepBoardCfg.
        (corrupt_caches): New member of MepBoardCfg.
        * commonCfg.h (set_corrupt_caches): New virtual method of BoardCfg.

        2004-04-29  Dave Brolley  <[hidden email]>

        * mepCfg.cxx (MepCacheCfg::configure): Move the setting of tag_test_mem
        attributes to here from the constructor.
        * mep-cache.{cxx,h}: New files.

        2004-04-29  Dave Brolley  <[hidden email]>

        * mepCfg.h (MepBoardCfg::set_endian): New specialization.
        (endianness): New member of MepBoardCfg.
        * mepCfg.cxx (MepCacheComponentCfg): New class.
        (MepCacheTagMemCfg): New class.
        (MepCacheCfg): Use new classes above. Allocate and map cache data/tag
        test memory. No more tag_test_probe. Caches read tags from mapped
        memory.
        (MepCacheCfg::get_size): Removed.
        (MepCacheCfg::set_endianness): New method.
        (MepBoardCfg): Initialize core_type to MEP_CORE_UNKNOWN.
        (MepBoardCfg::set_endian): New specialization.
        (MepBoardCfg::configure{i,d}cache): Get loader from the session if the
        board doesn't have its own. Call {i,d}cache->set_endianness based on
        the loader.

        2004-04-08  Dave Brolley  <[hidden email]>

        * mepCfg.h (hw_engines): New member of MepBoardCfg.
        * mepCfg.cxx (MepBoardCfg): Initialize hw_engines.
        (add_hw_engine): Don't set the cpu's hwe-option? attribute here. Just
        count the hardware engine.
        (add_toshapi_hw_engine): Ditto.
        (add_toshapi_dsp, add_toshapi_uci): Don't count as a hardware engine.
        (write_config): Set the cpu's hwe-option? attribute here based on
        hw_engines.

        2004-04-01  Dave Brolley  <[hidden email]>

        * mepCfg.h (MEP_CORE_*): New macros.
        (add_dsp): New argument: dmem_if_width.
        (add_toshapi_dsp): Ditto.
        (set_core_type): New method of MepBoardCfg.
        (set_icache_cwf): New method of MepBoardCfg.
        (set_dcache_cwf): New method of MepBoardCfg.
        (set_opt_icache_cwf): New method of MepBoardCfg.
        (set_opt_dcache_cwf): New method of MepBoardCfg.
        * mepCfg.cxx (MepCacheCfg): New parameter: cwf. New members: my_cwf,
        my_way.
        (set_way): Set this->my_way.
        (set_cwf): New method of MepCacheCfg.
        (get_size): Ditto.
        (get_way): Ditto.
        (get_line_size): Ditto.
        (get_cwf): Ditto.
        (MepBoardCfg): Initialize core_type.
        (add_dsp): New argument: dmem_if_width. Set the cpu's
        "dsp-dmem-if-width" attribute.
        (add_toshapi_dsp): Ditto.
        (set_core_type): New method of MepBoardCfg.
        (need_icache): Call MepCacheCfg with new argument list.
        (need_dcache): Call MepCacheCfg with new argument list.
        (set_icache_cwf): New method of MepBoardCfg.
        (set_dcache_cwf): New method of MepBoardCfg.
        (MepBoardCfg::write_config): Use core_type to set the ID.ID field. Set
        new fields for c3 fore in CCFG.
        (set_opt_icache_cwf): New method of MepBoardCfg.
        (set_opt_dcache_cwf): New method of MepBoardCfg.
        * mainDynamic.cxx (usage): Document --icache-line-size, --icache-way,
        --icache-cwf options. Also same options for dcache.
        (option_num): New enumerators opt_icache_line_size, opt_icache_way,
        opt_icache_cwf. Same for dcache.
        (long_options): Add icache-line-size, icache-way and icache-cwf.
        Same for dcache.
        (main): Handleopt_icache_line_size, opt_icache_way, opt_icache_cwf.
        Same for dcache.
        * commonCfg.h (set_opt_icache_cwf): New method of BoardCfg.
        (set_opt_dcache_cwf): New method of BoardCfg.

        2004-03-30  Dave Brolley  <[hidden email]>

        * mepCfg.cxx (MepCacheCfg): New parameter: way. Call set_way.
        (add_toshapi_dsp): Call conn_pin for "dsp-arg4" and "dsp-arg7".
        (add_toshapi_uci): Call conn_pin for "uci-arg4".
        (need_icache): Pass default setting of 1 for 'way'.
        (need_dcache): Pass default setting of 1 for 'way'.
        (set_opt_{icache,dcache}_{linesize,way}): New methods of MepBoardCfg.
        (set_{icache,dcache}_{linesize,way}): New methods of MepBoardCfg.
        * commonCfg.h (set_opt_{icache,dcache}_{linesize,way}): New methods of
        BoardCfg.
        * mepCfg.h: Ditto for MepBoardCfg.

        2004-03-22  Dave Brolley  <[hidden email]>

        * mepCfg.cxx (shared_dsp_log): Removed.
        (add_toshapi_dsp): Connext the dsp's "dsp-log-out" pin to the cpu's
        "trace" pin.
        * mepCfg.h (shared_dsp_log): Removed.

        2004-03-09  Dave Brolley  <[hidden email]>

        * mepCfg.cxx (add_toshapi_dsp): Set cpu's "hwe-option?" to false.
        (add_toshapi_uci): Ditto.

        2004-02-23  Dave Brolley  <[hidden email]>

        * mepCfg.h (add_dmac): No longer takes irq_dmac argument.
        (set_config_index): New virtual method of BoardCfg.
        (set_opt_dmac_irq): Removed.
        (config_index): New member of MepBoardCfg.
        (dmac_irq): Removed.
        * mepCfg.cxx (MepBoardCfg): Initialize config_index. Remove
        initialization of dmac_irq.
        (add_hw_engine): set the cpu's "hwe_option?" attribute.
        (add_toshapi_hw_engine): Ditto.
        (MepBoardCfg::write_config): Set the cpuj's "config-index" attribute.
        ID.ID is now 0x2.
        (add_dmac): No longer takes irq_dmac argument.
        (configure_dmac): Remove check of dmac_irq.
        (add_exit_location): Add memory to the exit-watchdog so that it doesn't
        return sid::status::unmapped when accessed.
        (set_opt_dmac_irq): Removed.
        (irq_dmac): Removed.
        (add_irq): Remove handling of irq_dmac.
        * mainDynamic.cxx (usage): Remove description of --dmac-irq and
        --dmac-no-irq.
        (option_num): Remove opt_dmac_irq and opt_dmac_no_irq.
        (main): Call curr_board->set_config_index. Remove handling of
        opt_dmac_irq and opt_dmac_no_irq.
        * commonCfg.h (set_config_index): New virtual method of BoardCfg.
        (opt_dmac_irq): Removed.

        2004-02-17  Dave Brolley  <[hidden email]>

        * mepCfg.cxx (add_timer): Check that timer has been allocated.

        2004-02-16  Dave Brolley  <[hidden email]>

        * mepCfg.h (set_dsp_user_out): New virtual method of BoardCfg.
        (dsp_user_out): New member of MepBoardCfg.
        * mepCfg.cxx (dsp_user_out): New member of MepBoardCfg.
        (MepBoardCfg::write_config): Set "dsp-user-out-option?" in the
        cpu and "user-out" in each dsp.
        * mainDynamic.cxx (usage): Document --[no-]dsp-user-out.
        (dsp_user_out): New member of Defs. Initialize it.
        (option_num): Add opt_dsp_user_out and opt_no_dsp_user_out.
        (load_options): Add "dsp-user-out" and "no-dsp-user-out".
        (main): Use default setting of dsp_user_out if specified.
        Handle opt_dsp_user_out and opt_no_dsp_user_out.
        * commonCfg.h (set_dsp_user_out): New virtual method of BoardCfg.

        2004-02-09  Dave Brolley  <[hidden email]>

        * mepCfg.cxx (MepMemCfg): Initialize insn_count_1.
        (insn_count_1_required): New method of MepBoardCfg.
        (insn_count_1): New member of MepBoardCfg.
        (add_peripheral): Set insn_count_1.
        (add_toshapi_peripheral): Ditto.
        (add_hw_engine, add_toshapi_hw_engine): Ditto.
        (MepBoardCfg): initialize insn_count_1 and step_insn_count.
        (MepBoardCfg::write_config): Call set_step_insn_count if required.
        (trace_counter): New virtual method of MepBoardCfg.
        (set_step_insn_count): Ditto.
        (insn_count_1_required): Ditto.
        * mepCfg.h (trace_counter): New virtual method of MepBoardCfg.
        (set_step_insn_count): Ditto.
        (step_insn_count, insn_count_1): New members of MepBoardCfg.
        (step_insn_count_1_required): New method of MepBoardCfg.

        2004-02-03  Dave Brolley  <[hidden email]>

        * mepCfg.cxx (set_channels): New method of MepTimerCfg.
        (MepBoardCfg): Remove timer_channel_bitw.
        (add_timer): Pass channel_bitw to allocate_timer and call
        timer->set_channels.
        (allocate_timer): Now takes channel_bitw_argument.
        (configure_timer): Use timer->get_channels.
        (configure_dmac): Ditto.
        * mepCfg.h (allocate_timer): Now takes channel_bitw_argument.
        (MepBoardCfg): Remove timer_channel_bitw.

        2004-01-30  Dave Brolley  <[hidden email]>

        * mepCfg.cxx (add_toshapi_dsp): Call set_opt_dsp.

        2004-01-26  Dave Brolley  <[hidden email]>

        * mepCfg.h (allocate_timer, configure_timer): New methods of MepBoardCfg.
        (set_opt_timer_channel_bitw): New method of MepBoardCfg.
        (timer_channel_bitw): New member of MepBoardCfg.
        * mepCfg.cxx (MepBoardCfg): Initialize timer_channel_bitw.
        (set_dmem_bank_num): Allow dmem_bank_num to be set to zero.
        (map_imem_dmem): Correct fmem_base_address for case of no dmem.
        Initialize dmem_base[0].
        (MepBoardCfg::write_config): Call configure_timer. Move setup of timer
        interrupt pins to configure_timer. Handle case where dmem_bank_num is
        zero.
        (add_timer): Move allocation, scheduling and connection of timer to
        allocate_timer and configure_timer.
        (allocate_timer, configure_timer): New methods of MepBoardCfg.
        (configure_dmac): Use timer_channel_bitw.
        (set_opt_timer_channel_bitw): New method of MepBoardCfg.
        * mainDynamic.cxx (usage): Document --timer-channel-bitw.
        (option_num): Add opt_timer_channel_bitw.
        (long_options): Add timer-channel-bitw.
        (main): Handle opt_timer_channel_bitw.
        * commonCfg.h (set_opt_timer_channel_bitw): New prototype.

        2003-01-28  Dave Brolley  <[hidden email]>

        * mepCfg.cxx (add_timer): Connect the timer's nmi pin to the cpu's
        nmi pin.

        2003-01-23  Dave Brolley  <[hidden email]>

        * mepCfg.cxx (MepTimerCfg): Remove 'ctrlmap' and 'cpu'. Add
        'channel-bitw'.
        Initialize 'channels' with 'channel_bitw'.
        (add_timer): Call MepTimerCfg with channel_bitw.
        (add_dmac): Connect output pins to the intc interrupt-source-N and
        above, where N is the number of timer channels.

        2003-01-13  Dave Brolley  <[hidden email]>

        * mepCfg.cxx (MepMemCfg::map_mm_int): Now takes mm_int as an
        argument.
        (MepBoardCfg::map_mm_int): New method.
        * MepCfg.h (MepBoardCfg::map_mm_int): New method.

        2002-12-10  D. Marlin  <[hidden email]>

        * baseCfg.h : Added a typedef for gprof_type.
        * commonCfg.h : Added type and interval parameters to GprofCfg class interface
        and set_gprof method prototype.
        * commonCfg.cxx (GprofCfg::GprofCfg): Added type and interval to GprofCfg class.
        Modified constructor to support data collection based on simulated cycles.
        (BoardCfg::set_gprof): Added type and interval parameters.
        * mainDynamic.cxx (usage): Added 'cycles=N' suboption to --gprof.
        (try_add_gprof): New method.
        (main): Added call to try_add_gprof.

        2002-12-09  D. Marlin  <[hidden email]>

        * mepCfg.h:  Changed imem to have two banks instead of one.
        Added dmem_bank_num configurable member.
        Changed dmem to use an array of four (dmem[4]) instead of two static
        banks (dmem0 and dmem1).
        Removed prototypes for methods to set_[icache|dcache]_[way|line_size]
        * mepCfg.cxx : Removed methods to set_[icache|dcache]_[way|line_size]
        (set_imem_size): Changed to initialize two banks.
        (set_dmem_bank_num): Added new method to set the number of dmem banks.
        (set_dmem_size):  Changed to initialize two to four banks, depending
        on the number of banks configured (dmem_bank_num).
        (MepBoardCfg::write_config):  Changed to emit the bank specifiers for two imem
        banks and two to four dmem banks.  
        Modified the way the dmem bank specifiers are determined to use a table based
        on the data in the architecture manual.
        Updated rcfg register configuration for new format.

        2002-11-29  Ben Elliston  <[hidden email]>

        * commonCfg.h (BoardCfg::final_insn_count): Declare.
        * commonCfg.cxx (BoardCfg::final_insn_count): Implement.
        * mainDynamic.cxx (usage): Document --final-insn-count.
        (Defs::final_insn_count): New option flag.
        (Defs::Defs): Initialise it.
        (enum option_num): Add opt_final_insn_count.
        (long_options): Add --final-insn-count.
        (main): Process opt_final_insn_count.

        2002-11-26  Ben Elliston  <[hidden email]>

        * mepCfg.h (MepBoardCfg::add_exit_location): Declare member.
        * mepCfg.cxx (MepBoardCfg::add_exit_location): Implement.

        2002-11-22  Dave Brolley  <[hidden email]>

        * mepCfg.cxx (add_timer): Set the cpu's num-timer-channels attribute.
        (set_opt_biu): New method of  MepBoardCfg.
        * mepCfg.h (set_opt_biu): New method of  MepBoardCfg.

        2002-11-21  Dave Brolley  <[hidden email]>

        * mepCfg.cxx (MepTimerCfg): New class.
        (MepBoardCfg): Initialize timer.
        (add_timer): New method of MepBoardCfg.
        * mepCfg.h (add_timer): New method of MepBoardCfg.
        (timer): New member of MepBoardCfg.

        2002-11-19  Dave Brolley  <[hidden email]>

        * mepCfg.cxx (add_dsp): Change first parameter name to "name" and use it
        in the name of the memory for the cbus interface.
        (add_cop): New method of MepBoardCfg.
        * mepCfg.h (add_cop): New method of MepBoardCfg.

        2002-11-19  Dave Brolley  <[hidden email]>

        * mepCfg.cxx (add_dsp): New method of MepBoardCfg.
        * mepCfg.h (add_dsp): New method of MepBoardCfg.

        2002-11-15  Dave Brolley  <[hidden email]>

        * mepCfg.cxx (MepMM_INT_Cfg): New class.
        (add_mm_int): New method of MepMemCfg.
        (map_mm_int): Ditto.
        (channels): New member of MepINTCCfg.
        (get_channels): New methos of MepINTCCfg.
        (MepBoardCfg): Call allocate_mm_int to initialize shared_mm_int.
        (need_mm_int): New method of MepBoardCfg.
        (need_icache): Pass mm_int region.
        (need_dcache): Ditto.
        (allocate_mm_int): New method of MepBoardCfg.
        (write_config): Connect MM_INT pins to the INTC.
        * mepCfg.h (MepMM_INT_Cfg): New class.
        (shared_mm_int): New member of MepMemCfg.
        (need_mm_int): New method of MepBoardCfg.
        (allocate_mm_int): New method of MepBoardCfg.

        2002-11-11  Frank Ch. Eigler  <[hidden email]>

        * baseCfg.h: Add `using namespace std' clause.

        2002-11-08  Dave Brolley  <[hidden email]>

        * mepCfg.cxx: Move MepCacheCfg to before MepMemCfg so that it can be
        used by MepMemCfg. Add markers for peripherals and peripheral-mappings.
        (add_peripheral): New method of MepMemCfg.
        (map_peripheral): New method of MepMemCfg.

        2002-10-09  Dave Brolley  <[hidden email]>

        * mepCfg.h (add_dmac): New method.
        (need_dmac): Removed.
        (set_opt_dmac): Removed.
        (dmac): Now of type AtomicCfg *.
        * mepCfg.cxx: Remove class MepDMACCfg.
        (add_dmac): New method of MepBoardCfg replaces need_dmac and MepDMACCfg.
        (set_opt_dmac): Removed.

        2002-10-02  Dave Brolley  <[hidden email]>

        * mepCfg.cxx (MepDMACCCfg): Use new control register mapping.

        2002-09-26  Dave Brolley  <[hidden email]>

        * mepCfg.h: Rename 'global' to 'global_mapper'.  Rename 'localmap'
        to local_mapper.
        (imem_dmem_base): New constant.
        (imem_dmem_size): New constant.
        (add_local_mem): Now returns MemCfg *.
        (add_hw_engine): New parameters: lbus_if, lbus_addr, lbus_size.
        (get_lmem_address): New function.
        (local_mem_map): New mapping.
        * mepCfg.cxx: Rename 'global' to 'global_mapper'.  Rename 'localmap'
        to local_mapper. Fix Diagram of memory heirarchy.
        (MepBoardCfg): Initialize local_mem_map.  Use localmem_base and
        imem_dmem_size.
        (add_local_mem): Now returns MemCfg *.  Always specify memory size.
        Pass new memory region through the caches.
        (get_lmem_address): New function.
        (add_hw_engine): New parameters: lbus_if, lbus_addr, lbus_size.
        Connect the hw_engine to the specified local memory regions.
        (need_icache): Use localmem_base and imem_dmem_size.
        (need_dcache): Ditto.

        2002-07-23  Dave Brolley  <[hidden email]>

        * mepCfg.cxx (MepBoardCfg): Call new variant of GlossCfg.
        (write_config): Connect the gloss target-memory to the dcache mapper
        if available, otherwise to the main-mapper.
        * commonCfg.h (GlossCfg): New constructor.
        * commonCfg.cxx (GlossCfg): New constructor.

        2002-07-19  Dave Brolley  <[hidden email]>

        * mepCfg.cxx (MepCacheCfg): Allocate cache of correct size. Allocate
        cache test areas of correct size.

        2002-07-16  Dave Brolley  <[hidden email]>

        * mepCfg.cxx (MepCacheCfg): Connect cache-flush-and-invalidate and
        cache-index-flush-and-invalidate pins to the appropriate cache pins.

        2002-06-13  Graydon Hoare  <[hidden email]>

        * mepCfg.h (set_intc_level): New method.
        * mepCfg.cxx (set_intc_level): Configure interrupt levels.
        (MepINTCCfg::set_level): Set "cfg-interrupt-level".

        2002-06-11  Graydon Hoare  <[hidden email]>

        * commonCfg.cxx (set_way): Add missing 'break' statement.

        2002-06-08  Ben Elliston  <[hidden email]>

        * mepCfg.cxx (mepCacheCfg::mepCacheCfg): Connect cache-flush,
        cache-invalidate, cache-index-flush, cache-index-invalidate pins
        to the data cache.

        2002-06-04  Graydon Hoare  <[hidden email]>

        * mepCfx.cxx (MepCacheCfg): Connect probe in-line with tag test
        mapper.

        2002-06-04  Graydon Hoare  <[hidden email]>

        * commonCfg.h (BoardCfg::add_memory): New method.
        * commonCfg.cxx (BoardCfg::add_memory): Call main_mapper->map.
        * mainDynamic.cxx (try_add_memory): Use BoardCfg::add_memory.
        * mepCfg.h (MepBoardCfg::add_memory): New method.
        * mepCfg.cxx (MepBoardCfg::add_memory): Also call
        {i,d}cache->pass.
        (MepGlobalMapperCfg): Rename from MepMapperCfg.

        2002-05-29  Ben Elliston  <[hidden email]>

        * commonCfg.h (CpuCfg::set_disasm_mem): New method.
        * commonCfg.cxx (CpuCfg::set_disasm_mem): Implement it.
        * mepCfg.cxx (MepBoardCfg::MepBoardCfg): Set disassembler-memory
        accessor to point to main mapper's access-port.

        2002-05-28  Graydon Hoare  <[hidden email]>

        * mepCfg.cxx (add_hw_engine): Connect to main, local memories.

        2002-05-27  Ben Elliston  <[hidden email]>

        * mepCfg.cxx (need_dcache): Specify a refill latency of 10.
        (set_dmem_size): Do not specify latencies (assume defaults of 0).
        (set_imem_size): Likewise.

        2002-05-21  Ben Elliston  <[hidden email]>

        * mepCfg.cxx (need_dcache): Enable write-allocate? attribute.
        (mepCacheCfg ctor): Add mapping for write-allocate? attribute.

        2002-05-21  Ben Elliston  <[hidden email]>

        * commonCfg.h (CacheCfg::set_refill_latency): New method.
        * commonCfg.cxx (CacheCfg::set_refill_latency): Implement it.
        * mepCfg.cxx (MepCacheCfg ctor): Invoke set_refill_latency() if a
        non-zero latency value is specified.
        (mepBoardCfg::need_icache): Specify a refill latency of 10.

        2002-05-16  Ben Elliston  <[hidden email]>

        * mepCfg.cxx (MepBoardCfg::need_icache): Set hit latency to 0.
        (MepBoardCfg::need_dcache): Likewise.

        2002-05-15  Graydon Hoare  <[hidden email]>

        * mepCfg.cxx (MepCacheCfg): Add tag-test regions.
        (MepBoardCfg): Remove un-necessary second layer from local memory;
        use .base() instead.
        * mepCfg.h (MepBoardCfg): Likewise.

        2002-05-13  Graydon Hoare  <[hidden email]>

        * mepCfg.h (MepBoardCfg): Add second layer to local memory
        hierarchy to permit DMA Controllers using 0-based addresses.
        * mepCfg.cxx (MepMemCfg): Likewise.
        (MepBoardCfg) Likewise.
        (MepBoardCfg) Add burst-event, burst-control pins during HW-Engine
        connection.

        2002-05-08  Dave Brolley  <[hidden email]>

        * mepCfg.cxx (set_cop_data_bus_width): New function.
        * mepCfg.h (set_cop_data_bus_width): New function.

        2002-04-30  Graydon Hoare  <[hidden email]>

        * mepCfg.cxx (set_opt_cp): Set cp-option? rather than uci-option?
        * mepCfg.cxx (MepBoardCfg::write_config): Shift DRBA left 12 bits
        in rcfg (csr27).

        2002-04-29  Graydon Hoare  <[hidden email]>

        * mepCfg.cxx (MepMapperCfg): New class.
        (MepMemCfg): Use Mapping objects, MepMapperCfg.
        (MepCacheCfg): Use Mapping objects.
        (MepBoardCfg): Use Mapping objects.
        (MepBoardCfg::write_config): Correct dmem_size underflow for 1kb regions.
        (MepBoardCfg::need_icache): Add "always pass" regions for local memory.
        (MepBoardCfg::need_dcache): Add "always pass" regions for local memory.
        * mepCfg.h (MepBoardCfg): Make MepMemCfg a friend of MepBoardCfg.

        2002-04-19  Graydon Hoare  <[hidden email]>

        * mepCfg.cxx (add_hw_engine): Remove support for cbus_size.
        * mepCfg.h (MepBoardCfg::add_hw_engine): remove support for
        cbus_size.

        2002-04-15  Graydon Hoare  <[hidden email]>

        * mepCfg.h (MepBoardCfg): Add board type parameter to ctor
        signature.
        (MepBoardCfg): Remove obsolete main_passthru mapper.
        * mepCfg.cxx (MepMemCfg): Add global shadow configuration block.
        (MepMemCfg::setup_memory_map): Add local shadow configuration block.

        2002-04-15  Dave Brolley  <[hidden email]>

        * mepCfg.h (add_local_mem): Add optional name parameter.
        (add_hw_engine): Add optional local_mem_list parameter.
        * mepCfg.cxx (sidmiscutil.h): #include it.
        (add_local_mem): Use the given name, if provided.
        (add_hw_engine): Relate this engine to the given local memory list.

        2002-04-09  Dave Brolley  <[hidden email]>

        * mepCfg.cxx (MepMemCfg): Remove member 'shadow'.  Update comment
        describing the memory system.  Remove mappings involving 'shadow'.  Map
        global memory directly from 'main_mapper' to 'global'.  Map all shadows
        back onto 'main_mapper'.

        2002-03-30  Graydon Hoare  <[hidden email]>

        * mainDynamic.cxx: Predicate portions on -D SIDTARGET_MEP.
        * Makefile.am: Add -D SIDTARGET_MEP to CXXFLAGS when configured
        with SIDTARGET_MEP.
        * Makefile.in: Regenerate.

        2002-03-24  Graydon Hoare  <[hidden email]>

        * mepCfg.cxx (need_icache): Transpose markers with need_dcache.
        (need_dcache): Likewise.
        (set_core_id): New function.
        (add_hw_engine): Correct bus range calculation.
        * mepCfg.h (MepBoardCfg::set_core_id): New prototype.

        2002-03-23  Graydon Hoare  <[hidden email]>

        * mepCfg.cxx (add_hw_engine): New function.
        * mepCfg.h (MepBoardCfg::add_hw_engine): New prototype.

        2002-03-23  Graydon Hoare  <[hidden email]>

        * mepCfg.cxx (need_icache): Add hooks for cache/pass settings.
        (need_dcache): Likewise.
        (add_local_mem): New function.
        * mepCfg.h (MepBoardCfg::add_local_mem): New prototype.

        2002-03-22  Graydon Hoare  <[hidden email]>

        * commonCfg.cxx (MapperCfg): Permit switching between transparent
        and basic after construction.
        * commonCfg.h (MapperCfg): Likewise.
        * mepCfg.cxx (MepMemCfg): Rearrange to handle shadows and gmap
        local definitions.
        (main_passthru): Remove, make main_mapper transparent.
        (write_config): Use absolute addresses for local map.
        (set/get_module_type): New methods.

        2002-03-21  Graydon Hoare  <[hidden email]>

        * mepCfg.cxx (MepMemCfg): Add hooks for mepcfgtool to define
        global memory map.

        2002-03-18  Graydon Hoare  <[hidden email]>

        * mepCfg.cxx (MepBoardCfg): Extensive reworking to permit
        post-construction customization from factory methods in
        mainDynamic.cxx
        * mainDynamic.cxx (try_load_file): Add.
        (try_add_memory): Modify to work in non-board cases.
        * commonCfg.cxx (loaderCfg): Make configurable after construction.
        (CpuCfg): Add static name map like MapperCfg.
        (CacheCfg): Compute comptype dynamically.
        (MemCfg): Permit size adjustment after construction.
        (BoardCfg): Remove per-board loader logic, moved to mainDynamic.cxx.
        * commonCfg.h: Reflect above changes.
        * baseCfg.cxx: Change config graph path separator from "-" to "/".

        2002-03-12  Graydon Hoare  <[hidden email]>

        * mepCfg.cxx (MepBoardCfg): Add cpu-option-customizations.

        2002-03-11  Frank Ch. Eigler  <[hidden email]>

        * commonCfg.cxx (add_mapping): Add raw string-spec argument.
        Correct other variants for new wordsz syntax.
        * mepCfg.cxx (MepCacheCfg): Take cpu parameter.  Connect to the
        FOO-cache-enable pins.  Add cached/uncached mapping banks.
        (MepBoardCfg): Reorganize cache mappings accordingly.
        * commonCfg.h: Corresponding changes.

        2002-02-27  Ben Elliston  <[hidden email]>

        * mepCfg.cxx (MepMemCfg::MepMemCfg): Set shared-mem memory
        regions' read/write latencies to {10, 1} respectively.
        (MepBoardCfg::MepBoardCfg): Set local memory latencies to {1, 1}
        and cache hit/miss latencies to {1, 3} respectively.

        * mainDynamic.cxx (usage): Condense and tidy output.

        2002-02-14  Graydon Hoare  <[hidden email]>

        * commonCfg.cxx: Various small corrections to gdb and gloss
        coexistence.
        * commonCfg.h: Likewise.
        * mainDynamic.cxx: Likewise.
        * Makefile.am: Move mepCfg.cxx into a separate block.
        * Makefile.in: Regenerate.

        2002-02-08  Graydon Hoare  <[hidden email]>

        * mepCfg.cxx: New file.
        * mepCfg.h: New file.

        2001-07-19  Ben Elliston  <[hidden email]>

        * Makefile.am (NEARBY_LIBS): Add libmepfamily.la.
        (NEARBY_DEP_LIBS): Likewise.



? sid/bsp/pregen/mep-gdb-tksm.conf
? sid/bsp/pregen/mep-gdb.conf
? sid/bsp/pregen/mep-gloss.conf
? sid/bsp/pregen/mep-little-gdb-tksm.conf
? sid/bsp/pregen/mep-little-gdb.conf
? sid/component/cache/mep-cache.cxx
? sid/component/cache/mep-cache.h
? sid/component/cgen-cpu/mep
? sid/component/families/mep
? sid/component/memory/mep-cache-tag.cxx
? sid/component/memory/mep-cache-tag.h
? sid/component/testsuite/sidcomp.cgen-cpu.mep
? sid/component/testsuite/sidcomp.families.mep
? sid/main/dynamic/mepCfg.cxx
? sid/main/dynamic/mepCfg.h
Index: sid/bsp/configrun-sid.in
===================================================================
RCS file: /cvs/src/src/sid/bsp/configrun-sid.in,v
retrieving revision 1.39
diff -c -p -r1.39 configrun-sid.in
*** sid/bsp/configrun-sid.in 18 Oct 2006 18:30:52 -0000 1.39
--- sid/bsp/configrun-sid.in 17 Jan 2007 17:37:09 -0000
*************** require 5.004;
*** 17,22 ****
--- 17,23 ----
  "x86" => "hw-cpu-x86",
          # INSERT NEW ENTRIES HERE
  "m32r" => "hw-cpu-m32r/d",
+ "mep" => "hw-cpu-mep",
  "mt" => "hw-cpu-mt",
  "sh5" => "hw-cpu-sh5",
  "xstormy16" => "hw-cpu-xstormy16",
*************** require 5.004;
*** 36,41 ****
--- 37,43 ----
    "x86" => "sw-gloss-generic/libgloss",
            # INSERT NEW ENTRIES HERE
    "m32r" => "sw-gloss-m32r/libgloss",
+   "mep" => "sw-gloss-generic/libgloss",
    "mt" => "sw-gloss-generic/libgloss",
    "sh5" => "sw-gloss-generic/libgloss",
    "xstormy16" => "sw-gloss-generic/libgloss",
*************** require 5.004;
*** 47,52 ****
--- 49,55 ----
    "x86" => "0x00000,0x500000",
            # INSERT NEW ENTRIES HERE
    "m32r" => "0x00000000,0x00800000",
+   "mep" => "0x00000000,0x00200000:0x00300000,0x10000",
    "mt" => "0x00000000,0x00800000",
    "sh5" => "0x00000000,0x00800000", # check this
    "xstormy16" => "0x00000000,0x00800000",
*************** connect-pin main starting -> init-sequen
*** 450,455 ****
--- 453,459 ----
  connect-pin main stopping -> deinit-sequence input
  connect-pin init-sequence output-0 -> hw-reset-net input
  connect-pin hw-reset-net output-0 -> cpu reset!
+ set target-sched 0-name \"CPU stepping\"
  connect-pin target-sched 0-event -> cpu step!
  connect-pin target-sched 0-control <- cpu step-cycles
  connect-pin target-sched time-query <- cpu time-query
*************** connect-pin cpu gprof-pc-hi -> gprof pc-
*** 510,517 ****
  connect-pin cpu cg-caller -> gprof cg-caller
  connect-pin cpu cg-callee -> gprof cg-callee
  relate gprof target-component cpu
- set gprof bucket-size 4 # bytes per bucket
  ";
    }
 
  if ($opt_trace_core || $opt_trace_core_visual)
--- 514,526 ----
  connect-pin cpu cg-caller -> gprof cg-caller
  connect-pin cpu cg-callee -> gprof cg-callee
  relate gprof target-component cpu
  ";
+     if ($opt_cpu eq "mep") {
+       $second_section .= "set gprof bucket-size 2\n";
+     }
+     else {
+       $second_section .= "set gprof bucket-size 4\n";
+     }
    }
 
  if ($opt_trace_core || $opt_trace_core_visual)
*************** set uart2 sio-framing? 0
*** 713,718 ****
--- 722,970 ----
      configure_uart1_uart2();
 
    }
+ elsif ($opt_cpu eq "mep" && ($opt_board ne "gloss-stdio"))
+   {
+     # Fallback defaults for incomplete configurations
+     $mepcfg_index = -1; # flag to detect match
+     $mepcfg_core_id = 0;
+     $mepcfg_core_rev = 1;
+     $mepcfg_imem_size = 0;
+     $mepcfg_dmem_size = 0;
+     $mepcfg_icache_size = 0;
+     $mepcfg_icache_way = 1;
+     $mepcfg_icache_line_size = 32;
+     $mepcfg_dcache_size = 0;
+     $mepcfg_dcache_way = 1;
+     $mepcfg_dcache_line_size = 32;
+     $mepcfg_dsu = 0;
+     $mepcfg_intc_channel_bitw = 32;
+     $mepcfg_intc = 0;
+     $mepcfg_dmac = 0;
+     $mepcfg_cop_vliw_bitw = 0;
+     $mepcfg_opt_abs = 0;
+     $mepcfg_opt_ave = 0;
+     $mepcfg_opt_bit = 0;
+     $mepcfg_opt_clip = 0;
+     $mepcfg_opt_cp = 0;
+     $mepcfg_opt_div = 0;
+     $mepcfg_opt_ldz = 0;
+     $mepcfg_opt_min = 0;
+     $mepcfg_opt_mul = 0;
+     $mepcfg_opt_sat = 0;
+     $mepcfg_dsp = 0;
+     $mepcfg_uci = 0;
+     @mep_boards = ();
+
+     $mepcfg_index = 1;
+     $mepcfg_imem_size = 16;
+     $mepcfg_dmem_size = 32;
+     $mepcfg_icache_size = 16;
+     $mepcfg_icache_way = 1;
+     $mepcfg_icache_line_size = 32;
+     $mepcfg_dcache_size = 16;
+     $mepcfg_dcache_way = 1;
+     $mepcfg_dcache_line_size = 32;
+     $mepcfg_intc_channel_bitw = 16;
+     $mepcfg_opt_cp = 1;
+     $mepcfg_cop_vliw_bitw = 64;
+     $mepcfg_opt_abs = 1;
+     $mepcfg_opt_ave = 1;
+     $mepcfg_opt_bit = 1;
+     $mepcfg_opt_clp = 1;
+     $mepcfg_opt_div = 1;
+     $mepcfg_opt_ldz = 1;
+     $mepcfg_opt_min = 1;
+     $mepcfg_opt_mul = 1;
+     $mepcfg_opt_sat = 1;
+     $mepcfg_endian = "big";
+     $mepcfg_intc = 1;
+     $mepcfg_dsu = 1;
+     $mepcfg_dmac = 1;
+     $mepcfg_dsp = 1;
+     $mepcfg_uci = 1;
+
+     # Eww, ugly hack to change "hw-cpu-mep" in $first_section to
+     # "hw-cpu-mep-extNNN" for NNN=$mepcfg_index
+     $first_section =~ s|new hw-cpu-mep|new hw-cpu-mep-ext$mepcfg_index|;
+
+     # cpu attributes
+     if ($mepcfg_endian eq "big") { $opt_EB = 1; }
+     elsif ($mepcfg_endian eq "little") { $opt_EL = 1; }
+
+     $csr17 = (($mepcfg_core_id << 16) | (1 << 8) | $mepcfg_core_rev);
+     $second_section .= "set cpu csr17 $csr17\n";
+
+     $second_section .= "set cpu abs-option? " . ($mepcfg_opt_abs) . "\n";
+     $second_section .= "set cpu ave-option? " . ($mepcfg_opt_ave) . "\n";
+     $second_section .= "set cpu bit-option? " . ($mepcfg_opt_bit) . "\n";
+     $second_section .= "set cpu clip-option? " . ($mepcfg_opt_clip) . "\n";
+     $second_section .= "set cpu cp-option? " .  ($mepcfg_opt_cp) . "\n";
+     $second_section .= "set cpu div-option? " . ($mepcfg_opt_div) . "\n";
+     $second_section .= "set cpu ldz-option? " . ($mepcfg_opt_ldz) . "\n";
+     $second_section .= "set cpu minmax-option? " . ($mepcfg_opt_min) . "\n";
+     $second_section .= "set cpu mul-option? " . ($mepcfg_opt_mul) . "\n";
+     $second_section .= "set cpu sat-option? " . ($mepcfg_opt_sat) . "\n";
+
+     $second_section .= "set cpu debug-option? " . ($mepcfg_dsu) . "\n";
+     $second_section .= "set cpu dsp-option? " . ($mepcfg_dsp) . "\n";
+     $second_section .= "set cpu uci-option? " . ($mepcfg_uci) . "\n";
+
+     $second_section .= "set cpu vliw32-option? " . ($mepcfg_cop_vliw_bits == 32 ? 1 : 0) . "\n";
+     $second_section .= "set cpu vliw64-option? " . ($mepcfg_cop_vliw_bits == 64 ? 1 : 0) . "\n";
+
+     # dmem/imem calculations; see mep RCFG definition and memory layout chapter
+     $mep_imem_base = ($mepcfg_imem_size == 0 ? 0 : 0x00200000);
+     $mep_imem_size = 1024 * $mepcfg_imem_size;
+     $mep_dmem_base = (($mepcfg_dmem_size == 0) ? 0 :
+      ($mepcfg_imem_size == 0) ? 0x00200000 :
+      ($mepcfg_dmem_size > 16) ? 0x00208000 :
+      ($mepcfg_imem_size >= 12) ? 0x00204000 :
+      ($mepcfg_dmem_size <= 8) ? 0x00202000 :
+      ($mepcfg_dmem_size <= 16) ? 0x00204000 :
+      0xdeadbeef); # can't happen
+
+     $mep_dmem_bank0_base = $mep_dmem_base;
+     $mep_dmem_bank1_base = $mep_dmem_base + 1024 * ($mepcfg_dmem_size == 6 ? 4 :
+    $mepcfg_dmem_size == 12 ? 8 :
+    $mepcfg_dmem_size == 24 ? 16 :
+    $mepcfg_dmem_size / 2);
+     $mep_dmem_bank0_size = 1024 * $mepcfg_dmem_size / 2;
+     $mep_dmem_bank1_size = 1024 * $mepcfg_dmem_size / 2;
+
+     # These are complex bitfields:
+     # LCFG: local memory configuration
+     $csr27 = (0x01000100 | # fixed bits
+      ($mepcfg_imem_size << 16) | # IRSZ
+      ($mepcfg_dmem_size << 0) | # DRSZ
+      (($mep_dmem_base >> 12) & 0xf)); # DRBA
+     $second_section .= "set cpu csr27 $csr27\n";
+
+     # CCFG: cache memory configuration
+     $csr28 = (0x00000000 | # no fixed bits
+      ($mepcfg_icache_size << 16) | # ICSZ
+      ($mepcfg_dcache_size << 0)); # DCSZ
+     $second_section .= "set cpu csr28 $csr28\n";
+
+     # control bus layout
+     $zeroth_section .= "load libmepfamily.la mepfamily_component_library\n";
+     $first_section .= "# control space
+ new hw-mapper-basic cpu-control-space
+ set cpu-control-space latency 1
+ new hw-mapper-basic cpu-local-space
+ " .
+   ($mepcfg_dsu ? "new hw-debug-mep cpu-dsu\n" : "") .
+   ($mepcfg_dmac ? "new hw-dma-mep cpu-dmac\n" : "") .
+   ($mepcfg_intc ? "new hw-interrupt-mep-${mepcfg_intc_channel_bitw} cpu-intc\n" : "");
+
+     $second_section .= "# configuration / connection of control space peripherals
+ connect-bus cpu control-space cpu-control-space access-port
+ " .
+   ($mepcfg_dsu ? "connect-bus cpu-control-space dsu[4*0x800-0x802] cpu-dsu status-regs
+ connect-bus cpu-control-space dsu[4*0x900-0x902] cpu-dsu insn-regs
+ connect-bus cpu-control-space dsu[4*0xA00-0xA05] cpu-dsu data-regs\n" : "") .
+   ($mepcfg_dmac ? "connect-bus cpu-control-space dmac[4*0x1000-0x1009] cpu-dmac control-regs-low
+ connect-bus cpu-control-space dmac[4*0x1FFF-0x1FFF] cpu-dmac control-regs-high\n" : "") .
+   ($mepcfg_intc ? "connect-bus cpu-control-space intc[4*0x0-0x7] cpu-intc registers\n" : "");
+
+     $third_section .=
+       ($mepcfg_dmac ? "# mep dmac connection
+ connect-bus cpu-dmac local-memory cpu-local-space access-port
+ connect-bus cpu-dmac main-memory cpu-mapper access-port
+ set target-sched 2-name \"DMA controller burst events\"
+ connect-pin target-sched 2-event -> cpu-dmac burst-event
+ connect-pin target-sched 2-control <- cpu-dmac burst-control
+ " : "") .
+   ($mepcfg_intc ? "# mep intc connection
+ connect-pin cpu-intc interrupt -> cpu interrupt
+ " : "");
+
+     # mep instruction fetch buffer: 8 bytes
+     $first_section .= "# instruction fetch buffer
+ new hw-cache-buffer-8 cpu-insn-buffer
+ set cpu-insn-buffer write-through? true
+ connect-pin cache-flush-net output-0 -> cpu-insn-buffer flush-all
+ connect-pin init-sequence output-1 -> cpu-insn-buffer invalidate-all
+ ";
+
+     # "default" memory layout
+     push @opt_memory_region, "0x00000000,0x200,latency=5";    # vec
+     push @opt_memory_region, "0x00010000,0x60000,latency=5";  # romdata.m
+     push @opt_memory_region, "0x00080000,0x80000,latency=5";  # code.m
+     push @opt_memory_region, "0x00100000,0x80000,latency=5";  # data.m
+     # push @opt_memory_region, "0x00300000,0x10000";  # icache data testing area
+     # push @opt_memory_region, "0x00310000,0x10000";  # icache tag testing area
+     # push @opt_memory_region, "0x00320000,0x10000";  # dcache data testing area
+     # push @opt_memory_region, "0x00330000,0x10000";  # dcache tag testing area
+     push @opt_memory_region, "0x01000000,0x8000,latency=5";   # romdata.s
+     push @opt_memory_region, "0x01008000,0x8000,latency=5";   # data.s
+     push @opt_memory_region, "0x02000000,0x100000,latency=5"; # data.l
+     push @opt_memory_region, "0x02200000,0x100000,latency=5"; # romdata.l
+     push @opt_memory_region, "0x02300000,0x100000,latency=5"; # code.l
+     push @opt_memory_region, "0x03000000,0x100000,latency=5"; # stack
+     push @opt_memory_region, "0x04000000,0x100000,latency=5"; # heap
+
+     $third_section .= "connect-bus cpu-mapper local:[0x00200000,0x00210000] cpu-local-space access-port\n";
+
+     push @opt_memory_region, ($mep_imem_base - 0x00200000) . "," . $mep_imem_size . ",bus=cpu-local-space,latency=2" if $mep_imem_size;
+     push @opt_memory_region, ($mep_dmem_bank0_base - 0x00200000) . "," . $mep_dmem_bank0_size . ",bus=cpu-local-space,latency=2" if $mep_dmem_bank0_size;
+     push @opt_memory_region, ($mep_dmem_bank1_base - 0x00200000) . "," . $mep_dmem_bank1_size . ",bus=cpu-local-space,latency=2" if $mep_dmem_bank1_size;
+
+     if ($m