Class: StringBandItegration

Inherits:
String
  • Object
show all
Defined in:
lib/tdl/exlib/itegration.rb

Constant Summary

Constants included from ClassHDL::AssignDefOpertor

ClassHDL::AssignDefOpertor::OP_SYMBOLS

Instance Attribute Summary collapse

Class Method Summary collapse

Methods inherited from String

#high_signal, #low_signal, #snoop, #to_inp, #to_nq

Methods included from ClassHDL::AssignDefOpertor

curr_assign_block, curr_assign_block=, curr_assign_block_stack, curr_opertor_stack, included, init_op_methods, use_new_yield_opertors, use_old_cond_opertors, with_new_assign_block, with_new_opertor, with_normal_opertor, with_rollback_opertors

Methods included from CtrlLogic

#broaden_and_cross_clk, #cross_clock, #latency

Instance Attribute Details

#itgtObject

Returns the value of attribute itgt.



2
3
4
# File 'lib/tdl/exlib/itegration.rb', line 2

def itgt
  @itgt
end

#keyObject

Returns the value of attribute key.



2
3
4
# File 'lib/tdl/exlib/itegration.rb', line 2

def key
  @key
end

#origin_strObject

Returns the value of attribute origin_str.



2
3
4
# File 'lib/tdl/exlib/itegration.rb', line 2

def origin_str
  @origin_str
end

Class Method Details

.add_method_to_itgt(stringbanditegration, obj) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/tdl/exlib/itegration.rb', line 4

def self.add_method_to_itgt(stringbanditegration,obj)
    unless stringbanditegration.is_a? StringBandItegration
        return obj
    end
    stringbanditegration.itgt.check_same_method(stringbanditegration.origin_str)
    stringbanditegration.itgt.check_same_method(stringbanditegration.key)

    stringbanditegration.itgt.define_singleton_method(stringbanditegration.origin_str) do
        obj
    end

    if stringbanditegration.origin_str.to_s != stringbanditegration.key.to_s
        stringbanditegration.itgt.define_singleton_method(stringbanditegration.key) do
            obj
        end
    end
    obj
end