Skip to content

Latest commit

 

History

History
144 lines (114 loc) · 4.68 KB

README.md

File metadata and controls

144 lines (114 loc) · 4.68 KB

Virtue

GitHub release (latest by date including pre-releases) Conda PyPI GitHub issues PyPI - License

A SKILL and Python Framework for automating IC design in Cadence Virtuoso with the following goals:

  1. Bring the capabilities of skill to Python so (ideally) you don't have to write skill code to do EDA in Python
  2. In those cases where you do need to write skill, make it pythonic

Projects Built with Virtue

  • Softworks: Software and documentation view types in the Cadence Virtuoso IC design environment.
  • Data-panels: Export rich data reports from simulation results to pptx slides and xlsx tables
  • Morpheus: Generate Maestro test benches in a standard way compatible with an associated data-panels report

YouTube Video Explanation

Features

Example SKILL++ Package

let((Str
     (module_description "String functions")
     (Module VrtImport['Module])
    )
Str = let(()

procedure(emptyp(in "g")
  "Checks if the input is an empty string
  @param Any type of object to be checked
  @return A boolean, 't if it is an empty string, otherwise nil"
  stringp(in) && strlen(in) == 0)

procedure(str2bool(input_string "t")
  "Converts a case-insensitive 'TRUE' or 'FALSE' string to a boolean
   ('t / nil) If it is not a boolean, the string is returned."
 if(stringp(input_string) && (upperCase(input_string) == "TRUE") then
   't
  else if(stringp(input_string) && (upperCase(input_string) == "FALSE") then
    nil
  else
    error("%s is not a boolean, must be \"TRUE\" or \"FALSE\"
           (case insensitive)" input_string)
  ))
)

list(nil
  'emptyp emptyp
  'str2bool str2bool
))

Module->New('Str Str
             ?package VrtImport['Virtue]
             ?description module_description)

)

Example Test Script

Note the package imports at the top

let(((Str VrtImport['Str])
     (Test VrtImport['Test])
     (Virtue VrtImport['Virtue])
    )

procedure(Test_emptyp()
    assert(Str->emptyp(""))
    assert(!Str->emptyp("test"))
)

procedure(Test_str2bool()
    assert(Str->str2bool("true"))
    assert(Str->str2bool("TRUE"))
    assert(!Str->str2bool("false"))
)

procedure(Test_str2bool_error()
    assert(!errset(Str->str2bool("Nothing")))
)

Test->RunFile(list(nil
  'Test_emptyp Test_emptyp
  'Test_str2bool Test_str2bool
  'Test_str2bool_error Test_str2bool_error
  )
  ?filepath Virtue->GetCurrentFilePath()
)

)

Prints out the following when ran in the CIW:

FILE: /path/to/file/test_Str.ils
  passed: Test_emptyp
  passed: Test_str2bool
  passed: Test_str2bool_error
3 / 3 tests passed

Installation

Virtue requires Python >= 3.7 and can be installed using several methods:

  • Conda
  • Pip
  • From source

See the installation instructions in the documentation for detailed instructions.