Ignore:
Timestamp:
Jul 3, 2020, 7:19:17 PM (4 years ago)
Author:
coas-nagasima
Message:

ASP3, TINET, mbed を更新

File:
1 edited

Legend:

Unmodified
Added
Removed
  • EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2HandlerPlugin.rb

    r321 r429  
    44#      Generator for TOPPERS Embedded Component System
    55
    6 #   Copyright (C) 2008-2014 by TOPPERS Project
     6#   Copyright (C) 2008-2018 by TOPPERS Project
    77#--
    88#   上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ
     
    3535#   の責任を負わない.
    3636
     37#   $Id$
    3738#++
    3839
    3940#require "HRP2KernelObjectPlugin"
    4041require_tecsgen_lib "HRP2KernelObjectPlugin.rb"
    41 
    4242
    4343#== celltype プラグインの共通の親クラス
     
    5151    # tab  :
    5252    def print_cfg_cre(file, cell, val, tab)
    53         val[:id] = val[:id].gsub( /(^|[^\$])\$id\$/, "\\1#{@celltype.get_name.to_s}_#{cell.get_name.to_s}" )
    54         # $cbp$の代わり
    55         index = cell.get_id - @celltype.get_id_base
    56         cell_CB_name = "#{@celltype.get_global_name}_CB_tab[#{index}]"
     53        if !val[:id].nil?
     54            val[:id] = val[:id].gsub( /(^|[^\$])\$id\$/, "\\1#{@celltype.get_name.to_s}_#{cell.get_name.to_s}" )
     55        end
     56        # $cbp$  #983
     57        name_array = @celltype.get_name_array cell
     58        cell_CBP = name_array[8]    # CBP
    5759        # CRE_XXXの生成
    5860        domainOption = cell.get_region.get_domain_root.get_domain_type.get_option
     
    6365        elsif @plugin_arg_str == "ALARM"
    6466            file.print <<EOT
    65 #{tab}CRE_ALM(#{val[:id]}, { #{val[:attribute]}, &#{cell_CB_name}, tAlarmHandler_start });
     67#{tab}CRE_ALM(#{val[:id]}, { #{val[:attribute]}, #{cell_CBP}, tAlarmHandler_start });
    6668EOT
    6769        elsif @plugin_arg_str == "CYCLIC"
    6870            file.print <<EOT
    69 #{tab}CRE_CYC(#{val[:id]}, { #{val[:attribute]}, &#{cell_CB_name}, tCyclicHandler_start, #{val[:cyclicTime]}, #{val[:cyclicPhase]} });
     71#{tab}CRE_CYC(#{val[:id]}, { #{val[:attribute]}, #{cell_CBP}, tCyclicHandler_start, #{val[:cyclicTime]}, #{val[:cyclicPhase]} });
     72EOT
     73        elsif @plugin_arg_str == "CONFIG_INT"
     74            file.print <<EOT
     75#{tab}CFG_INT( #{val[:interruptNumber]}, { #{val[:attribute]}, #{val[:interruptPriority]} });
     76EOT
     77        elsif @plugin_arg_str == "ISR"
     78            file.print <<EOT
     79#{tab}ATT_ISR({ #{val[:attribute]}, #{cell_CBP}, #{val[:interruptNumber]}, tISR_start, #{val[:priority]} });
     80EOT
     81        elsif @plugin_arg_str == "INIT_ROUTINE"
     82            file.print <<EOT
     83#{tab}ATT_INI({ #{val[:attribute]}, #{cell_CBP}, tInitializeRoutine_start });
     84EOT
     85        elsif @plugin_arg_str == "TERM_ROUTINE"
     86            file.print <<EOT
     87#{tab}ATT_TER({ #{val[:attribute]}, #{cell_CBP}, tTerminateRoutine_start });
    7088EOT
    7189        else
     
    7997        elsif @plugin_arg_str == "CYCLIC"
    8098            file.puts "SAC_CYC(#{val[:id]}, { #{acv[0]}, #{acv[1]}, #{acv[2]}, #{acv[3]} });"
     99        elsif @plugin_arg_str == "CONFIG_INT"
     100            # nothing to do
     101        elsif @plugin_arg_str == "ISR"
     102            # nothing to do
     103        elsif @plugin_arg_str == "INIT_ROUTINE"
     104            # nothing to do
     105        elsif @plugin_arg_str == "TERM_ROUTINE"
     106            # nothing to do
    81107        else
    82108            raise "#{@plugin_arg_str} is unknown option"
Note: See TracChangeset for help on using the changeset viewer.