Sha256: ffc39767973ad69001e46676c23ec1549a4eaec952ae34bb7d2f3d6ed779b963

Contents?: true

Size: 441 Bytes

Versions: 105

Compression:

Stored size: 441 Bytes

Contents

require 'HDLRuby'

configure_high


# A simple test of using each on signals.
system :with_each do
    [15..0].input :x
    [15..0].output :s
    [15..0].inout :y

    x.each.with_index do |b,i|
        s[i] <= b
    end

    y.each_cons(2) do |b0,b1|
        b0 <= b1
    end
end

# Instantiate it for checking.
with_each :with_eachI

# Generate the low level representation.
low = with_eachI.systemT.to_low

# Displays it
puts low.to_yaml

Version data entries

105 entries across 105 versions & 1 rubygems

Version Path
HDLRuby-3.6.2 lib/HDLRuby/high_samples/each.rb
HDLRuby-3.6.1 lib/HDLRuby/high_samples/each.rb
HDLRuby-3.6.0 lib/HDLRuby/high_samples/each.rb
HDLRuby-3.5.1 lib/HDLRuby/high_samples/each.rb
HDLRuby-3.5.0 lib/HDLRuby/high_samples/each.rb
HDLRuby-3.4.0 lib/HDLRuby/high_samples/each.rb
HDLRuby-3.3.4 lib/HDLRuby/high_samples/each.rb
HDLRuby-3.3.3 lib/HDLRuby/high_samples/each.rb
HDLRuby-3.3.1 lib/HDLRuby/high_samples/each.rb
HDLRuby-3.3.0 lib/HDLRuby/high_samples/each.rb
HDLRuby-3.2.0 lib/HDLRuby/high_samples/each.rb
HDLRuby-3.1.0 lib/HDLRuby/high_samples/each.rb
HDLRuby-3.0.0 lib/HDLRuby/high_samples/each.rb
HDLRuby-2.11.12 lib/HDLRuby/high_samples/each.rb
HDLRuby-2.11.11 lib/HDLRuby/high_samples/each.rb
HDLRuby-2.11.10 lib/HDLRuby/high_samples/each.rb
HDLRuby-2.11.9 lib/HDLRuby/high_samples/each.rb
HDLRuby-2.11.8 lib/HDLRuby/high_samples/each.rb
HDLRuby-2.11.7 lib/HDLRuby/high_samples/each.rb
HDLRuby-2.11.5 lib/HDLRuby/high_samples/each.rb