Class: Numeric
- Inherits:
-
Object
- Object
- Numeric
- Defined in:
- lib/HDLRuby/hruby_high.rb,
lib/HDLRuby/hruby_low2vhd.rb,
lib/HDLRuby/hruby_verilog.rb,
lib/HDLRuby/hruby_low2high.rb
Overview
Extends the Numeric class with generation of HDLRuby::High text.
Instance Method Summary collapse
-
#ms ⇒ Object
Converts to a new delay in milliseconds.
-
#ns ⇒ Object
Converts to a new delay in nanoseconds.
-
#ps ⇒ Object
Converts to a new delay in picoseconds.
-
#s ⇒ Object
Converts to a new delay in seconds.
-
#to_high(level = 0) ⇒ Object
Generates the text of the equivalent HDLRuby::High code.
-
#to_value ⇒ Object
Converts to a new high-level value.
-
#to_value? ⇒ Boolean
Tell if the expression can be converted to a value.
-
#to_verilog(level = 0) ⇒ Object
Generates the text of the equivalent verilog code.
-
#to_vhdl(level = 0) ⇒ Object
Generates the text of the equivalent HDLRuby::High code.
-
#us ⇒ Object
Converts to a new delay in microseconds.
Instance Method Details
#ms ⇒ Object
Converts to a new delay in milliseconds.
3715 3716 3717 |
# File 'lib/HDLRuby/hruby_high.rb', line 3715 def ms return Delay.new(self,:ms) end |
#ns ⇒ Object
Converts to a new delay in nanoseconds.
3705 3706 3707 |
# File 'lib/HDLRuby/hruby_high.rb', line 3705 def ns return Delay.new(self,:ns) end |
#ps ⇒ Object
Converts to a new delay in picoseconds.
3700 3701 3702 |
# File 'lib/HDLRuby/hruby_high.rb', line 3700 def ps return Delay.new(self,:ps) end |
#s ⇒ Object
Converts to a new delay in seconds.
3720 3721 3722 |
# File 'lib/HDLRuby/hruby_high.rb', line 3720 def s return Delay.new(self,:s) end |
#to_high(level = 0) ⇒ Object
Generates the text of the equivalent HDLRuby::High code. +level+ is the hierachical level of the object.
733 734 735 |
# File 'lib/HDLRuby/hruby_low2high.rb', line 733 def to_high(level = 0) return self.to_s end |
#to_value ⇒ Object
Converts to a new high-level value.
3695 3696 3697 |
# File 'lib/HDLRuby/hruby_high.rb', line 3695 def to_value to_expr end |
#to_value? ⇒ Boolean
Tell if the expression can be converted to a value.
3690 3691 3692 |
# File 'lib/HDLRuby/hruby_high.rb', line 3690 def to_value? return true end |
#to_verilog(level = 0) ⇒ Object
Generates the text of the equivalent verilog code. +level+ is the hierachical level of the object.
1890 1891 1892 |
# File 'lib/HDLRuby/hruby_verilog.rb', line 1890 def to_verilog(level = 0) return self.to_s end |
#to_vhdl(level = 0) ⇒ Object
Generates the text of the equivalent HDLRuby::High code. +level+ is the hierachical level of the object.
1432 1433 1434 |
# File 'lib/HDLRuby/hruby_low2vhd.rb', line 1432 def to_vhdl(level = 0) return self.to_s end |
#us ⇒ Object
Converts to a new delay in microseconds.
3710 3711 3712 |
# File 'lib/HDLRuby/hruby_high.rb', line 3710 def us return Delay.new(self,:us) end |