Class: CompositeCelltypeJoin
- Inherits:
-
BDNode
show all
- Defined in:
- lib/tecsgen/core/componentobj.rb
Overview
CLASS: CompositeCelltype 用の Join REM: CompositeCelltype が export するもの
Instance Method Summary
collapse
Methods inherited from BDNode
#get_owner, #set_owner
Methods inherited from Node
#cdl_error, #cdl_error2, #cdl_error3, #cdl_info, #cdl_info2, #cdl_warning, #cdl_warning2, #get_locale, #locale_str, #set_locale
Constructor Details
#initialize(export_name, internal_cell_name, internal_cell_elem_name, cell, port_decl) ⇒ CompositeCelltypeJoin
6413
6414
6415
6416
6417
6418
6419
6420
|
# File 'lib/tecsgen/core/componentobj.rb', line 6413
def initialize(export_name, internal_cell_name, internal_cell_elem_name, cell, port_decl)
super()
@export_name = export_name
@internal_cell_name = internal_cell_name
@internal_cell_elem_name = internal_cell_elem_name
@cell = cell
@port_decl = port_decl
end
|
Instance Method Details
#check_dup_init ⇒ Object
6450
6451
6452
6453
6454
6455
6456
|
# File 'lib/tecsgen/core/componentobj.rb', line 6450
def check_dup_init
return if get_port_type != :CALL
if @cell.get_join_list.get_item @internal_cell_elem_name
cdl_error("S1131 \'$1.$2\' has duplicate initializer", @internal_cell_name, @internal_cell_elem_name)
end
end
|
#get_allocator_instance ⇒ Object
CompositeCelltypeJoin#get_allocator_instance
6486
6487
6488
6489
6490
6491
6492
6493
6494
|
# File 'lib/tecsgen/core/componentobj.rb', line 6486
def get_allocator_instance
if @port_decl.instance_of? Port
return @port_decl.get_allocator_instance
elsif @port_decl
raise "CompositeCelltypeJoin#get_allocator_instance: not port"
else
return nil
end
end
|
#get_array_size ⇒ Object
CompositeCelltypeJoin# 配列サイズを得る
- RETURN
-
nil: not array, “[]”: 大きさ指定なし, Integer: 大きさ指定あり
6533
6534
6535
|
# File 'lib/tecsgen/core/componentobj.rb', line 6533
def get_array_size
@port_decl.get_array_size
end
|
6466
6467
6468
|
# File 'lib/tecsgen/core/componentobj.rb', line 6466
def get_cell
@cell
end
|
#get_cell_elem_name ⇒ Object
6470
6471
6472
|
# File 'lib/tecsgen/core/componentobj.rb', line 6470
def get_cell_elem_name
@internal_cell_elem_name
end
|
#get_cell_name ⇒ Object
6462
6463
6464
|
# File 'lib/tecsgen/core/componentobj.rb', line 6462
def get_cell_name
@internal_cell_name
end
|
#get_choice_list ⇒ Object
CompositeCelltypeJoin# get_choice_list
6558
6559
6560
6561
6562
|
# File 'lib/tecsgen/core/componentobj.rb', line 6558
def get_choice_list
if @port_decl.instance_of? Decl
@port_decl.get_choice_list
end
end
|
#get_initializer ⇒ Object
CompositeCelltypeJoin# get_initializer
6519
6520
6521
6522
6523
|
# File 'lib/tecsgen/core/componentobj.rb', line 6519
def get_initializer
if @port_decl.instance_of? Decl
@port_decl.get_initializer
end
end
|
6458
6459
6460
|
# File 'lib/tecsgen/core/componentobj.rb', line 6458
def get_name
@export_name
end
|
#get_port_decl ⇒ Object
6481
6482
6483
|
# File 'lib/tecsgen/core/componentobj.rb', line 6481
def get_port_decl
@port_decl
end
|
#get_port_type ⇒ Object
6475
6476
6477
6478
6479
|
# File 'lib/tecsgen/core/componentobj.rb', line 6475
def get_port_type
if @port_decl
@port_decl.get_port_type
end
end
|
#get_signature ⇒ Object
CompositeCelltypeJoin# signature を得る
6539
6540
6541
|
# File 'lib/tecsgen/core/componentobj.rb', line 6539
def get_signature
@port_decl.get_signature
end
|
#get_size_is ⇒ Object
6525
6526
6527
6528
6529
|
# File 'lib/tecsgen/core/componentobj.rb', line 6525
def get_size_is
if @port_decl.instance_of? Decl
@port_decl.get_size_is
end
end
|
CompositeCelltypeJoin# get_type
6544
6545
6546
6547
6548
|
# File 'lib/tecsgen/core/componentobj.rb', line 6544
def get_type
if @port_decl.instance_of? Decl
@port_decl.get_type
end
end
|
#is_allocator_port? ⇒ Boolean
6504
6505
6506
6507
6508
|
# File 'lib/tecsgen/core/componentobj.rb', line 6504
def is_allocator_port?
if @port_decl
@port_decl.is_allocator_port?
end
end
|
#is_optional? ⇒ Boolean
6511
6512
6513
6514
6515
|
# File 'lib/tecsgen/core/componentobj.rb', line 6511
def is_optional?
if @port_decl
@port_decl.is_optional?
end
end
|
#is_require? ⇒ Boolean
6497
6498
6499
6500
6501
|
# File 'lib/tecsgen/core/componentobj.rb', line 6497
def is_require?
if @port_decl
@port_decl.is_require?
end
end
|
#match?(cell, port_decl = nil) ⇒ Boolean
CompositeCelltypeJoin# CompositeCelltypeJoin の対象セルか?
- cell
-
Cell 対象かどうかチェックするセル
CompositeCelltypeJoin と cell の名前が一致するかチェックする
port_decl が指定された場合は、現状使われていない
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
|
# File 'lib/tecsgen/core/componentobj.rb', line 6427
def match?(cell, port_decl = nil)
if port_decl
dbgPrint("match?")
dbgPrintf(" @cell: %-20s %08x\n", @cell.get_name, @cell.object_id)
dbgPrintf(" @port_decl: %-20s %08x\n", @port_decl.get_name, @port_decl.object_id)
dbgPrintf(" cell: %-20s %08x\n", cell.get_name, cell.object_id)
dbgPrintf(" port_decl: %-20s %08x\n", port_decl.get_name, port_decl.object_id)
dbgPrint(" cell_name: #{cell.get_name.class}=#{cell.get_name} cell_elem_name: #{port_decl.get_name.class}=#{port_decl.get_name}\n")
dbgPrint(" @cell_name: #{@cell.get_name.class}=#{@cell.get_name} cell_elem_name: #{@port_decl.get_name.class}=#{@port_decl.get_name}\n")
end
if (@cell.get_name == cell.get_name) && (port_decl.nil? || @port_decl.get_name == port_decl.get_name)
true
else
false
end
end
|
#show_tree(indent) ⇒ Object
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
|
# File 'lib/tecsgen/core/componentobj.rb', line 6564
def show_tree(indent)
indent.times { print " " }
puts "CompositeCelltypeJoin: export_name: #{@export_name} #{self}"
(indent + 1).times { print " " }
puts "internal_cell_name: #{@internal_cell_name}"
(indent + 1).times { print " " }
puts "internal_cell_elem_name: #{@internal_cell_elem_name}"
if @port_decl
@port_decl.show_tree(indent + 1)
end
end
|