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
a1e17cb5
Commit
a1e17cb5
authored
Jul 16, 2016
by
Javier D. Garcia-Lasheras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A little bit of refactoring for a better code understanding
parent
bef97f5f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
9 deletions
+14
-9
__main__.py
hdlmake/__main__.py
+13
-8
module.py
hdlmake/module.py
+1
-1
No files found.
hdlmake/__main__.py
View file @
a1e17cb5
...
...
@@ -33,10 +33,6 @@ from .manifest_parser import ManifestParser
from
.module_pool
import
ModulePool
from
.env
import
Env
from
.
import
fetch
as
fetch_mod
from
.action
import
(
CheckCondition
,
CleanModules
,
FetchModules
,
ListFiles
,
ListModules
,
MergeCores
,
Tree
,
GenerateSimulationMakefile
,
GenerateSynthesisMakefile
,
GenerateRemoteSynthesisMakefile
,
GenerateSynthesisProject
,
QsysHwTclUpdate
,)
from
._version
import
__version__
...
...
@@ -95,18 +91,27 @@ def main():
sys
.
exit
(
"Exiting"
)
# Setting global variables for top_module and mod_pool:
# -- Note that this is redundant, we can get top_mod from mod_pool!
top_mod
=
modules_pool
.
get_top_module
()
_action_runner
(
options
,
modules_pool
,
env
)
def
_action_runner
(
options
,
modules_pool
,
env
):
from
.action
import
(
CheckCondition
,
CleanModules
,
FetchModules
,
ListFiles
,
ListModules
,
MergeCores
,
Tree
,
GenerateSimulationMakefile
,
GenerateSynthesisMakefile
,
GenerateRemoteSynthesisMakefile
,
GenerateSynthesisProject
,
QsysHwTclUpdate
,)
# #
# DECODE THE COMMANDS/ACTIONS HERE #
# #
top_mod
=
modules_pool
.
get_top_module
()
if
options
.
command
==
"check-env"
:
env
.
check_env
(
verbose
=
True
)
quit
()
elif
options
.
command
==
"check-manifest"
:
env
.
check_manifest
(
modules_pool
.
get_top_module
()
.
manifest
,
verbose
=
True
)
env
.
check_manifest
(
top_mod
.
manifest
,
verbose
=
True
)
quit
()
elif
options
.
command
==
"manifest-help"
:
ManifestParser
()
.
print_help
()
...
...
hdlmake/module.py
View file @
a1e17cb5
...
...
@@ -231,7 +231,7 @@ class Module(object):
if
self
.
isprocessed
is
True
:
return
if
self
.
manifest_dict
is
None
:
logging
.
debu
g
(
"There is no manifest to be processed in:
%
s"
%
self
.
url
)
logging
.
warnin
g
(
"There is no manifest to be processed in:
%
s"
%
self
.
url
)
return
logging
.
debug
(
"Process manifest in:
%
s"
%
self
.
path
)
if
self
.
manifest_dict
[
"syn_ise_version"
]
is
not
None
:
...
...
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