- Timestamp:
- Jul 3, 2020, 7:19:17 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2HandlerPlugin.rb
r321 r429 4 4 # Generator for TOPPERS Embedded Component System 5 5 # 6 # Copyright (C) 2008-201 4by TOPPERS Project6 # Copyright (C) 2008-2018 by TOPPERS Project 7 7 #-- 8 8 # 上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ … … 35 35 # の責任を負わない. 36 36 # 37 # $Id$ 37 38 #++ 38 39 39 40 #require "HRP2KernelObjectPlugin" 40 41 require_tecsgen_lib "HRP2KernelObjectPlugin.rb" 41 42 42 43 43 #== celltype プラグインの共通の親クラス … … 51 51 # tab : 52 52 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 57 59 # CRE_XXXの生成 58 60 domainOption = cell.get_region.get_domain_root.get_domain_type.get_option … … 63 65 elsif @plugin_arg_str == "ALARM" 64 66 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 }); 66 68 EOT 67 69 elsif @plugin_arg_str == "CYCLIC" 68 70 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]} }); 72 EOT 73 elsif @plugin_arg_str == "CONFIG_INT" 74 file.print <<EOT 75 #{tab}CFG_INT( #{val[:interruptNumber]}, { #{val[:attribute]}, #{val[:interruptPriority]} }); 76 EOT 77 elsif @plugin_arg_str == "ISR" 78 file.print <<EOT 79 #{tab}ATT_ISR({ #{val[:attribute]}, #{cell_CBP}, #{val[:interruptNumber]}, tISR_start, #{val[:priority]} }); 80 EOT 81 elsif @plugin_arg_str == "INIT_ROUTINE" 82 file.print <<EOT 83 #{tab}ATT_INI({ #{val[:attribute]}, #{cell_CBP}, tInitializeRoutine_start }); 84 EOT 85 elsif @plugin_arg_str == "TERM_ROUTINE" 86 file.print <<EOT 87 #{tab}ATT_TER({ #{val[:attribute]}, #{cell_CBP}, tTerminateRoutine_start }); 70 88 EOT 71 89 else … … 79 97 elsif @plugin_arg_str == "CYCLIC" 80 98 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 81 107 else 82 108 raise "#{@plugin_arg_str} is unknown option"
Note:
See TracChangeset
for help on using the changeset viewer.