Class: Origen::Specs::Power_Supply

Inherits:
Object
  • Object
show all
Defined in:
lib/origen/specs/power_supply.rb

Overview

This class is used to store Power Supply Information at the SoC Level

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(gen, act) ⇒ Power_Supply

Initialize the variables



37
38
39
40
41
42
43
44
45
# File 'lib/origen/specs/power_supply.rb', line 37

def initialize(gen, act)
  Origen.deprecate 'Origen::Specs::Power_Supply is deprecated, use Origen::PowerDomains::PowerDomain instead'
  @generic = gen
  @actual = act
  @voltages = []
  @display_name = ''
  @input_display_name = ''
  @output_display_name = ''
end

Instance Attribute Details

#actualObject

The Actual Power Supply Name. For example, GVDD could be the generic name and actual names can be G1VDD and G2VDD. GVDD ==> G2VDD, G3VDD DVDD ==> D2VDD



15
16
17
# File 'lib/origen/specs/power_supply.rb', line 15

def actual
  @actual
end

#display_nameObject

Display Name for the Voltage. Will be in html/dita code G1VDD –> G1V<sub>DD</sub>



26
27
28
# File 'lib/origen/specs/power_supply.rb', line 26

def display_name
  @display_name
end

#genericObject

Generic Power Supply Name. For example:

  • GVDD

  • DVDD

  • TVDD

  • EVDD



10
11
12
# File 'lib/origen/specs/power_supply.rb', line 10

def generic
  @generic
end

#input_display_nameObject

Input Display Name for the Voltage G1VDD –> G1V<sub>IN</sub>



30
31
32
# File 'lib/origen/specs/power_supply.rb', line 30

def input_display_name
  @input_display_name
end

#output_display_nameObject

Output Displat Name for the Voltage G1VDD –> G1V<sub>OUT</sub>



34
35
36
# File 'lib/origen/specs/power_supply.rb', line 34

def output_display_name
  @output_display_name
end

#voltagesObject

Voltages for the power supply. Needs to be supplied by a different source Voltages is an array for all possible values for that power supply DVDD ==>

* 1.8 V
* 3.3 V


22
23
24
# File 'lib/origen/specs/power_supply.rb', line 22

def voltages
  @voltages
end

Instance Method Details

#change_subscript(new_subscript) ⇒ Object



55
56
57
58
59
60
# File 'lib/origen/specs/power_supply.rb', line 55

def change_subscript(new_subscript)
  temp_display_name = @display_name.dup
  sub_input = temp_display_name.at_css 'sub'
  sub_input.content = new_subscript unless sub_input.nil?
  temp_display_name
end

#update_inputObject



47
48
49
# File 'lib/origen/specs/power_supply.rb', line 47

def update_input
  @input_display_name = change_subscript('IN')
end

#update_outputObject



51
52
53
# File 'lib/origen/specs/power_supply.rb', line 51

def update_output
  @output_display_name = change_subscript('OUT')
end