Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
Hdlmake
Manage
Activity
Members
Labels
Plan
Issues
20
Issue boards
Milestones
Wiki
Code
Merge requests
5
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Projects
Hdlmake
Commits
4cc195d9
Commit
4cc195d9
authored
13 years ago
by
Pawel Szostek
Browse files
Options
Downloads
Patches
Plain Diff
Recursive manifest search replaced with shallow search
parent
21987e70
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
synthesis/depend.py
+16
-3
16 additions, 3 deletions
synthesis/depend.py
synthesis/hdlmake.py
+10
-16
10 additions, 16 deletions
synthesis/hdlmake.py
with
26 additions
and
19 deletions
synthesis/depend.py
+
16
−
3
View file @
4cc195d9
...
...
@@ -8,6 +8,11 @@ import msg as p
std_libs
=
[
'
ieee
'
,
'
altera_mf
'
,
'
cycloneiii
'
,
'
lpm
'
,
'
std
'
,
'
unisim
'
]
def
try_utf8
(
data
):
try
:
return
data
.
decode
(
'
utf-8
'
)
except
UnicodeDecodeError
:
return
None
def
search_for_use
(
file
):
"""
...
...
@@ -15,8 +20,12 @@ def search_for_use(file):
non-standard library a tuple (lib, file) is returned in a list.
"""
f
=
open
(
file
,
"
r
"
)
text
=
f
.
readlines
()
data
=
f
.
read
()
text
=
try_utf8
(
data
)
if
text
is
None
:
return
[]
text
=
text
.
split
(
"
\n
"
)
ret
=
[]
use_pattern
=
re
.
compile
(
"
^[
\t
]*use[
\t
]+([^; ]+)[
\t
]*;.*$
"
)
lib_pattern
=
re
.
compile
(
"
([^.]+)\.([^.]+)\.all
"
)
...
...
@@ -41,7 +50,11 @@ def search_for_package(file):
from the file
"""
f
=
open
(
file
,
"
r
"
)
text
=
f
.
readlines
()
data
=
f
.
read
()
text
=
try_utf8
(
data
)
if
text
is
None
:
return
[]
text
=
text
.
split
(
"
\n
"
)
ret
=
[]
package_pattern
=
re
.
compile
(
"
^[
\t
]*package[
\t
]+([^
\t
]+)[
\t
]+is[
\t
]*$
"
)
...
...
This diff is collapsed.
Click to expand it.
synthesis/hdlmake.py
+
10
−
16
View file @
4cc195d9
...
...
@@ -138,25 +138,19 @@ def convert_xise(xise):
new_ise
.
append
(
line
+
"
\n
"
)
new_ise_file
=
open
(
xise
+
"
.new
"
,
"
w
"
)
def
search_for_manifest
(
search_path
):
"""
Look for manifest in the given folder
ans subfolders
Look for manifest in the given folder
"""
cmd
=
"
find -H
"
+
search_path
+
"
-name manifest.py
"
p
.
vprint
(
cmd
)
files
=
os
.
popen
(
cmd
).
readlines
()
if
len
(
files
)
==
0
:
p
.
vprint
(
"
No manifest found in:
"
+
search_path
)
return
None
elif
len
(
files
)
>
1
:
p
.
echo
(
"
Too many manifests in
"
+
search_path
+
"
:
"
+
str
(
files
))
return
files
[
0
].
strip
()
p
.
echo
(
"
Found manifest:
"
+
os
.
path
.
abspath
(
files
[
0
]).
strip
())
return
os
.
path
.
abspath
(
files
[
0
].
strip
())
p
.
vprint
(
"
Looking for manifest in
"
+
search_path
)
for
filename
in
os
.
listdir
(
search_path
):
if
filename
==
"
manifest.py
"
and
not
os
.
path
.
isdir
(
filename
):
p
.
echo
(
"
Found manifest:
"
+
os
.
path
.
abspath
(
search_path
+
'
/
'
+
filename
))
return
os
.
path
.
abspath
(
search_path
+
'
/
'
+
filename
)
# no manifest file found
return
None
def
check_address_length
(
module
):
p
=
module
.
popen
(
"
uname -a
"
)
p
=
p
.
readlines
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment