Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
H
Hdlmake
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
15
Issues
15
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Hdlmake
Commits
f4cd55ee
Commit
f4cd55ee
authored
Apr 29, 2016
by
Javier D. Garcia-Lasheras
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'wkamp/master' into develop
parents
b43601ce
d52106b6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
6 deletions
+13
-6
qsys_hw_tcl_update.py
hdlmake/action/qsys_hw_tcl_update.py
+9
-2
dep_file.py
hdlmake/dep_file.py
+4
-4
No files found.
hdlmake/action/qsys_hw_tcl_update.py
View file @
f4cd55ee
...
...
@@ -22,22 +22,26 @@
from
.action
import
Action
import
hdlmake.new_dep_solver
as
dep_solver
import
os
import
shutil
import
logging
class
QsysHwTclUpdate
(
Action
):
def
run
(
self
):
file_set
=
self
.
modules_pool
.
build_limited_file_set
()
file_list
=
dep_solver
.
make_dependency_sorted_list
(
file_set
)
files_str
=
[
os
.
path
.
relpath
(
f
.
path
)
for
f
in
file_list
]
#print(self.options.delimiter.join(files_str))
tl
=
" TOP_LEVEL_FILE"
file_tcl
=
[]
for
fs
in
reversed
(
files_str
):
path
,
fname
=
os
.
path
.
split
(
fs
)
file_tcl
.
append
(
"add_fileset_file
%
30
s VHDL PATH
%
s
%
s
\n
"
%
(
fname
,
fs
,
tl
))
file_tcl
.
append
(
"add_fileset_file
%
s VHDL PATH
%
s
%
s
\n
"
%
(
fname
,
fs
,
tl
))
tl
=
""
hw_tcl_filename
=
self
.
modules_pool
.
get_top_module
()
.
hw_tcl_filename
;
hw_tcl_filename_backup
=
hw_tcl_filename
+
".bak"
shutil
.
copy2
(
hw_tcl_filename
,
hw_tcl_filename_backup
)
infile
=
open
(
hw_tcl_filename
,
"r"
)
inserted
=
False
...
...
@@ -52,6 +56,9 @@ class QsysHwTclUpdate(Action):
infile
.
close
()
logging
.
info
(
"Updating the file list in
%
s"
,
hw_tcl_filename
)
logging
.
info
(
"Old hw.tcl file backed up to
%
s"
,
hw_tcl_filename_backup
)
outfile
=
open
(
hw_tcl_filename
,
"w"
)
outfile
.
writelines
(
out_lines
)
outfile
.
close
()
hdlmake/dep_file.py
View file @
f4cd55ee
...
...
@@ -197,12 +197,12 @@ class DepFile(File):
if
self
.
dep_level
==
None
:
if
len
(
self
.
depends_on
)
==
0
:
self
.
dep_level
=
0
elif
self
.
dep_level
>=
1000000
:
raise
Exception
(
"Probably run into a circular reference of file dependencies."
)
else
:
# set
stupidly large value so
can detect if the recusion below brings us back to
# set
dep_level to a negative value so we
can detect if the recusion below brings us back to
# this file in a circular reference, that would otherwise result in an infinite loop.
self
.
dep_level
=
1000000
self
.
dep_level
=
-
1
# recurse, to find the largest number of levels below.
self
.
dep_level
=
1
+
max
([
dep
.
get_dep_level
()
for
dep
in
self
.
depends_on
]);
elif
self
.
dep_level
<
0
:
raise
Exception
(
"Probably run into a circular reference of file dependencies."
)
return
self
.
dep_level
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment