Sha256: 1a0494dff72f30a5df0dad9337fd2d63dccffda81a059affa88badabf486a2ac

Contents?: true

Size: 746 Bytes

Versions: 100

Compression:

Stored size: 746 Bytes

Contents

require 'HDLRuby'
configure_high

#組み合わせ回路
system :led7seg do
	[3..0].input :in0
	[6..0].output :out
	[6..0].inner :out
	
	par do
		hcase(in0)
			hwhen 0 do
				out <= _b7b0111111
			end
			hwhen 1 do
				out <= _b7b0000110
			end
			hwhen 2 do
				out <= _b7b1011011
			end
			hwhen 3 do
				out <= _b7b1001111
			end
			hwhen 4 do
				out <= _b7b1100110
			end
			hwhen 5 do
				out <= _b7b1111101
			end
			hwhen 6 do
				out <= _b7b1111101
			end
			hwhen 7 do
				out <= _b7b0000111
			end
			hwhen 8 do
				out <= _b7b1111111
			end
			hwhen 9 do
				out <= _b7b1100111
			end
			helse do 
				out <= 0
			end
		
		
	end
end

led7seg :led7segI

puts led7segI.to_low.to_yaml

Version data entries

100 entries across 100 versions & 1 rubygems

Version Path
HDLRuby-2.10.3 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-2.10.2 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-2.9.0 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-2.8.1 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-2.7.11 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-2.7.5 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-2.7.1 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-2.6.25 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-2.6.24 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-2.6.23 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-2.6.22 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-2.6.19 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-2.6.18 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-2.6.16 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-2.6.15 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-2.6.10 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-2.6.8 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-2.6.5 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-2.6.4 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-2.6.3 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb