Sha256: 650985a5387df6339edc92a80c46f80d41478ae203b44979c8fe4ab18106301a
Contents?: true
Size: 627 Bytes
Versions: 105
Compression:
Stored size: 627 Bytes
Contents
require 'HDLRuby' configure_high require 'HDLRuby/std/decoder' 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 # Instantiate it for checking. my_decoder :my_decoderI # Generate the low level representation. low = my_decoderI.systemT.to_low # Displays it puts low.to_yaml
Version data entries
105 entries across 105 versions & 1 rubygems