Class: ClassHDL::ClassEdge

Inherits:
Object
  • Object
show all
Defined in:
lib/tdl/class_hdl/hdl_always_ff.rb

Direct Known Subclasses

ClassNegedge, ClassPosedge

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(sdlm) ⇒ ClassEdge

Returns a new instance of ClassEdge.



5
6
7
# File 'lib/tdl/class_hdl/hdl_always_ff.rb', line 5

def initialize(sdlm)
    @sdlm = sdlm
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args, &block) ⇒ Object



13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/tdl/class_hdl/hdl_always_ff.rb', line 13

def method_missing(method,*args,&block)
    # unless @sdlm.respond_to? method
    #     raise TdlError.new("edge si")

    if @sdlm.respond_to? method
        @origin = @sdlm.public_send(method)
    else 
        @origin ||= method
    end

    return self
end

Instance Attribute Details

#originObject

Returns the value of attribute origin.



4
5
6
# File 'lib/tdl/class_hdl/hdl_always_ff.rb', line 4

def origin
  @origin
end

Instance Method Details

#to_sObject



9
10
11
# File 'lib/tdl/class_hdl/hdl_always_ff.rb', line 9

def to_s 
    @origin.to_s 
end