summaryrefslogtreecommitdiff
path: root/test.rb
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xtest.rb15
1 files changed, 12 insertions, 3 deletions
diff --git a/test.rb b/test.rb
index e7f8b49..269c9d0 100755
--- a/test.rb
+++ b/test.rb
@@ -11,10 +11,19 @@ nl = Lace::Netlist.new do
11 vcc - ic[14] - c("100nF") - ic[7] - gnd 11 vcc - ic[14] - c("100nF") - ic[7] - gnd
12 end) 12 end)
13 13
14 vcc - led(220) - gnd 14 define_singleton_method(:nand, stock_ic("nand", "CD74HC00") do | ic |
15 vcc - ic[14] - c("100nF") - ic[7] - gnd
16 end)
17
18 g = net("g")
19 o = net("o")
20 vcc - btn - g - led(220, "green") - gnd
21 vcc - btn("orange") - inverter - o - led(220, "white") - gnd
15 22
16 vcc - btn - led(220, "green") - gnd 23 go = nand
17 vcc - btn("orange") - inverter - led(220, "white") - gnd 24 g - go[:a]
25 o - go[:b]
26 go[:y] - led(220) - gnd
18 27
19 x = vcc - btn("white") 28 x = vcc - btn("white")
20 x - net("x") - led(220, "amber") - gnd 29 x - net("x") - led(220, "amber") - gnd