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-3.4.0 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-3.3.4 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-3.3.3 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-3.3.1 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-3.3.0 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-3.2.0 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-3.1.0 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-3.0.0 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-2.11.12 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-2.11.11 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-2.11.10 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-2.11.9 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-2.11.8 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-2.11.7 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-2.11.5 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-2.11.4 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-2.11.3 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-2.11.2 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-2.11.0 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-2.10.5 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb