Class: HDLRuby::High::Std::SEnumeratorWrapper
Overview
Describes a sequencer enumerator class that allows to generate HW iterations
over HW or SW objects within sequencers.
This is the wrapper Enumerator over an other one for applying an other
interation method over the first one.
Instance Method Summary
collapse
Methods inherited from SEnumerator
#+, #seach_with_index, #seach_with_object, #with_index, #with_object
#sall?, #sany?, #schain, #schunk, #schunk_while, #scompact, #scount, #scycle, #sdrop, #sdrop_while, #seach_cons, #seach_entry, #seach_nexts, #seach_slice, #seach_with_index, #seach_with_object, #sfind, #sfind_index, #sfirst, #sflat_map, #sgrep, #sgrep_v, #sgroup_by, #sinclude?, #sinject, #slazy, #smap, #smax, #smax_by, #smin, #smin_by, #sminmax, #sminmax_by, #snone?, #sone?, #spartition, #sreject, #sreverse_each, #sselect, #sslice_after, #sslice_before, #sslice_when, #ssort, #ssort_by, #ssort_merge, #ssum, #stake, #stake_while, #stally, #sto_a, #sto_h, #suniq, #szip
Constructor Details
Create a new SEnumerator wrapper over +enum+ with +iter+ iteration
method and +args+ argument.
[View source]
1842
1843
1844
1845
1846
1847
1848
1849
1850
|
# File 'lib/HDLRuby/std/sequencer.rb', line 1842
def initialize(enum,iter,*args)
if enum.is_a?(SEnumerator) then
@enumerator = enum.clone
else
@enumerator = enum.seach
end
@iterator = iter.to_sym
@arguments = args
end
|
Instance Method Details
#access(idx) ⇒ Object
[View source]
1869
1870
1871
|
# File 'lib/HDLRuby/std/sequencer.rb', line 1869
def access(idx)
return @enumerator.access(idx)
end
|
#clone ⇒ Object
[View source]
1909
1910
1911
|
# File 'lib/HDLRuby/std/sequencer.rb', line 1909
def clone
return SEnumeratorWrapper.new(@enumerator,@iterator,*@arguments)
end
|
#index ⇒ Object
[View source]
1865
1866
1867
|
# File 'lib/HDLRuby/std/sequencer.rb', line 1865
def index
return @enumerator.index
end
|
#result ⇒ Object
[View source]
1861
1862
1863
|
# File 'lib/HDLRuby/std/sequencer.rb', line 1861
def result
return @enumerator.result
end
|
#seach(&ruby_block) ⇒ Object
Iterate over each element.
[View source]
1914
1915
1916
1917
1918
1919
|
# File 'lib/HDLRuby/std/sequencer.rb', line 1914
def seach(&ruby_block)
return self unless ruby_block
return @enumerator.send(@iterator,*@arguments,&ruby_block)
end
|
#seach_range(rng, &ruby_block) ⇒ Object
Iterator on each of the elements in range +rng+.
NOTE:
- Stop iteration when the end of the range is reached or when there
are no elements left
- This is not a method from Ruby but one specific for hardware where
creating a array is very expensive.
[View source]
1904
1905
1906
|
# File 'lib/HDLRuby/std/sequencer.rb', line 1904
def seach_range(rng,&ruby_block)
return @enumerator.seach_range(rng,&ruby_block)
end
|
#size ⇒ Object
The directly delegate methods.
[View source]
1853
1854
1855
|
# File 'lib/HDLRuby/std/sequencer.rb', line 1853
def size
return @enumertor.size
end
|
#snext ⇒ Object
[View source]
1877
1878
1879
|
# File 'lib/HDLRuby/std/sequencer.rb', line 1877
def snext
return @enumerator.snext
end
|
#snext!(val) ⇒ Object
[View source]
1890
1891
1892
|
# File 'lib/HDLRuby/std/sequencer.rb', line 1890
def snext!(val)
return @enumerator.snext!(val)
end
|
#snext? ⇒ Boolean
[View source]
1881
1882
1883
1884
1885
1886
1887
1888
|
# File 'lib/HDLRuby/std/sequencer.rb', line 1881
def snext?
return @enumerator.snext?
end
|
#speek ⇒ Object
[View source]
1873
1874
1875
|
# File 'lib/HDLRuby/std/sequencer.rb', line 1873
def speek
return @enumerator.speek
end
|
#srewind ⇒ Object
[View source]
1894
1895
1896
|
# File 'lib/HDLRuby/std/sequencer.rb', line 1894
def srewind
return @enumerator.srewind
end
|
#type ⇒ Object
[View source]
1857
1858
1859
|
# File 'lib/HDLRuby/std/sequencer.rb', line 1857
def type
return @enumerator.type
end
|