1
0
mirror of https://github.com/antonblanchard/microwatt.git synced 2026-04-25 12:01:42 +00:00

Initial import of microwatt

Signed-off-by: Anton Blanchard <anton@linux.ibm.com>
This commit is contained in:
Anton Blanchard
2019-08-22 16:46:13 +10:00
committed by Anton Blanchard
commit 5a29cb4699
2049 changed files with 38352 additions and 0 deletions

25
scripts/dependencies.py Executable file
View File

@@ -0,0 +1,25 @@
#!/usr/bin/python3
# Create makefile dependencies for VHDL files, looking for "use work" and
# "entity work" declarations
import sys
import re
work = re.compile('use work\.([^.]+)\.')
entity = re.compile('entity work\.(.*)')
for filename in sys.argv[1:]:
with open(filename, 'r') as f:
(basename, suffix) = filename.split('.')
print('%s.o:' % basename, end='')
for line in f:
m = work.search(line)
if m:
print(' %s.o' % m.group(1), end='')
m = entity.search(line)
if m:
print(' %s.o' % m.group(1), end='')
print()