Class: VerilogTools::HDLRubyState

Inherits:
Object
  • Object
show all
Defined in:
lib/HDLRuby/verilog_hruby.rb

Overview

HDLRuby generation state.

Constant Summary collapse

DEFAULT =

The default state.

HDLRubyState.new

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeHDLRubyState

Create a new state.



28
29
30
31
32
# File 'lib/HDLRuby/verilog_hruby.rb', line 28

def initialize
  @indent = ""     # String to add at new line for indent.
  @level = :top    # Current level in HDLRuby generation.
  @port_names = [] # The names of the ports of the current module.
end

Instance Attribute Details

#indentObject

String to add at new line for indent.



16
17
18
# File 'lib/HDLRuby/verilog_hruby.rb', line 16

def indent
  @indent
end

#levelObject

The current level in HDLRuby generation.



19
20
21
# File 'lib/HDLRuby/verilog_hruby.rb', line 19

def level
  @level
end

#port_namesObject

The names of the ports of the current module.



22
23
24
# File 'lib/HDLRuby/verilog_hruby.rb', line 22

def port_names
  @port_names
end