From: Luke Kenneth Casson Leighton Date: Thu, 1 Apr 2021 14:03:32 +0000 (+0100) Subject: compile all libraries, use --std=08 it passes X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7a20dce6fca74f27c537264dfea95fdeccb63e9c;p=soc-cocotb-sim.git compile all libraries, use --std=08 it passes --- diff --git a/ls180/vhd2obj.py b/ls180/vhd2obj.py index 80c17a7..596519e 100644 --- a/ls180/vhd2obj.py +++ b/ls180/vhd2obj.py @@ -1,25 +1,28 @@ #!/usr/bin/env python3 -"""builds nsxlib VHD files into object files using ghdl +"""builds nsxlib and other VHD files into object files using ghdl """ import os import sys -NSXLIB = "nsxlib" +SRC = [('nsxlib', 'vhd'), + ('niolib', 'vhd'), + ('vst_src', 'vst')] # make and change to obj dir os.system("mkdir -p obj") cwd = os.getcwd() os.chdir("obj") -# run ghdl -a on every nsxlib vhd file -for fname in os.listdir("../%s" % NSXLIB): - if not fname.endswith(".vhd"): - continue - print (fname) - prefix = fname[:-4] # strip ".vhd" - os.system("ghdl -a ../%s/%s" % (NSXLIB, fname)) +for srcdir, suffix in SRC: + # run ghdl -a on every vhd / vst file + for fname in os.listdir("../%s" % srcdir): + if not fname.endswith(".%s" % suffix): + continue + print (fname) + prefix = fname[:-4] # strip ".vhd" + os.system("ghdl -a -g --std=08 ../%s/%s" % (srcdir, fname)) # back to original dir os.chdir(cwd)