Sha256: 7924578c087e0719d58c37bfc176de1f75433e56a40ed3280e50c83f358a4d0e

Contents?: true

Size: 424 Bytes

Versions: 91

Compression:

Stored size: 424 Bytes

Contents

require 'std/decoder.rb'
include HDLRuby::High::Std

# Implementation of a decoder.
system :my_decoder do
    [7..0].input :a
    [7..0].output :z

    decoder(a) do
        entry("1000uuvv") { z <= u + v }
        entry("101uuuvv") { z <= u - v }
        entry("1100uuvv") { z <= u & v }
        entry("1101uuvv") { z <= u | v }
        entry("1110uuvv") { z <= u ^ v }
        default           { z <= 0     }
    end
end

Version data entries

91 entries across 91 versions & 1 rubygems

Version Path
HDLRuby-3.4.0 lib/HDLRuby/hdr_samples/with_decoder.rb
HDLRuby-3.3.4 lib/HDLRuby/hdr_samples/with_decoder.rb
HDLRuby-3.3.3 lib/HDLRuby/hdr_samples/with_decoder.rb
HDLRuby-3.3.1 lib/HDLRuby/hdr_samples/with_decoder.rb
HDLRuby-3.3.0 lib/HDLRuby/hdr_samples/with_decoder.rb
HDLRuby-3.2.0 lib/HDLRuby/hdr_samples/with_decoder.rb
HDLRuby-3.1.0 lib/HDLRuby/hdr_samples/with_decoder.rb
HDLRuby-3.0.0 lib/HDLRuby/hdr_samples/with_decoder.rb
HDLRuby-2.11.12 lib/HDLRuby/hdr_samples/with_decoder.rb
HDLRuby-2.11.11 lib/HDLRuby/hdr_samples/with_decoder.rb
HDLRuby-2.11.10 lib/HDLRuby/hdr_samples/with_decoder.rb
HDLRuby-2.11.9 lib/HDLRuby/hdr_samples/with_decoder.rb
HDLRuby-2.11.8 lib/HDLRuby/hdr_samples/with_decoder.rb
HDLRuby-2.11.7 lib/HDLRuby/hdr_samples/with_decoder.rb
HDLRuby-2.11.5 lib/HDLRuby/hdr_samples/with_decoder.rb
HDLRuby-2.11.4 lib/HDLRuby/hdr_samples/with_decoder.rb
HDLRuby-2.11.3 lib/HDLRuby/hdr_samples/with_decoder.rb
HDLRuby-2.11.2 lib/HDLRuby/hdr_samples/with_decoder.rb
HDLRuby-2.11.0 lib/HDLRuby/hdr_samples/with_decoder.rb
HDLRuby-2.10.5 lib/HDLRuby/hdr_samples/with_decoder.rb