Sha256: 9213142158538bfe7e40e0ee4a42752b43f6ecaeb4ae8c1016f074f16553a4a5

Contents?: true

Size: 1.46 KB

Versions: 11

Compression:

Stored size: 1.46 KB

Contents

require "HDLRuby/hruby_high"



module HDLRuby::High

##
# Library for describing adding the fullname method to HDLRuby::High objects.
#
########################################################################

    class SystemT

        ## Returns the name of the signal with its hierarchy.
        def fullname
            @fullname ||= (self.parent ? self.parent.fullname + ":" : "") + 
                self.name.to_s
            return @fullname
        end
    end


    ##
    # Module for extending named classes with fullname (other than SystemT).
    module WithFullname

        ## Returns the name of the signal with its hierarchy.
        def fullname
            @fullname ||= self.parent.fullname + ":" + self.name.to_s
            return @fullname
        end

    end

    class Scope
        include WithFullname
    end


    class Behavior

        ## Returns the name of the signal with its hierarchy.
        def fullname
            return self.parent.fullname
        end
    end


    class TimeBehavior

        ## Returns the name of the signal with its hierarchy.
        def fullname
            return self.parent.fullname
        end
    end


    class SignalI
        include WithFullname
    end

    class SignalC
        include WithFullname
    end

    class SystemI
        include WithFullname
    end

    class Code
        # TODO
    end

    class Block
        include WithFullname
    end

    class TimeBlock
        include WithFullname
    end

end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
HDLRuby-2.11.12 lib/HDLRuby/hruby_high_fullname.rb
HDLRuby-2.11.11 lib/HDLRuby/hruby_high_fullname.rb
HDLRuby-2.11.10 lib/HDLRuby/hruby_high_fullname.rb
HDLRuby-2.11.9 lib/HDLRuby/hruby_high_fullname.rb
HDLRuby-2.11.8 lib/HDLRuby/hruby_high_fullname.rb
HDLRuby-2.11.7 lib/HDLRuby/hruby_high_fullname.rb
HDLRuby-2.11.5 lib/HDLRuby/hruby_high_fullname.rb
HDLRuby-2.11.4 lib/HDLRuby/hruby_high_fullname.rb
HDLRuby-2.11.3 lib/HDLRuby/hruby_high_fullname.rb
HDLRuby-2.11.2 lib/HDLRuby/hruby_high_fullname.rb
HDLRuby-2.11.0 lib/HDLRuby/hruby_high_fullname.rb