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.2.9 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-2.2.8 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-2.2.7 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-2.2.6 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-2.2.5 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-2.2.3 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-2.2.2 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-2.2.0 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-2.1.6 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-2.1.5 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-2.1.2 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-2.1.0 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-2.0.18 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-2.0.17 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-2.0.16 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-2.0.15 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-2.0.14 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-2.0.13 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-2.0.9 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-2.0.8 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb