Class: HDLRuby::High::Delay
- Inherits:
-
Low::Delay
- Object
- Low::Delay
- HDLRuby::High::Delay
- Includes:
- HStatement
- Defined in:
- lib/HDLRuby/hruby_high.rb,
lib/HDLRuby/hruby_rsim.rb,
lib/HDLRuby/hruby_rcsim.rb
Overview
Describes a delay: not synthesizable.
Constant Summary collapse
Constants included from Low::Low2Symbol
Low::Low2Symbol::Low2SymbolPrefix, Low::Low2Symbol::Low2SymbolTable, Low::Low2Symbol::Symbol2LowTable
Instance Attribute Summary
Attributes inherited from Low::Delay
Attributes included from Low::Hparent
Instance Method Summary collapse
- #! ⇒ Object
-
#time_ps ⇒ Object
Get the time of the delay in pico seconds.
-
#to_low ⇒ Object
Converts the delay to HDLRuby::Low.
Methods included from HStatement
Methods inherited from Low::Delay
#clone, #each_deep, #eql?, #hash, #initialize, #replace_expressions!, #set_unit!, #set_value!, #to_c, #to_hdr, #to_high, #to_verilog, #to_vhdl
Methods included from Low::Low2Symbol
Methods included from Low::Hparent
#absolute_ref, #hierarchy, #no_parent!, #scope
Constructor Details
This class inherits a constructor from HDLRuby::Low::Delay
Instance Method Details
#! ⇒ Object
2766 2767 2768 |
# File 'lib/HDLRuby/hruby_high.rb', line 2766 def ! High.top_user.wait(self) end |
#time_ps ⇒ Object
Get the time of the delay in pico seconds.
799 800 801 802 803 804 805 806 807 808 809 810 811 812 |
# File 'lib/HDLRuby/hruby_rsim.rb', line 799 def time_ps case self.unit when :ps return self.value.to_i when :ns return self.value.to_i * 1000 when :us return self.value.to_i * 1000000 when :ms return self.value.to_i * 1000000000 when :s return self.value.to_i * 1000000000000 end end |
#to_low ⇒ Object
Converts the delay to HDLRuby::Low.
2771 2772 2773 2774 2775 2776 2777 2778 |
# File 'lib/HDLRuby/hruby_high.rb', line 2771 def to_low # return HDLRuby::Low::Delay.new(self.value, self.unit) delayL = HDLRuby::Low::Delay.new(self.value, self.unit) # # For debugging: set the source high object # delayL.properties[:low2high] = self.hdr_id # self.properties[:high2low] = delayL return delayL end |