I'm trying to use the Sky130 PDK and I get this is...
# klayout
m
I'm trying to use the Sky130 PDK and I get this issue when using it on some platforms, but not others:
Copy code
sh: line 1: pmap: command not found
ERROR: In /home/mrg/class/chip-tutorials/klayout/tech/sky130/pymacros/../lvs/sky130.lvs: undefined method `strip' for nil:NilClass
ERROR: /home/mrg/class/chip-tutorials/klayout/tech/sky130/pymacros/run_lvs.lym:135: RuntimeError: NoMethodError: undefined method `strip' for nil:NilClass in Executable::execute
  /home/mrg/class/chip-tutorials/klayout/tech/sky130/pymacros/../lvs/sky130.lvs:27:in `block in execute'
  /nix/store/c4bdx4dja3h06xg1ksv3f51alp5a44li-ruby-3.1.5/lib/ruby/3.1.0/logger.rb:586:in `format_message'
  /nix/store/c4bdx4dja3h06xg1ksv3f51alp5a44li-ruby-3.1.5/lib/ruby/3.1.0/logger.rb:476:in `add'
  /nix/store/c4bdx4dja3h06xg1ksv3f51alp5a44li-ruby-3.1.5/lib/ruby/3.1.0/logger.rb:529:in `info'
  /home/mrg/class/chip-tutorials/klayout/tech/sky130/pymacros/../lvs/sky130.lvs:34:in `execute'
  :/built-in-macros/lvs_interpreters.lym:31:in `instance_eval'
  :/built-in-macros/lvs_interpreters.lym:31:in `execute' in Macro.run
  /home/mrg/class/chip-tutorials/klayout/tech/sky130/pymacros/run_lvs.lym:135
As far as I can tell, it does this depending on the version of Ruby. Older ones (2.7) work but newer ones (3.1) don't? This demo has a sky130 inv_1 gds and spice as well as the PDK scripts
So far, it works on Ubuntu 20.04 with Ruby 2.7.1. It fails on: Ubuntu 20.04 with Ruby 3.1.5 inside Docker MacOS Sequoia 15 with Ruby 2.6.10
m
@Matthew Guthaus the
sky130.lvs
file has this line
Copy code
logger.formatter = proc do |severity, datetime, progname, msg|
  "#{datetime}: Memory Usage (" + `pmap #{Process.pid} | tail -1`[10,40].strip + ") : #{msg}\n"
If the
pmap
command is not available, it appears to return a
nil
object that results in a failure because there is no
script
strip
method. Can you verify that
pmap
is available on the platforms that work and not available on platforms that do not work? This is just a log header formatter to show memory usage. I think this will allow lvs to run but not show memory usage.
Copy code
logger.formatter = proc do |severity, datetime, progname, msg|
  "#{datetime}: Memory Usage (unavailable) : #{msg}\n"
m
@Mitch Bailey I can confirm. I was wondering what that was.. thank you.
👍 1
@donn It seems that pmap disappeared from the openlane image between 2.2.9 and 2.3.1. Is there a way to get it added back in the image? sudo apt install pmap
Or, we can also just remove the logging from the script. That actually is fine.