Class: VCD::Variable

Inherits:
Object
  • Object
show all
Defined in:
lib/libfst/vcd.rb

Overview

A Variable corresponds to a signal in the hierarchy of the design. It points to a Trace. Different variables can point to the same Trace : for example the clock signals from different modules are actualy the same physical signal.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#idString (readonly)

Returns:

  • (String)


80
81
82
# File 'lib/libfst/vcd.rb', line 80

def id
  @id
end

#nameString (readonly)

Returns:

  • (String)


77
78
79
# File 'lib/libfst/vcd.rb', line 77

def name
  @name
end

#parentScope (readonly)

Returns:



81
82
83
# File 'lib/libfst/vcd.rb', line 81

def parent
  @parent
end

#traceTrace (readonly)

Returns:



82
83
84
# File 'lib/libfst/vcd.rb', line 82

def trace
  @trace
end

#typeSymbol (readonly)

Returns event, integer, parameter, real, realtime, reg, supply0, supply1, time, tri, triand, trior, trireg, tri0, tri1, wand, wire or wor.

Returns:

  • (Symbol)

    event, integer, parameter, real, realtime, reg, supply0, supply1, time, tri, triand, trior, trireg, tri0, tri1, wand, wire or wor



78
79
80
# File 'lib/libfst/vcd.rb', line 78

def type
  @type
end

#widthInteger (readonly)

Returns:

  • (Integer)


79
80
81
# File 'lib/libfst/vcd.rb', line 79

def width
  @width
end

Instance Method Details

#pathString

Returns:

  • (String)


99
100
101
# File 'lib/libfst/vcd.rb', line 99

def path
  "#{@parent.path}#{@name}"
end

#to_sString

Returns:

  • (String)


94
95
96
# File 'lib/libfst/vcd.rb', line 94

def to_s
  "<#{self.class} @name=#{@name.inspect}, @type=#{@type.inspect}, @width=#{@width.inspect}, @id=#{@id.inspect}>"
end