{"id":8619,"library":"salamandra","title":"Salamandra Netlist Manipulation Framework","description":"Salamandra is an extensible Pythonic infrastructure for loading, analyzing, generating, and storing netlists. Developed by EnICS labs, it is currently at version 1.0.1 and is under active development. The library supports Python 3.5+ and is released under the Apache 2.0 open-source license.","status":"active","version":"1.0.1","language":"en","source_language":"en","source_url":"https://github.com/enics-labs/salamandra","tags":["netlist","EDA","hardware design","electronics","manipulation"],"install":[{"cmd":"pip install salamandra","lang":"bash","label":"Install stable version"}],"dependencies":[],"imports":[{"symbol":"Component","correct":"from salamandra import Component"},{"symbol":"Pin","correct":"from salamandra import Pin"},{"symbol":"Input","correct":"from salamandra import Input"},{"symbol":"Output","correct":"from salamandra import Output"},{"symbol":"Inout","correct":"from salamandra import Inout"}],"quickstart":{"code":"import salamandra as slm\n\n# Create an NMOS component skeleton\nnmos = slm.Component('nmos')\nnmos.add_pin(slm.Pin('source'))\nnmos.add_pin(slm.Pin('drain'))\nnmos.add_pin(slm.Pin('gate'))\nnmos.add_pin(slm.Pin('body'))\n\n# Create an inverter component with subcomponents and connections\ninv = slm.Component('inv')\n# Add pins to the inverter\ninv.add_pin(slm.Input('I'))\ninv.add_pin(slm.Output('ZN'))\ninv.add_pin(slm.Inout('VDD'))\ninv.add_pin(slm.Inout('VSS'))\n\n# Add subcomponents (instances of nmos and pmos - pmos would be defined similarly to nmos)\n# For this example, let's assume 'pmos' is also a defined slm.Component object\npmos = slm.Component('pmos') # Define a dummy pmos for the example to be runnable\npmos.add_pin(slm.Pin('source'))\npmos.add_pin(slm.Pin('drain'))\npmos.add_pin(slm.Pin('gate'))\npmos.add_pin(slm.Pin('body'))\n\ninv.add_subcomponent(nmos, 'n1')\ninv.add_subcomponent(pmos, 'p1')\n\n# Establish connections\ninv.connect('I', 'n1.gate')\ninv.connect('I', 'p1.gate')\ninv.connect('ZN', 'n1.drain')\ninv.connect('ZN', 'p1.drain')\ninv.connect('VDD', 'p1.source')\ninv.connect('VDD', 'p1.body')\n\nprint(f\"Created component: {inv.name}\")\nprint(f\"Pins: {[p.name for p in inv.pins]}\")\nprint(f\"Subcomponents: {[s.name for s in inv.subcomponents]}\")\n# For full netlist export, one would typically call functions like inv.print_verilog()\n# print(\"\\nVerilog Netlist (example snippet):\")\n# inv.print_verilog()\n","lang":"python","description":"This quickstart demonstrates how to create basic `Component` objects, add `Pin`s, and then construct a hierarchical component like an inverter with subcomponents and connections."},"warnings":[{"fix":"Refer to the GitHub repository for the most up-to-date examples and source code. Report issues via GitHub issues.","message":"Salamandra is currently under development, and its documentation for the latest features may be incomplete or evolving. Users should expect potential API changes as the library matures.","severity":"gotcha","affected_versions":"1.0.1 and earlier"},{"fix":"Ensure your development environment uses Python 3.5 or a newer version.","message":"The Salamandra library exclusively supports Python 3 (specifically Python 3.5 and above). Attempting to use it with Python 2 will result in compatibility errors.","severity":"gotcha","affected_versions":"<=1.0.1"}],"env_vars":null,"last_verified":"2026-04-16T00:00:00.000Z","next_check":"2026-07-15T00:00:00.000Z","problems":[{"fix":"Run `pip install salamandra` to install the library.","cause":"The Salamandra library is not installed in the current Python environment.","error":"ModuleNotFoundError: No module named 'salamandra'"},{"fix":"Verify that you are running your code with Python 3.5+ and that your code adheres to Python 3 syntax. Consult the official Python 3 documentation for language differences if migrating from Python 2.","cause":"This error often indicates attempting to use Python 2-specific syntax or features, or incorrect object usage, with a Python 3-only library like Salamandra.","error":"TypeError: 'str' object is not callable"}]}