summaryrefslogtreecommitdiff
path: root/test.rb
diff options
context:
space:
mode:
authorJulian Blake Kongslie2022-06-06 13:27:42 -0700
committerJulian Blake Kongslie2022-06-06 13:27:42 -0700
commitb3a13e5845b92ae9520b93113c4030114b2d6331 (patch)
treefb1fbb5fa2e7881e8db3778541db9d0ab75fec79 /test.rb
parentNamed pins on subcomponents. (diff)
downloadlace-b3a13e5845b92ae9520b93113c4030114b2d6331.tar.xz
Automatically define a method for ICs.
Diffstat (limited to '')
-rwxr-xr-xtest.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/test.rb b/test.rb
index 269c9d0..d462053 100755
--- a/test.rb
+++ b/test.rb
@@ -7,13 +7,13 @@ nl = Lace::Netlist.new do
7 vcc = net("vcc") 7 vcc = net("vcc")
8 gnd = net("gnd") 8 gnd = net("gnd")
9 9
10 define_singleton_method(:inverter, stock_ic("inverter", "CD74HC04") do | ic | 10 stock_ic("inverter", "CD74HC04") do | ic |
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 define_singleton_method(:nand, stock_ic("nand", "CD74HC00") do | ic | 14 stock_ic("nand", "CD74HC00") do | ic |
15 vcc - ic[14] - c("100nF") - ic[7] - gnd 15 vcc - ic[14] - c("100nF") - ic[7] - gnd
16 end) 16 end
17 17
18 g = net("g") 18 g = net("g")
19 o = net("o") 19 o = net("o")