sram_factory: Allow a prefered module name

Signed-off-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
This commit is contained in:
Bastian Koppelmann 2019-12-18 11:58:04 +01:00
parent de6b207798
commit 451ef4d896
1 changed files with 13 additions and 11 deletions

View File

@ -31,7 +31,7 @@ class sram_factory:
"""
self.__init__()
def create(self, module_type, **kwargs):
def create(self, module_type, module_name=None, **kwargs):
"""
A generic function to create a module with a given module_type.
The args are passed directly to the module constructor.
@ -72,6 +72,8 @@ class sram_factory:
if obj_kwargs == kwargs:
return obj_item
# If no prefered module name is provided, we generate one.
if module_name is None:
# Use the default name if there are default arguments
# This is especially for library cells so that the
# spice and gds files can be found.