diff --git a/README.md b/README.md index 48b15766..820c52a0 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,7 @@ The OpenRAM compiler has very few dependencies: + [Ngspice] 26 (or later) or HSpice I-2013.12-1 (or later) or CustomSim 2017 (or later) or [Xyce] 7.2 (or later) + Python 3.5 or higher + Various Python packages (pip install -r requirements.txt) ++ [Git] If you want to perform DRC and LVS, you will need either: + Calibre (for [FreePDK45]) @@ -215,6 +216,7 @@ If I forgot to add you, please let me know! [Qflow]: http://opencircuitdesign.com/qflow/history.html [Ngspice]: http://ngspice.sourceforge.net/ [Xyce]: http://xyce.sandia.gov/ +[Git]: https://git-scm.com/ [OSUPDK]: https://vlsiarch.ecen.okstate.edu/flow/ [FreePDK45]: https://www.eda.ncsu.edu/wiki/FreePDK45:Contents diff --git a/compiler/characterizer/lib.py b/compiler/characterizer/lib.py index 68539aa5..65089297 100644 --- a/compiler/characterizer/lib.py +++ b/compiler/characterizer/lib.py @@ -762,7 +762,7 @@ class lib: else: with open(os.devnull, 'wb') as devnull: - # parses the mose recent git commit id - requres git is installed + # parses the most recent git commit id - reason for global git dependancy proc = subprocess.Popen(['git','rev-parse','HEAD'], cwd=os.path.abspath(os.environ.get("OPENRAM_HOME")) + '/', stdout=subprocess.PIPE) git_id = str(proc.stdout.read()) diff --git a/compiler/globals.py b/compiler/globals.py index 50960fdc..15bb4fe9 100644 --- a/compiler/globals.py +++ b/compiler/globals.py @@ -159,6 +159,13 @@ def check_versions(): if not (major_python_version == major_required and minor_python_version >= minor_required): debug.error("Python {0}.{1} or greater is required.".format(major_required, minor_required), -1) + # Verify any version of git is isntalled before proceeding + try: + subprocess.check_output(["git", "--version"]) + except: + debug.error("Git is required. Please install git.") + sys.exit(1) + # FIXME: Check versions of other tools here?? # or, this could be done in each module (e.g. verify, characterizer, etc.) global OPTS