EDB: parametric via creation#
This example shows how you can use EDB to create a layout.
First import the required Python packages.
[1]:
import os
import tempfile
[2]:
import numpy as np
[3]:
import pyedb
Create the EDB project.
[4]:
temp_dir = tempfile.TemporaryDirectory(suffix=".ansys")
aedb_path = os.path.join(temp_dir.name, "parametric_via.aedb")
Create stackup#
The StackupSimple
class creates a stackup based on few inputs. This stackup is used later.
Define a function to create the ground conductor.
[5]:
def create_ground_planes(edb, layers):
plane = edb.modeler.Shape("rectangle", pointA=["-3mm", "-3mm"], pointB=["3mm", "3mm"])
for i in layers:
edb.modeler.create_polygon(plane, i, net_name="GND")
Create the EDB#
Create the EDB instance. If the path doesn’t exist, PyEDB automatically generates a new AEDB folder.
[6]:
# Select EDB version (change it manually if needed, e.g. "2024.2")
edb_version = "2024.2"
print(f"EDB version: {edb_version}")
edb = pyedb.Edb(edbpath=aedb_path, edbversion=edb_version)
EDB version: 2024.2
PyEDB INFO: StdOut is enabled
PyEDB INFO: Logger is initialized in EDB.
PyEDB INFO: legacy v0.34.3
PyEDB INFO: Python version 3.10.11 (tags/v3.10.11:7d4cc5a, Apr 5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)]
--- Logging error ---
Traceback (most recent call last):
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\logging\handlers.py", line 74, in emit
self.doRollover()
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\logging\handlers.py", line 179, in doRollover
self.rotate(self.baseFilename, dfn)
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\logging\handlers.py", line 115, in rotate
os.rename(source, dest)
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\ansys\\AppData\\Local\\Temp\\pyedb_ansys.log' -> 'C:\\Users\\ansys\\AppData\\Local\\Temp\\pyedb_ansys.log.1'
Call stack:
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel_launcher.py", line 18, in <module>
app.launch_new_instance()
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\traitlets\config\application.py", line 1075, in launch_instance
app.start()
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\kernelapp.py", line 739, in start
self.io_loop.start()
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\tornado\platform\asyncio.py", line 205, in start
self.asyncio_loop.run_forever()
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\asyncio\base_events.py", line 603, in run_forever
self._run_once()
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\asyncio\base_events.py", line 1909, in _run_once
handle._run()
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\asyncio\events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\kernelbase.py", line 545, in dispatch_queue
await self.process_one()
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\kernelbase.py", line 534, in process_one
await dispatch(*args)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\kernelbase.py", line 437, in dispatch_shell
await result
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\ipkernel.py", line 362, in execute_request
await super().execute_request(stream, ident, parent)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\kernelbase.py", line 778, in execute_request
reply_content = await reply_content
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\ipkernel.py", line 449, in do_execute
res = shell.run_cell(
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\zmqshell.py", line 549, in run_cell
return super().run_cell(*args, **kwargs)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\IPython\core\interactiveshell.py", line 3075, in run_cell
result = self._run_cell(
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\IPython\core\interactiveshell.py", line 3130, in _run_cell
result = runner(coro)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\IPython\core\async_helpers.py", line 128, in _pseudo_sync_runner
coro.send(None)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\IPython\core\interactiveshell.py", line 3334, in run_cell_async
has_raised = await self.run_ast_nodes(code_ast.body, cell_name,
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\IPython\core\interactiveshell.py", line 3517, in run_ast_nodes
if await self.run_code(code, result, async_=asy):
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\IPython\core\interactiveshell.py", line 3577, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "C:\Users\ansys\AppData\Local\Temp\ipykernel_6384\2802990563.py", line 5, in <module>
edb = pyedb.Edb(edbpath=aedb_path, edbversion=edb_version)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\pyedb\generic\design_types.py", line 110, in Edb
return app(
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\pyedb\dotnet\edb.py", line 196, in __init__
Database.__init__(self, edbversion=edbversion, student_version=student_version)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\pyedb\dotnet\edb_core\dotnet\database.py", line 802, in __init__
EdbDotNet.__init__(self, edbversion=edbversion, student_version=student_version)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\pyedb\dotnet\edb_core\dotnet\database.py", line 703, in __init__
self._logger.enable_stdout_log()
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\pyedb\edb_logger.py", line 318, in enable_stdout_log
self.info("StdOut is enabled")
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\pyedb\edb_logger.py", line 346, in info
return self._log_on_handler(0, msg, *args, **kwargs)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\pyedb\edb_logger.py", line 293, in _log_on_handler
self._global.info(message_text, *args, **kwargs)
Message: 'StdOut is enabled'
Arguments: ()
--- Logging error ---
Traceback (most recent call last):
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\logging\handlers.py", line 74, in emit
self.doRollover()
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\logging\handlers.py", line 179, in doRollover
self.rotate(self.baseFilename, dfn)
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\logging\handlers.py", line 115, in rotate
os.rename(source, dest)
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\ansys\\AppData\\Local\\Temp\\pyedb_ansys.log' -> 'C:\\Users\\ansys\\AppData\\Local\\Temp\\pyedb_ansys.log.1'
Call stack:
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel_launcher.py", line 18, in <module>
app.launch_new_instance()
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\traitlets\config\application.py", line 1075, in launch_instance
app.start()
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\kernelapp.py", line 739, in start
self.io_loop.start()
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\tornado\platform\asyncio.py", line 205, in start
self.asyncio_loop.run_forever()
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\asyncio\base_events.py", line 603, in run_forever
self._run_once()
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\asyncio\base_events.py", line 1909, in _run_once
handle._run()
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\asyncio\events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\kernelbase.py", line 545, in dispatch_queue
await self.process_one()
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\kernelbase.py", line 534, in process_one
await dispatch(*args)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\kernelbase.py", line 437, in dispatch_shell
await result
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\ipkernel.py", line 362, in execute_request
await super().execute_request(stream, ident, parent)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\kernelbase.py", line 778, in execute_request
reply_content = await reply_content
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\ipkernel.py", line 449, in do_execute
res = shell.run_cell(
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\zmqshell.py", line 549, in run_cell
return super().run_cell(*args, **kwargs)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\IPython\core\interactiveshell.py", line 3075, in run_cell
result = self._run_cell(
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\IPython\core\interactiveshell.py", line 3130, in _run_cell
result = runner(coro)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\IPython\core\async_helpers.py", line 128, in _pseudo_sync_runner
coro.send(None)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\IPython\core\interactiveshell.py", line 3334, in run_cell_async
has_raised = await self.run_ast_nodes(code_ast.body, cell_name,
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\IPython\core\interactiveshell.py", line 3517, in run_ast_nodes
if await self.run_code(code, result, async_=asy):
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\IPython\core\interactiveshell.py", line 3577, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "C:\Users\ansys\AppData\Local\Temp\ipykernel_6384\2802990563.py", line 5, in <module>
edb = pyedb.Edb(edbpath=aedb_path, edbversion=edb_version)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\pyedb\generic\design_types.py", line 110, in Edb
return app(
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\pyedb\dotnet\edb.py", line 196, in __init__
Database.__init__(self, edbversion=edbversion, student_version=student_version)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\pyedb\dotnet\edb_core\dotnet\database.py", line 802, in __init__
EdbDotNet.__init__(self, edbversion=edbversion, student_version=student_version)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\pyedb\dotnet\edb_core\dotnet\database.py", line 709, in __init__
self._logger.info("Logger is initialized in EDB.")
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\pyedb\edb_logger.py", line 346, in info
return self._log_on_handler(0, msg, *args, **kwargs)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\pyedb\edb_logger.py", line 293, in _log_on_handler
self._global.info(message_text, *args, **kwargs)
Message: 'Logger is initialized in EDB.'
Arguments: ()
--- Logging error ---
Traceback (most recent call last):
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\logging\handlers.py", line 74, in emit
self.doRollover()
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\logging\handlers.py", line 179, in doRollover
self.rotate(self.baseFilename, dfn)
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\logging\handlers.py", line 115, in rotate
os.rename(source, dest)
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\ansys\\AppData\\Local\\Temp\\pyedb_ansys.log' -> 'C:\\Users\\ansys\\AppData\\Local\\Temp\\pyedb_ansys.log.1'
Call stack:
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel_launcher.py", line 18, in <module>
app.launch_new_instance()
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\traitlets\config\application.py", line 1075, in launch_instance
app.start()
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\kernelapp.py", line 739, in start
self.io_loop.start()
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\tornado\platform\asyncio.py", line 205, in start
self.asyncio_loop.run_forever()
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\asyncio\base_events.py", line 603, in run_forever
self._run_once()
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\asyncio\base_events.py", line 1909, in _run_once
handle._run()
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\asyncio\events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\kernelbase.py", line 545, in dispatch_queue
await self.process_one()
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\kernelbase.py", line 534, in process_one
await dispatch(*args)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\kernelbase.py", line 437, in dispatch_shell
await result
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\ipkernel.py", line 362, in execute_request
await super().execute_request(stream, ident, parent)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\kernelbase.py", line 778, in execute_request
reply_content = await reply_content
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\ipkernel.py", line 449, in do_execute
res = shell.run_cell(
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\zmqshell.py", line 549, in run_cell
return super().run_cell(*args, **kwargs)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\IPython\core\interactiveshell.py", line 3075, in run_cell
result = self._run_cell(
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\IPython\core\interactiveshell.py", line 3130, in _run_cell
result = runner(coro)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\IPython\core\async_helpers.py", line 128, in _pseudo_sync_runner
coro.send(None)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\IPython\core\interactiveshell.py", line 3334, in run_cell_async
has_raised = await self.run_ast_nodes(code_ast.body, cell_name,
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\IPython\core\interactiveshell.py", line 3517, in run_ast_nodes
if await self.run_code(code, result, async_=asy):
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\IPython\core\interactiveshell.py", line 3577, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "C:\Users\ansys\AppData\Local\Temp\ipykernel_6384\2802990563.py", line 5, in <module>
edb = pyedb.Edb(edbpath=aedb_path, edbversion=edb_version)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\pyedb\generic\design_types.py", line 110, in Edb
return app(
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\pyedb\dotnet\edb.py", line 196, in __init__
Database.__init__(self, edbversion=edbversion, student_version=student_version)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\pyedb\dotnet\edb_core\dotnet\database.py", line 802, in __init__
EdbDotNet.__init__(self, edbversion=edbversion, student_version=student_version)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\pyedb\dotnet\edb_core\dotnet\database.py", line 710, in __init__
self._logger.info("legacy v%s", __version__)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\pyedb\edb_logger.py", line 346, in info
return self._log_on_handler(0, msg, *args, **kwargs)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\pyedb\edb_logger.py", line 293, in _log_on_handler
self._global.info(message_text, *args, **kwargs)
Message: 'legacy v%s'
Arguments: ('0.34.3',)
--- Logging error ---
Traceback (most recent call last):
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\logging\handlers.py", line 74, in emit
self.doRollover()
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\logging\handlers.py", line 179, in doRollover
self.rotate(self.baseFilename, dfn)
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\logging\handlers.py", line 115, in rotate
os.rename(source, dest)
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\ansys\\AppData\\Local\\Temp\\pyedb_ansys.log' -> 'C:\\Users\\ansys\\AppData\\Local\\Temp\\pyedb_ansys.log.1'
Call stack:
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel_launcher.py", line 18, in <module>
app.launch_new_instance()
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\traitlets\config\application.py", line 1075, in launch_instance
app.start()
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\kernelapp.py", line 739, in start
self.io_loop.start()
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\tornado\platform\asyncio.py", line 205, in start
self.asyncio_loop.run_forever()
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\asyncio\base_events.py", line 603, in run_forever
self._run_once()
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\asyncio\base_events.py", line 1909, in _run_once
handle._run()
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\asyncio\events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\kernelbase.py", line 545, in dispatch_queue
await self.process_one()
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\kernelbase.py", line 534, in process_one
await dispatch(*args)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\kernelbase.py", line 437, in dispatch_shell
await result
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\ipkernel.py", line 362, in execute_request
await super().execute_request(stream, ident, parent)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\kernelbase.py", line 778, in execute_request
reply_content = await reply_content
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\ipkernel.py", line 449, in do_execute
res = shell.run_cell(
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\zmqshell.py", line 549, in run_cell
return super().run_cell(*args, **kwargs)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\IPython\core\interactiveshell.py", line 3075, in run_cell
result = self._run_cell(
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\IPython\core\interactiveshell.py", line 3130, in _run_cell
result = runner(coro)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\IPython\core\async_helpers.py", line 128, in _pseudo_sync_runner
coro.send(None)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\IPython\core\interactiveshell.py", line 3334, in run_cell_async
has_raised = await self.run_ast_nodes(code_ast.body, cell_name,
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\IPython\core\interactiveshell.py", line 3517, in run_ast_nodes
if await self.run_code(code, result, async_=asy):
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\IPython\core\interactiveshell.py", line 3577, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "C:\Users\ansys\AppData\Local\Temp\ipykernel_6384\2802990563.py", line 5, in <module>
edb = pyedb.Edb(edbpath=aedb_path, edbversion=edb_version)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\pyedb\generic\design_types.py", line 110, in Edb
return app(
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\pyedb\dotnet\edb.py", line 196, in __init__
Database.__init__(self, edbversion=edbversion, student_version=student_version)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\pyedb\dotnet\edb_core\dotnet\database.py", line 802, in __init__
EdbDotNet.__init__(self, edbversion=edbversion, student_version=student_version)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\pyedb\dotnet\edb_core\dotnet\database.py", line 711, in __init__
self._logger.info("Python version %s", sys.version)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\pyedb\edb_logger.py", line 346, in info
return self._log_on_handler(0, msg, *args, **kwargs)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\pyedb\edb_logger.py", line 293, in _log_on_handler
self._global.info(message_text, *args, **kwargs)
Message: 'Python version %s'
Arguments: ('3.10.11 (tags/v3.10.11:7d4cc5a, Apr 5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)]',)
PyEDB INFO: EDB C:\Users\ansys\AppData\Local\Temp\tmpaynjw7_b.ansys\parametric_via.aedb created correctly.
PyEDB INFO: EDB initialized.
--- Logging error ---
Traceback (most recent call last):
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\logging\handlers.py", line 74, in emit
self.doRollover()
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\logging\handlers.py", line 179, in doRollover
self.rotate(self.baseFilename, dfn)
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\logging\handlers.py", line 115, in rotate
os.rename(source, dest)
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\ansys\\AppData\\Local\\Temp\\pyedb_ansys.log' -> 'C:\\Users\\ansys\\AppData\\Local\\Temp\\pyedb_ansys.log.1'
Call stack:
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel_launcher.py", line 18, in <module>
app.launch_new_instance()
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\traitlets\config\application.py", line 1075, in launch_instance
app.start()
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\kernelapp.py", line 739, in start
self.io_loop.start()
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\tornado\platform\asyncio.py", line 205, in start
self.asyncio_loop.run_forever()
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\asyncio\base_events.py", line 603, in run_forever
self._run_once()
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\asyncio\base_events.py", line 1909, in _run_once
handle._run()
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\asyncio\events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\kernelbase.py", line 545, in dispatch_queue
await self.process_one()
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\kernelbase.py", line 534, in process_one
await dispatch(*args)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\kernelbase.py", line 437, in dispatch_shell
await result
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\ipkernel.py", line 362, in execute_request
await super().execute_request(stream, ident, parent)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\kernelbase.py", line 778, in execute_request
reply_content = await reply_content
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\ipkernel.py", line 449, in do_execute
res = shell.run_cell(
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\zmqshell.py", line 549, in run_cell
return super().run_cell(*args, **kwargs)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\IPython\core\interactiveshell.py", line 3075, in run_cell
result = self._run_cell(
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\IPython\core\interactiveshell.py", line 3130, in _run_cell
result = runner(coro)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\IPython\core\async_helpers.py", line 128, in _pseudo_sync_runner
coro.send(None)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\IPython\core\interactiveshell.py", line 3334, in run_cell_async
has_raised = await self.run_ast_nodes(code_ast.body, cell_name,
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\IPython\core\interactiveshell.py", line 3517, in run_ast_nodes
if await self.run_code(code, result, async_=asy):
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\IPython\core\interactiveshell.py", line 3577, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "C:\Users\ansys\AppData\Local\Temp\ipykernel_6384\2802990563.py", line 5, in <module>
edb = pyedb.Edb(edbpath=aedb_path, edbversion=edb_version)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\pyedb\generic\design_types.py", line 110, in Edb
return app(
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\pyedb\dotnet\edb.py", line 271, in __init__
self.logger.info("EDB %s created correctly.", self.edbpath)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\pyedb\edb_logger.py", line 346, in info
return self._log_on_handler(0, msg, *args, **kwargs)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\pyedb\edb_logger.py", line 293, in _log_on_handler
self._global.info(message_text, *args, **kwargs)
Message: 'EDB %s created correctly.'
Arguments: ('C:\\Users\\ansys\\AppData\\Local\\Temp\\tmpaynjw7_b.ansys\\parametric_via.aedb',)
--- Logging error ---
Traceback (most recent call last):
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\logging\handlers.py", line 74, in emit
self.doRollover()
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\logging\handlers.py", line 179, in doRollover
self.rotate(self.baseFilename, dfn)
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\logging\handlers.py", line 115, in rotate
os.rename(source, dest)
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\ansys\\AppData\\Local\\Temp\\pyedb_ansys.log' -> 'C:\\Users\\ansys\\AppData\\Local\\Temp\\pyedb_ansys.log.1'
Call stack:
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel_launcher.py", line 18, in <module>
app.launch_new_instance()
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\traitlets\config\application.py", line 1075, in launch_instance
app.start()
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\kernelapp.py", line 739, in start
self.io_loop.start()
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\tornado\platform\asyncio.py", line 205, in start
self.asyncio_loop.run_forever()
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\asyncio\base_events.py", line 603, in run_forever
self._run_once()
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\asyncio\base_events.py", line 1909, in _run_once
handle._run()
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\asyncio\events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\kernelbase.py", line 545, in dispatch_queue
await self.process_one()
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\kernelbase.py", line 534, in process_one
await dispatch(*args)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\kernelbase.py", line 437, in dispatch_shell
await result
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\ipkernel.py", line 362, in execute_request
await super().execute_request(stream, ident, parent)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\kernelbase.py", line 778, in execute_request
reply_content = await reply_content
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\ipkernel.py", line 449, in do_execute
res = shell.run_cell(
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\zmqshell.py", line 549, in run_cell
return super().run_cell(*args, **kwargs)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\IPython\core\interactiveshell.py", line 3075, in run_cell
result = self._run_cell(
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\IPython\core\interactiveshell.py", line 3130, in _run_cell
result = runner(coro)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\IPython\core\async_helpers.py", line 128, in _pseudo_sync_runner
coro.send(None)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\IPython\core\interactiveshell.py", line 3334, in run_cell_async
has_raised = await self.run_ast_nodes(code_ast.body, cell_name,
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\IPython\core\interactiveshell.py", line 3517, in run_ast_nodes
if await self.run_code(code, result, async_=asy):
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\IPython\core\interactiveshell.py", line 3577, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "C:\Users\ansys\AppData\Local\Temp\ipykernel_6384\2802990563.py", line 5, in <module>
edb = pyedb.Edb(edbpath=aedb_path, edbversion=edb_version)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\pyedb\generic\design_types.py", line 110, in Edb
return app(
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\pyedb\dotnet\edb.py", line 278, in __init__
self.logger.info("EDB initialized.")
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\pyedb\edb_logger.py", line 346, in info
return self._log_on_handler(0, msg, *args, **kwargs)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\pyedb\edb_logger.py", line 293, in _log_on_handler
self._global.info(message_text, *args, **kwargs)
Message: 'EDB initialized.'
Arguments: ()
Insert the stackup layers.
[7]:
layout_count = 12
diel_material_name = "FR4_epoxy"
diel_thickness = "0.15mm"
cond_thickness_outer = "0.05mm"
cond_thickness_inner = "0.017mm"
soldermask_thickness = "0.05mm"
trace_in_layer = "TOP"
trace_out_layer = "L10"
gvia_num = 10
gvia_angle = 30
edb.stackup.create_symmetric_stackup(
layer_count=layout_count,
inner_layer_thickness=cond_thickness_inner,
outer_layer_thickness=cond_thickness_outer,
soldermask_thickness=soldermask_thickness,
dielectric_thickness=diel_thickness,
dielectric_material=diel_material_name,
)
[7]:
True
Define parameters#
Define parameters to allow changes in the model dimesons. Parameters preceded by the $
character have project-wide scope. Without the $
prefix, the parameter scope is limited to the design.
[8]:
giva_angle_rad = gvia_angle / 180 * np.pi
edb["$via_hole_size"] = "0.3mm"
edb["$antipaddiam"] = "0.7mm"
edb["$paddiam"] = "0.5mm"
edb.add_design_variable("via_pitch", "1mm", is_parameter=True)
edb.add_design_variable("trace_in_width", "0.2mm", is_parameter=True)
edb.add_design_variable("trace_out_width", "0.1mm", is_parameter=True)
[8]:
(True, <Ansys.Ansoft.Edb.Utility.VariableServer object at 0x000001A5F32996C0>)
Define padstacks#
Create two padstck definitions, one for the ground via and one for the signal via.
[9]:
edb.padstacks.create(
padstackname="SVIA",
holediam="$via_hole_size",
antipaddiam="$antipaddiam",
paddiam="$paddiam",
start_layer=trace_in_layer,
stop_layer=trace_out_layer,
)
edb.padstacks.create(padstackname="GVIA", holediam="0.3mm", antipaddiam="0.7mm", paddiam="0.5mm")
PyEDB INFO: Padstack SVIA create correctly
PyEDB INFO: Padstack GVIA create correctly
--- Logging error ---
Traceback (most recent call last):
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\logging\handlers.py", line 74, in emit
self.doRollover()
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\logging\handlers.py", line 179, in doRollover
self.rotate(self.baseFilename, dfn)
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\logging\handlers.py", line 115, in rotate
os.rename(source, dest)
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\ansys\\AppData\\Local\\Temp\\pyedb_ansys.log' -> 'C:\\Users\\ansys\\AppData\\Local\\Temp\\pyedb_ansys.log.1'
Call stack:
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel_launcher.py", line 18, in <module>
app.launch_new_instance()
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\traitlets\config\application.py", line 1075, in launch_instance
app.start()
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\kernelapp.py", line 739, in start
self.io_loop.start()
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\tornado\platform\asyncio.py", line 205, in start
self.asyncio_loop.run_forever()
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\asyncio\base_events.py", line 603, in run_forever
self._run_once()
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\asyncio\base_events.py", line 1909, in _run_once
handle._run()
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\asyncio\events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\kernelbase.py", line 545, in dispatch_queue
await self.process_one()
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\kernelbase.py", line 534, in process_one
await dispatch(*args)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\kernelbase.py", line 437, in dispatch_shell
await result
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\ipkernel.py", line 362, in execute_request
await super().execute_request(stream, ident, parent)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\kernelbase.py", line 778, in execute_request
reply_content = await reply_content
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\ipkernel.py", line 449, in do_execute
res = shell.run_cell(
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\zmqshell.py", line 549, in run_cell
return super().run_cell(*args, **kwargs)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\IPython\core\interactiveshell.py", line 3075, in run_cell
result = self._run_cell(
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\IPython\core\interactiveshell.py", line 3130, in _run_cell
result = runner(coro)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\IPython\core\async_helpers.py", line 128, in _pseudo_sync_runner
coro.send(None)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\IPython\core\interactiveshell.py", line 3334, in run_cell_async
has_raised = await self.run_ast_nodes(code_ast.body, cell_name,
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\IPython\core\interactiveshell.py", line 3517, in run_ast_nodes
if await self.run_code(code, result, async_=asy):
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\IPython\core\interactiveshell.py", line 3577, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "C:\Users\ansys\AppData\Local\Temp\ipykernel_6384\3601094185.py", line 1, in <module>
edb.padstacks.create(
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\pyedb\dotnet\edb_core\padstack.py", line 1073, in create
self._logger.info("Padstack %s create correctly", padstackname)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\pyedb\edb_logger.py", line 346, in info
return self._log_on_handler(0, msg, *args, **kwargs)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\pyedb\edb_logger.py", line 293, in _log_on_handler
self._global.info(message_text, *args, **kwargs)
Message: 'Padstack %s create correctly'
Arguments: ('SVIA',)
--- Logging error ---
Traceback (most recent call last):
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\logging\handlers.py", line 74, in emit
self.doRollover()
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\logging\handlers.py", line 179, in doRollover
self.rotate(self.baseFilename, dfn)
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\logging\handlers.py", line 115, in rotate
os.rename(source, dest)
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\ansys\\AppData\\Local\\Temp\\pyedb_ansys.log' -> 'C:\\Users\\ansys\\AppData\\Local\\Temp\\pyedb_ansys.log.1'
Call stack:
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel_launcher.py", line 18, in <module>
app.launch_new_instance()
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\traitlets\config\application.py", line 1075, in launch_instance
app.start()
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\kernelapp.py", line 739, in start
self.io_loop.start()
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\tornado\platform\asyncio.py", line 205, in start
self.asyncio_loop.run_forever()
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\asyncio\base_events.py", line 603, in run_forever
self._run_once()
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\asyncio\base_events.py", line 1909, in _run_once
handle._run()
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\asyncio\events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\kernelbase.py", line 545, in dispatch_queue
await self.process_one()
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\kernelbase.py", line 534, in process_one
await dispatch(*args)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\kernelbase.py", line 437, in dispatch_shell
await result
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\ipkernel.py", line 362, in execute_request
await super().execute_request(stream, ident, parent)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\kernelbase.py", line 778, in execute_request
reply_content = await reply_content
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\ipkernel.py", line 449, in do_execute
res = shell.run_cell(
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\zmqshell.py", line 549, in run_cell
return super().run_cell(*args, **kwargs)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\IPython\core\interactiveshell.py", line 3075, in run_cell
result = self._run_cell(
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\IPython\core\interactiveshell.py", line 3130, in _run_cell
result = runner(coro)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\IPython\core\async_helpers.py", line 128, in _pseudo_sync_runner
coro.send(None)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\IPython\core\interactiveshell.py", line 3334, in run_cell_async
has_raised = await self.run_ast_nodes(code_ast.body, cell_name,
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\IPython\core\interactiveshell.py", line 3517, in run_ast_nodes
if await self.run_code(code, result, async_=asy):
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\IPython\core\interactiveshell.py", line 3577, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "C:\Users\ansys\AppData\Local\Temp\ipykernel_6384\3601094185.py", line 9, in <module>
edb.padstacks.create(padstackname="GVIA", holediam="0.3mm", antipaddiam="0.7mm", paddiam="0.5mm")
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\pyedb\dotnet\edb_core\padstack.py", line 1073, in create
self._logger.info("Padstack %s create correctly", padstackname)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\pyedb\edb_logger.py", line 346, in info
return self._log_on_handler(0, msg, *args, **kwargs)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\pyedb\edb_logger.py", line 293, in _log_on_handler
self._global.info(message_text, *args, **kwargs)
Message: 'Padstack %s create correctly'
Arguments: ('GVIA',)
[9]:
'GVIA'
Place the signal via.
[10]:
edb.padstacks.place([0, 0], "SVIA", net_name="RF")
[10]:
<pyedb.dotnet.edb_core.edb_data.padstacks_data.EDBPadstackInstance at 0x1a5f32ae920>
Place the ground vias.
[11]:
gvia_num_side = gvia_num / 2
if gvia_num_side % 2:
# Even number of ground vias on each side
edb.padstacks.place(["via_pitch", 0], "GVIA", net_name="GND")
edb.padstacks.place(["via_pitch*-1", 0], "GVIA", net_name="GND")
for i in np.arange(1, gvia_num_side / 2):
xloc = "{}*{}".format(np.cos(giva_angle_rad * i), "via_pitch")
yloc = "{}*{}".format(np.sin(giva_angle_rad * i), "via_pitch")
edb.padstacks.place([xloc, yloc], "GVIA", net_name="GND")
edb.padstacks.place([xloc, yloc + "*-1"], "GVIA", net_name="GND")
edb.padstacks.place([xloc + "*-1", yloc], "GVIA", net_name="GND")
edb.padstacks.place([xloc + "*-1", yloc + "*-1"], "GVIA", net_name="GND")
else:
# Odd number of ground vias on each side
for i in np.arange(0, gvia_num_side / 2):
xloc = "{}*{}".format(np.cos(giva_angle_rad * (i + 0.5)), "via_pitch")
yloc = "{}*{}".format(np.sin(giva_angle_rad * (i + 0.5)), "via_pitch")
edb.padstacks.place([xloc, yloc], "GVIA", net_name="GND")
edb.padstacks.place([xloc, yloc + "*-1"], "GVIA", net_name="GND")
edb.padstacks.place([xloc + "*-1", yloc], "GVIA", net_name="GND")
edb.padstacks.place([xloc + "*-1", yloc + "*-1"], "GVIA", net_name="GND")
Draw the traces
[12]:
edb.modeler.create_trace(
[[0, 0], [0, "-3mm"]],
layer_name=trace_in_layer,
net_name="RF",
width="trace_in_width",
start_cap_style="Flat",
end_cap_style="Flat",
)
edb.modeler.create_trace(
[[0, 0], [0, "3mm"]],
layer_name=trace_out_layer,
net_name="RF",
width="trace_out_width",
start_cap_style="Flat",
end_cap_style="Flat",
)
[12]:
<pyedb.dotnet.edb_core.cell.primitive.path.Path at 0x1a5f332b3d0>
Draw ground conductors
[13]:
ground_layers = [i for i in edb.stackup.signal_layers.keys()]
ground_layers.remove(trace_in_layer)
ground_layers.remove(trace_out_layer)
create_ground_planes(edb=edb, layers=ground_layers)
Display the layout
[14]:
edb.stackup.plot(plot_definitions=["GVIA", "SVIA"])
C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\pyedb\dotnet\edb_core\stackup.py:2868: UserWarning: FigureCanvasAgg is non-interactive, and thus cannot be shown
plt.show()
[14]:
<module 'matplotlib.pyplot' from 'C:\\actions-runner\\_work\\pyedb\\pyedb\\.venv\\lib\\site-packages\\matplotlib\\pyplot.py'>
Save EDB and close the EDB.
[15]:
edb.save_edb()
edb.close_edb()
print("aedb Saved in {}".format(aedb_path))
PyEDB INFO: EDB file save time: 0.00ms
PyEDB INFO: EDB file release time: 0.00ms
aedb Saved in C:\Users\ansys\AppData\Local\Temp\tmpaynjw7_b.ansys\parametric_via.aedb
--- Logging error ---
Traceback (most recent call last):
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\logging\handlers.py", line 74, in emit
self.doRollover()
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\logging\handlers.py", line 179, in doRollover
self.rotate(self.baseFilename, dfn)
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\logging\handlers.py", line 115, in rotate
os.rename(source, dest)
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\ansys\\AppData\\Local\\Temp\\pyedb_ansys.log' -> 'C:\\Users\\ansys\\AppData\\Local\\Temp\\pyedb_ansys.log.1'
Call stack:
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel_launcher.py", line 18, in <module>
app.launch_new_instance()
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\traitlets\config\application.py", line 1075, in launch_instance
app.start()
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\kernelapp.py", line 739, in start
self.io_loop.start()
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\tornado\platform\asyncio.py", line 205, in start
self.asyncio_loop.run_forever()
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\asyncio\base_events.py", line 603, in run_forever
self._run_once()
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\asyncio\base_events.py", line 1909, in _run_once
handle._run()
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\asyncio\events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\kernelbase.py", line 545, in dispatch_queue
await self.process_one()
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\kernelbase.py", line 534, in process_one
await dispatch(*args)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\kernelbase.py", line 437, in dispatch_shell
await result
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\ipkernel.py", line 362, in execute_request
await super().execute_request(stream, ident, parent)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\kernelbase.py", line 778, in execute_request
reply_content = await reply_content
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\ipkernel.py", line 449, in do_execute
res = shell.run_cell(
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\zmqshell.py", line 549, in run_cell
return super().run_cell(*args, **kwargs)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\IPython\core\interactiveshell.py", line 3075, in run_cell
result = self._run_cell(
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\IPython\core\interactiveshell.py", line 3130, in _run_cell
result = runner(coro)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\IPython\core\async_helpers.py", line 128, in _pseudo_sync_runner
coro.send(None)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\IPython\core\interactiveshell.py", line 3334, in run_cell_async
has_raised = await self.run_ast_nodes(code_ast.body, cell_name,
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\IPython\core\interactiveshell.py", line 3517, in run_ast_nodes
if await self.run_code(code, result, async_=asy):
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\IPython\core\interactiveshell.py", line 3577, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "C:\Users\ansys\AppData\Local\Temp\ipykernel_6384\2410814316.py", line 1, in <module>
edb.save_edb()
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\pyedb\dotnet\edb.py", line 1374, in save_edb
self.logger.info("EDB file save time: {0:.2f}ms".format(elapsed_time * 1000.0))
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\pyedb\edb_logger.py", line 346, in info
return self._log_on_handler(0, msg, *args, **kwargs)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\pyedb\edb_logger.py", line 293, in _log_on_handler
self._global.info(message_text, *args, **kwargs)
Message: 'EDB file save time: 0.00ms'
Arguments: ()
--- Logging error ---
Traceback (most recent call last):
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\logging\handlers.py", line 74, in emit
self.doRollover()
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\logging\handlers.py", line 179, in doRollover
self.rotate(self.baseFilename, dfn)
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\logging\handlers.py", line 115, in rotate
os.rename(source, dest)
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\ansys\\AppData\\Local\\Temp\\pyedb_ansys.log' -> 'C:\\Users\\ansys\\AppData\\Local\\Temp\\pyedb_ansys.log.1'
Call stack:
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel_launcher.py", line 18, in <module>
app.launch_new_instance()
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\traitlets\config\application.py", line 1075, in launch_instance
app.start()
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\kernelapp.py", line 739, in start
self.io_loop.start()
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\tornado\platform\asyncio.py", line 205, in start
self.asyncio_loop.run_forever()
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\asyncio\base_events.py", line 603, in run_forever
self._run_once()
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\asyncio\base_events.py", line 1909, in _run_once
handle._run()
File "C:\actions-runner\_work\_tool\Python\3.10.11\x64\lib\asyncio\events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\kernelbase.py", line 545, in dispatch_queue
await self.process_one()
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\kernelbase.py", line 534, in process_one
await dispatch(*args)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\kernelbase.py", line 437, in dispatch_shell
await result
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\ipkernel.py", line 362, in execute_request
await super().execute_request(stream, ident, parent)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\kernelbase.py", line 778, in execute_request
reply_content = await reply_content
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\ipkernel.py", line 449, in do_execute
res = shell.run_cell(
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\ipykernel\zmqshell.py", line 549, in run_cell
return super().run_cell(*args, **kwargs)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\IPython\core\interactiveshell.py", line 3075, in run_cell
result = self._run_cell(
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\IPython\core\interactiveshell.py", line 3130, in _run_cell
result = runner(coro)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\IPython\core\async_helpers.py", line 128, in _pseudo_sync_runner
coro.send(None)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\IPython\core\interactiveshell.py", line 3334, in run_cell_async
has_raised = await self.run_ast_nodes(code_ast.body, cell_name,
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\IPython\core\interactiveshell.py", line 3517, in run_ast_nodes
if await self.run_code(code, result, async_=asy):
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\IPython\core\interactiveshell.py", line 3577, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "C:\Users\ansys\AppData\Local\Temp\ipykernel_6384\2410814316.py", line 2, in <module>
edb.close_edb()
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\pyedb\dotnet\edb.py", line 1357, in close_edb
self.logger.info("EDB file release time: {0:.2f}ms".format(elapsed_time * 1000.0))
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\pyedb\edb_logger.py", line 346, in info
return self._log_on_handler(0, msg, *args, **kwargs)
File "C:\actions-runner\_work\pyedb\pyedb\.venv\lib\site-packages\pyedb\edb_logger.py", line 293, in _log_on_handler
self._global.info(message_text, *args, **kwargs)
Message: 'EDB file release time: 0.00ms'
Arguments: ()
Clean up the temporary directory.
[16]:
temp_dir.cleanup()