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.4.8 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-2.4.6 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-2.4.1 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-2.3.8 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-2.3.7 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-2.3.6 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-2.3.5 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-2.3.4 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-2.3.3 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-2.3.2 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-2.3.1 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-2.3.0 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-2.2.17 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-2.2.16 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-2.2.15 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-2.2.14 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-2.2.13 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-2.2.12 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-2.2.11 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb
HDLRuby-2.2.10 lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb