diff options
| author | Julian Blake Kongslie | 2022-06-06 13:27:42 -0700 |
|---|---|---|
| committer | Julian Blake Kongslie | 2022-06-06 13:27:42 -0700 |
| commit | b3a13e5845b92ae9520b93113c4030114b2d6331 (patch) | |
| tree | fb1fbb5fa2e7881e8db3778541db9d0ab75fec79 /test.rb | |
| parent | Named pins on subcomponents. (diff) | |
| download | lace-b3a13e5845b92ae9520b93113c4030114b2d6331.tar.xz | |
Automatically define a method for ICs.
Diffstat (limited to 'test.rb')
| -rwxr-xr-x | test.rb | 8 |
1 files changed, 4 insertions, 4 deletions
| @@ -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") |
