class Numeric

Extends the Numeric class for conversion to a high-level expression.

Extends the Numeric class with generation of hdr text.

Extends the Numeric class with generation of HDLRuby::High text.

Extends the Numeric class with generation of verilog text.

Extends the Numeric class for conversion to fixed point litteral.

Public Instance Methods

ms() click to toggle source

Converts to a new delay in milliseconds.

# File lib/HDLRuby/hruby_high.rb, line 4214
def ms
    return Delay.new(self,:ms)
end
ns() click to toggle source

Converts to a new delay in nanoseconds.

# File lib/HDLRuby/hruby_high.rb, line 4204
def ns
    return Delay.new(self,:ns)
end
ps() click to toggle source

Converts to a new delay in picoseconds.

# File lib/HDLRuby/hruby_high.rb, line 4199
def ps
    return Delay.new(self,:ps)
end
s() click to toggle source

Converts to a new delay in seconds.

# File lib/HDLRuby/hruby_high.rb, line 4219
def s
    return Delay.new(self,:s)
end
to_fix(dec) click to toggle source

Convert to fixed point value with dec digits after the decimal point.

# File lib/HDLRuby/std/fixpoint.rb, line 89
def to_fix(dec)
    return (self * (2**dec.to_i)).to_i
end
to_hdr(level = 0) click to toggle source

Generates the text of the equivalent hdr text. level is the hierachical level of the object.

# File lib/HDLRuby/hruby_low2hdr.rb, line 733
def to_hdr(level = 0)
    return self.to_s
end
to_value() click to toggle source

Converts to a new high-level value.

# File lib/HDLRuby/hruby_high.rb, line 4194
def to_value
    to_expr
end
to_value?() click to toggle source

Tell if the expression can be converted to a value.

# File lib/HDLRuby/hruby_high.rb, line 4189
def to_value?
    return true
end
to_verilog(level = 0) click to toggle source

Generates the text of the equivalent verilog code. level is the hierachical level of the object.

# File lib/HDLRuby/hruby_verilog.rb, line 2120
def to_verilog(level = 0)
    return self.to_s
end
to_vhdl(level = 0) click to toggle source

Generates the text of the equivalent HDLRuby::High code. level is the hierachical level of the object.

# File lib/HDLRuby/hruby_low2vhd.rb, line 1532
def to_vhdl(level = 0)
    return self.to_s
end
us() click to toggle source

Converts to a new delay in microseconds.

# File lib/HDLRuby/hruby_high.rb, line 4209
def us
    return Delay.new(self,:us)
end