Languages

CommunityCategory: GLISTERImporting multiple XMODEL source files into Cadence design database using a SKILL script

XMODEL GLISTER

Importing multiple XMODEL source files into Cadence design database using a SKILL script

SA Support Team Staff 2020-06-30

I have a large number of SystemVerilog or XMODEL source files externally developed and I want to import them into the Cadence design database. I hate to import each source file one-by-one using the GLISTER’s GUI menu. Is there a way to import them all at once using a script?

1 Answers
Best Answer
SA Support Team Staff 2020-06-30

Fortunately, yes! GLISTER provides a SKILL API function named xmodelImportCellView(), which is handy when importing multiple SystemVerilog/XMODEL source files at once. It has a basic usage outlined as below. For full usage information of this API function, please refer to the GLISTER User Guide (link).

xmodelImportCellView( srcFile libName [cellName] [viewName] [genSymbol] )

This API function imports a source file srcFile into a cellview with the library, cell, and view names of libName, cellName, and viewName, respectively. If you leave the argument cellName unspecified as nil, GLISTER will use the name of the first module found within the source file as the cell name. Another optional argument genSymbol with a possible value of t or nil indicates whether to create a new symbol or not, respectively (default: t).

The following two examples illustrate how to import multiple source files using this API function. The first example just executes the xmodelImportCellView() API function multiple times:

xmodelImportCellView( "mycell1.sv" "mylib" nil "xmodel" nil )
xmodelImportCellView( "mycell2.sv" "mylib" nil "xmodel" nil )
xmodelImportCellView( "mycell3.sv" "mylib" nil "xmodel" nil )

The second example uses more SKILL codes to find all the .sv files in a directory (e.g., /path/source_dir) and import them into the Cadence design database. Here, the xmodelFindFiles() function finds all the files located in a specified directory, of which names match to a given regular expression and return their names as a list.

srcPath = "/path/source_dir/"
srcList = xmodelFindFiles( "\\.sv$" srcPath )
foreach( srcFile srcList 
    xmodelImportCellView( strcat( srcPath srcFile ) "mylib" nil "xmodel" nil )
)

For more information on the SKILL programming language, please refer to the Cadence documentations.

GLISTER XMODEL

SKILL 스크립트를 사용해 다수의 XMODEL 소스 파일을 Cadence Virtuoso로 불러오는 방법

SA Support Team Staff 2020-06-30

저에게는 외부환경에서 작성한 SystemVerilog 또는 XMODEL 소스파일이 많이 있고, 이제 그 소스파일들을 Cadence design database 안으로 import하고 싶습니다. 하지만, GLISTER의 GUI 메뉴를 이용해서 하나하나씩 import하는 것은 엄두가 나지 않네요. 스크립트 같은 것을 써서 이 파일들을 한꺼번에 import하는 방법이 있을까요?

1 Answers
Best Answer
SA Support Team Staff 2020-06-30

Fortunately, yes! GLISTER provides a SKILL API function named xmodelImportCellView(), which is handy when importing multiple SystemVerilog/XMODEL source files at once. It has a basic usage outlined as below. For full usage information of this API function, please refer to the GLISTER User Guide (link).

xmodelImportCellView( srcFile libName [cellName] [viewName] [genSymbol] )

This API function imports a source file srcFile into a cellview with the library, cell, and view names of libName, cellName, and viewName, respectively. If you leave the argument cellName unspecified as nil, GLISTER will use the name of the first module found within the source file as the cell name. Another optional argument genSymbol with a possible value of t or nil indicates whether to create a new symbol or not, respectively (default: t).

The following two examples illustrate how to import multiple source files using this API function. The first example just executes the xmodelImportCellView() API function multiple times:

xmodelImportCellView( "mycell1.sv" "mylib" nil "xmodel" nil )
xmodelImportCellView( "mycell2.sv" "mylib" nil "xmodel" nil )
xmodelImportCellView( "mycell3.sv" "mylib" nil "xmodel" nil )

The second example uses more SKILL codes to find all the .sv files in a directory (e.g., /path/source_dir) and import them into the Cadence design database. Here, the xmodelFindFiles() function finds all the files located in a specified directory, of which names match to a given regular expression and return their names as a list.

srcPath = "/path/source_dir/"
srcList = xmodelFindFiles( "\\.sv$" srcPath )
foreach( srcFile srcList 
    xmodelImportCellView( strcat( srcPath srcFile ) "mylib" nil "xmodel" nil )
)

For more information on the SKILL programming language, please refer to the Cadence documentations.