summaryrefslogtreecommitdiff
path: root/test.rb
diff options
context:
space:
mode:
authorJulian Blake Kongslie2022-05-15 15:59:17 -0700
committerJulian Blake Kongslie2022-05-15 15:59:17 -0700
commit2b5a301077b436cb17156c3f17f2812856115d90 (patch)
tree8a5a9074386326793fcddee36463fc36f437865e /test.rb
parentAdd an active probe to the test circuit (diff)
downloadlace-2b5a301077b436cb17156c3f17f2812856115d90.tar.xz
More unicode.
Diffstat (limited to '')
-rwxr-xr-xtest.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/test.rb b/test.rb
index f63b557..e8d2a6b 100755
--- a/test.rb
+++ b/test.rb
@@ -11,7 +11,7 @@ def c(size)
11end 11end
12 12
13def led(color="red") 13def led(color="red")
14 comp("D", "0805", "LED", "1.5V 10mA #{color}") - r("220ohm") 14 comp("D", "0805", "LED", "1.5V 10mA #{color}") - r("220Ω")
15end 15end
16 16
17def inverter() 17def inverter()
@@ -39,12 +39,12 @@ def btn(color="black")
39end 39end
40 40
41def probe(attenuation=20, impedance=50) 41def probe(attenuation=20, impedance=50)
42 jack = comp("J", "SMB", "SMB jack", "#{attenuation}x #{impedance}ohm probe") 42 jack = comp("J", "SMB", "SMB jack", "#{attenuation}x #{impedance}Ω probe")
43 jack[2] - jack[3] - jack[4] - jack[5] 43 jack[2] - jack[3] - jack[4] - jack[5]
44 if attenuation == 1 44 if attenuation == 1
45 pair(jack[1], jack[2]) 45 pair(jack[1], jack[2])
46 else 46 else
47 pair(r("#{(attenuation-1)*impedance}ohm") - jack[1], jack[2]) 47 pair(r("#{(attenuation-1)*impedance}Ω") - jack[1], jack[2])
48 end 48 end
49end 49end
50 50
@@ -59,7 +59,7 @@ nl = Lace::Netlist.new do
59 59
60 x = $vcc - btn("white") 60 x = $vcc - btn("white")
61 x - net("x") - led("amber") - $gnd 61 x - net("x") - led("amber") - $gnd
62 x - inverter() - net("xbar") - led("blue") - $gnd 62 x - inverter() - net("x̅") - led("blue") - $gnd
63 x - probe - $gnd 63 x - probe - $gnd
64end 64end
65 65