Method: Integer#sdownto
- Defined in:
- lib/HDLRuby/std/sequencer.rb
#sdownto(val, &ruby_block) ⇒ Object
HW downto iteration.
2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 |
# File 'lib/HDLRuby/std/sequencer.rb', line 2316 def sdownto(val,&ruby_block) # Create the hardware iterator. range = val..self hw_enum = SEnumeratorBase.new(signed[32],range.size) do |idx| range.last - idx end # Is there a ruby block? if(ruby_block) then # Yes, apply it. return hw_enum.seach(&ruby_block) else # No, return the resulting enumerator. return hw_enum end end |