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
e7dbe3de
Commit
e7dbe3de
authored
Sep 23, 2013
by
Paweł Szostek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move dep solving to global file list building
parent
191d81d5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
10 deletions
+10
-10
ise_project.py
hdlmake/action/ise_project.py
+0
-1
quartus_project.py
hdlmake/action/quartus_project.py
+0
-2
simulation.py
hdlmake/action/simulation.py
+0
-4
module.py
hdlmake/module.py
+2
-2
module_pool.py
hdlmake/module_pool.py
+8
-1
No files found.
hdlmake/action/ise_project.py
View file @
e7dbe3de
...
...
@@ -65,7 +65,6 @@ class GenerateISEProject(Action):
def
_handle_ise_project
(
self
,
update
=
False
):
top_mod
=
self
.
modules_pool
.
get_top_module
()
fileset
=
self
.
modules_pool
.
build_global_file_list
()
dep_solver
.
solve
(
fileset
)
flist
=
dep_solver
.
make_dependency_sorted_list
(
fileset
)
prj
=
ISEProject
(
ise
=
self
.
env
[
"ise_version"
],
...
...
hdlmake/action/quartus_project.py
View file @
e7dbe3de
...
...
@@ -47,7 +47,6 @@ class GenerateQuartusProject(Action):
top_mod
=
self
.
modules_pool
.
get_top_module
()
fileset
=
self
.
modules_pool
.
build_global_file_list
()
non_dependable
=
fileset
.
inversed_filter
(
DependableFile
)
fileset
=
dep_solver
.
solve
(
fileset
)
fileset
.
add
(
non_dependable
)
prj
=
QuartusProject
(
top_mod
.
syn_project
)
...
...
@@ -66,7 +65,6 @@ class GenerateQuartusProject(Action):
top_mod
=
self
.
modules_pool
.
get_top_module
()
fileset
=
self
.
modules_pool
.
build_global_file_list
()
non_dependable
=
fileset
.
inversed_filter
(
DependableFile
)
fileset
=
dep_solver
.
solve
(
fileset
)
fileset
.
add
(
non_dependable
)
prj
=
QuartusProject
(
top_mod
.
syn_project
)
prj
.
read
()
...
...
hdlmake/action/simulation.py
View file @
e7dbe3de
...
...
@@ -22,7 +22,6 @@
from
__future__
import
print_function
from
action
import
Action
import
logging
import
new_dep_solver
as
dep_solver
import
sys
import
global_mod
...
...
@@ -59,7 +58,6 @@ class GenerateSimulationMakefile(Action):
pool
=
self
.
modules_pool
top_module
=
pool
.
get_top_module
()
fset
=
pool
.
build_global_file_list
()
dep_solver
.
solve
(
fset
)
dep_files
=
fset
.
filter
(
DepFile
)
global_mod
.
makefile_writer
.
generate_vsim_makefile
(
dep_files
,
top_module
)
...
...
@@ -74,7 +72,6 @@ class GenerateSimulationMakefile(Action):
top_module
=
pool
.
get_top_module
()
fset
=
pool
.
build_global_file_list
()
dep_solver
.
solve
(
fset
)
global_mod
.
makefile_writer
.
generate_isim_makefile
(
fset
,
top_module
)
def
_generate_iverilog_makefile
(
self
):
...
...
@@ -87,5 +84,4 @@ class GenerateSimulationMakefile(Action):
tm
=
pool
.
get_top_module
()
fset
=
pool
.
build_global_file_list
()
dep_solver
.
solve
(
fset
)
global_mod
.
makefile_writer
.
generate_iverilog_makefile
(
fset
,
tm
,
pool
)
hdlmake/module.py
View file @
e7dbe3de
...
...
@@ -423,14 +423,14 @@ class Module(object):
return
False
filepath
=
os
.
path
.
join
(
self
.
path
,
filepath
)
if
not
os
.
path
.
exists
(
filepath
):
logging
.
error
(
"Path specified in
%
s doesn't exist:
%
s"
%
(
self
.
path
,
filepath
))
logging
.
error
(
"Path specified in
manifest in
%
s doesn't exist:
%
s"
%
(
self
.
path
,
filepath
))
sys
.
exit
(
"Exiting"
)
filepath
=
path_mod
.
rel2abs
(
filepath
,
self
.
path
)
if
os
.
path
.
isdir
(
filepath
):
logging
.
warning
(
"Path specified in
%
s is a directory:
%
s"
%
(
self
.
path
,
filepath
))
logging
.
warning
(
"Path specified in
manifest
%
s is a directory:
%
s"
%
(
self
.
path
,
filepath
))
return
True
def
is_fetched_recursively
(
self
):
...
...
hdlmake/module_pool.py
View file @
e7dbe3de
...
...
@@ -37,6 +37,7 @@ class ModulePool(list):
list
.
__init__
(
self
,
*
args
)
self
.
top_module
=
None
self
.
global_fetch
=
os
.
getenv
(
"HDLMAKE_COREDIR"
)
self
.
_deps_solved
=
False
def
get_module_by_path
(
self
,
path
):
path
=
path_mod
.
rel2abs
(
path
)
...
...
@@ -60,6 +61,7 @@ class ModulePool(list):
def
new_module
(
self
,
parent
,
url
,
source
,
fetchto
,
process_manifest
=
True
):
from
module
import
Module
self
.
_deps_solved
=
False
if
source
!=
fetch
.
LOCAL
:
clean_url
,
branch
,
revision
=
path_mod
.
url_parse
(
url
)
else
:
...
...
@@ -179,6 +181,10 @@ class ModulePool(list):
else
:
logging
.
debug
(
"NOT appended to fetch queue: "
+
str
(
mod
.
url
))
def
solve_dependencies
(
self
):
dep_solver
.
solve
(
self
.
build_global_file_list
())
self
.
_deps_solved
=
True
def
build_global_file_list
(
self
):
from
srcfile
import
SourceFileSet
ret
=
SourceFileSet
()
...
...
@@ -190,7 +196,8 @@ class ModulePool(list):
from
srcfile
import
SourceFileSet
files
=
self
.
build_global_file_list
()
assert
isinstance
(
files
,
SourceFileSet
)
dep_solver
.
solve
(
files
)
if
not
self
.
_deps_solved
:
self
.
solve_dependencies
()
ret
=
[]
for
file
in
files
:
try
:
...
...
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