075538ca202a0e360c8a9052ec1e0fa01b0f7607
2 """converts NIOLIB and NSXLIB from VBE into VHDL
8 # use the chroot to set up
9 # https://git.libre-soc.org/?p=dev-env-setup.git;a=blob;f=coriolis2-chroot;hb=HEAD
10 # reason for using the chroot: it's standardised across the ls180 project
12 VASY_CMD
= "schroot -c coriolis -d /tmp -- ~/alliance/install/bin/vasy"
13 ALLIANCEBASE
= "../alliance-check-toolkit/cells"
14 ALLIANCE_LIBS
= ['nsxlib', 'niolib']
16 for libname
in ALLIANCE_LIBS
:
18 NSXLIB
= "%s/%s" % (ALLIANCEBASE
, libname
)
20 os
.system("mkdir -p %s" % libname
)
22 for fname
in os
.listdir(NSXLIB
):
23 if not fname
.endswith(".vbe"):
26 prefix
= fname
[:-4] # strip ".vbe"
27 os
.system("cp %s/%s /tmp" % (NSXLIB
, fname
))
28 os
.system("rm -f /tmp/%s.vhd" % (prefix
))
29 os
.system("%s -s -I vbe %s %s" % (VASY_CMD
, fname
, prefix
))
30 os
.system("cp /tmp/%s.vhd %s" % (prefix
, libname
))