1
0
mirror of https://github.com/aolofsson/oh.git synced 2025-01-17 20:02:53 +08:00
oh/stdlib/stdlib.py
2022-09-29 22:21:04 -04:00

36 lines
842 B
Python

import sys
import os
import siliconcompiler
def main():
progname = "oh"
description = """
--------------------------------------------------------------
App for building the ebrick.
"""
UNSET_DESIGN = ' unset '
chip = siliconcompiler.Chip(UNSET_DESIGN)
chip.create_cmdline(progname,
switchlist=['-target', '-design'],
description=description)
# Set default flow
if not chip.get('option', 'target'):
chip.load_target("freepdk45_demo")
chip.set('input', 'verilog', f"rtl/{chip.get('design')}.v")
chip.add('option', 'ydir', 'rtl')
chip.set('option', 'quiet', True)
chip.set('option', 'steplist', ['import','syn'])
# Run through the flow
chip.run()
#########################
if __name__ == "__main__":
sys.exit(main())