Class: HDLRuby::Low::TimeTerminate
- Defined in:
- lib/HDLRuby/hruby_low.rb,
lib/HDLRuby/hruby_viz.rb,
lib/HDLRuby/hruby_low2c.rb,
lib/HDLRuby/hruby_low2vhd.rb,
lib/HDLRuby/hruby_verilog.rb,
lib/HDLRuby/hruby_low_fix_types.rb,
lib/HDLRuby/hruby_low_bool2select.rb,
lib/HDLRuby/hruby_low_without_select.rb,
lib/HDLRuby/hruby_low_without_subsignals.rb
Overview
Describes a timed terminate statement: not synthesizable!
Direct Known Subclasses
Constant Summary
Constants included from Low2Symbol
Low2Symbol::Low2SymbolPrefix, Low2Symbol::Low2SymbolTable, Low2Symbol::Symbol2LowTable
Instance Attribute Summary
Attributes included from Hparent
Instance Method Summary collapse
-
#boolean_in_assign2select! ⇒ Object
Converts booleans in assignments to select operators.
-
#clone ⇒ Object
Clones the TimeRepeat (deeply).
-
#each_block_deep(&ruby_block) ⇒ Object
Iterates over all the blocks contained in the current block.
-
#each_deep(&ruby_block) ⇒ Object
Iterates over each object deeply.
-
#each_node(&ruby_block) ⇒ Object
Iterates over all the nodes.
-
#each_node_deep(&ruby_block) ⇒ Object
Iterates over all the nodes deeply.
-
#each_statement_deep(&ruby_block) ⇒ Object
Iterates over all the statements deeply.
-
#eql?(obj) ⇒ Boolean
Comparison for hash: structural comparison.
-
#explicit_types! ⇒ Object
Explicit the types conversions in the statement.
-
#extract_selects! ⇒ Object
Extract the Select expressions.
-
#hash ⇒ Object
Hash function.
-
#initialize ⇒ TimeTerminate
constructor
Creates a new timed terminate statement that terminate execution.
-
#signal2subs! ⇒ Object
Decompose the hierarchical signals in the statements.
-
#to_c(res, level = 0) ⇒ Object
Generates the C text of the equivalent HDLRuby code.
-
#to_verilog(spc = 3) ⇒ Object
Converts the terminate to Verilog code.
-
#to_vhdl(vars, level = 0) ⇒ Object
Generates the text of the equivalent HDLRuby::High code.
-
#to_viz_node(parent) ⇒ Object
Converts the transmit to a Viz flow node under +parent+.
Methods inherited from Statement
#add_blocks_code, #add_make_block, #behavior, #block, #blocks2seq!, #break_types!, #delete_related!, #delete_unless!, #each_statement, #extract_declares!, #fix_scope_refnames!, #mix?, #par_in_seq2seq!, #parent_system, #replace_expressions!, #replace_names!, #scope, #to_ch, #to_hdr, #to_high, #to_seq!, #to_upper_space!, #top_block, #top_scope, #use_name?, #with_boolean!
Methods included from Low2Symbol
Methods included from Hparent
#absolute_ref, #hierarchy, #no_parent!, #scope
Constructor Details
#initialize ⇒ TimeTerminate
Creates a new timed terminate statement that terminate execution.
4504 4505 4506 |
# File 'lib/HDLRuby/hruby_low.rb', line 4504 def initialize super() end |
Instance Method Details
#boolean_in_assign2select! ⇒ Object
Converts booleans in assignments to select operators.
84 85 86 87 |
# File 'lib/HDLRuby/hruby_low_bool2select.rb', line 84 def boolean_in_assign2select! # Nothing to do. return self end |
#clone ⇒ Object
Clones the TimeRepeat (deeply)
4567 4568 4569 |
# File 'lib/HDLRuby/hruby_low.rb', line 4567 def clone return TimeTerminate.new end |
#each_block_deep(&ruby_block) ⇒ Object
Iterates over all the blocks contained in the current block.
4548 4549 4550 4551 4552 4553 |
# File 'lib/HDLRuby/hruby_low.rb', line 4548 def each_block_deep(&ruby_block) # No ruby block? Return an enumerator. return to_enum(:each_block_deep) unless ruby_block # A ruby block? # Nothing to do anyway. end |
#each_deep(&ruby_block) ⇒ Object
Iterates over each object deeply.
Returns an enumerator if no ruby block is given.
4511 4512 4513 4514 4515 4516 4517 |
# File 'lib/HDLRuby/hruby_low.rb', line 4511 def each_deep(&ruby_block) # No ruby block? Return an enumerator. return to_enum(:each_deep) unless ruby_block # A ruby block? First apply it to current. ruby_block.call(self) # And that's all. end |
#each_node(&ruby_block) ⇒ Object
Iterates over all the nodes.
4520 4521 4522 4523 4524 4525 |
# File 'lib/HDLRuby/hruby_low.rb', line 4520 def each_node(&ruby_block) # No ruby block? Return an enumerator. return to_enum(:each_node) unless ruby_block # A ruby block? # Nothing to do anyway. end |
#each_node_deep(&ruby_block) ⇒ Object
Iterates over all the nodes deeply.
4528 4529 4530 4531 4532 4533 4534 4535 |
# File 'lib/HDLRuby/hruby_low.rb', line 4528 def each_node_deep(&ruby_block) # No ruby block? Return an enumerator. return to_enum(:each_node_deep) unless ruby_block # A ruby block? # Apply of current node. ruby_block.call(self) # And that's all. end |
#each_statement_deep(&ruby_block) ⇒ Object
Iterates over all the statements deeply.
4538 4539 4540 4541 4542 4543 4544 4545 |
# File 'lib/HDLRuby/hruby_low.rb', line 4538 def each_statement_deep(&ruby_block) # No ruby block? Return an enumerator. return to_enum(:each_statement_deep) unless ruby_block # A ruby block? # Apply of current node. ruby_block.call(self) # And that's all. end |
#eql?(obj) ⇒ Boolean
Comparison for hash: structural comparison.
4556 4557 4558 4559 |
# File 'lib/HDLRuby/hruby_low.rb', line 4556 def eql?(obj) return false unless obj.is_a?(TimeTerminate) return true end |
#explicit_types! ⇒ Object
Explicit the types conversions in the statement.
126 127 128 129 |
# File 'lib/HDLRuby/hruby_low_fix_types.rb', line 126 def explicit_types! # Nothing to do. return self end |
#extract_selects! ⇒ Object
Extract the Select expressions.
192 193 194 195 |
# File 'lib/HDLRuby/hruby_low_without_select.rb', line 192 def extract_selects! # Nothing to extract. return [] end |
#hash ⇒ Object
Hash function.
4562 4563 4564 |
# File 'lib/HDLRuby/hruby_low.rb', line 4562 def hash return TimeTerminate.hash end |
#signal2subs! ⇒ Object
Decompose the hierarchical signals in the statements.
164 165 166 167 |
# File 'lib/HDLRuby/hruby_low_without_subsignals.rb', line 164 def signal2subs! # Nothing to do. return self end |
#to_c(res, level = 0) ⇒ Object
Generates the C text of the equivalent HDLRuby code. +level+ is the hierachical level of the object.
1547 1548 1549 1550 |
# File 'lib/HDLRuby/hruby_low2c.rb', line 1547 def to_c(res,level = 0) # Save the value pool state. res << (" " * (level*3)) << "terminate();\n" end |
#to_verilog(spc = 3) ⇒ Object
Converts the terminate to Verilog code.
251 252 253 |
# File 'lib/HDLRuby/hruby_verilog.rb', line 251 def to_verilog(spc = 3) return "#{" " * spc}$finish;" end |
#to_vhdl(vars, level = 0) ⇒ Object
Generates the text of the equivalent HDLRuby::High code. +vars+ is the list of the variables and +level+ is the hierachical level of the object.
948 949 950 951 |
# File 'lib/HDLRuby/hruby_low2vhd.rb', line 948 def to_vhdl(vars,level = 0) # Generate a report statement. return " " * (level*3) + "finish;\n" end |