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
31f8fa67
Commit
31f8fa67
authored
Jul 27, 2016
by
Javier D. Garcia-Lasheras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactoring ModuleAltera.py
parent
c8692b97
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
9 deletions
+22
-9
altera.py
hdlmake/module/altera.py
+22
-9
No files found.
hdlmake/module/altera.py
View file @
31f8fa67
"""This is a interim module providing Intel/Altera stuff"""
import
os
import
logging
from
.core
import
ModuleCore
from
hdlmake.util
import
path
as
path_mod
class
ModuleAltera
(
ModuleCore
):
"""Class providing the TCL files that Altera Quartus requires"""
def
__init__
(
self
):
# Manifest Altera Properties
self
.
quartus_preflow
=
None
...
...
@@ -12,32 +18,39 @@ class ModuleAltera(ModuleCore):
super
(
ModuleAltera
,
self
)
.
__init__
()
def
process_manifest
(
self
):
"""Method that process the Altera section of the manifest_dict"""
self
.
_process_manifest_altera
()
super
(
ModuleAltera
,
self
)
.
process_manifest
()
def
_process_manifest_altera
(
self
):
"""Method that checks if the TCL files declared by the module
manifest dictionary exists and if so create them and
initialize the appropriated variables in the Module instance"""
from
hdlmake.srcfile
import
TCLFile
if
self
.
manifest_dict
[
"quartus_preflow"
]
!=
None
:
path
=
path_mod
.
rel2abs
(
self
.
manifest_dict
[
"quartus_preflow"
],
self
.
path
);
path
=
path_mod
.
rel2abs
(
self
.
manifest_dict
[
"quartus_preflow"
],
self
.
path
)
if
not
os
.
path
.
exists
(
path
):
p
.
error
(
"quartus_preflow file listed in "
+
self
.
path
+
" doesn't exist: "
+
path
+
".
\n
Exiting."
)
logging
.
error
(
"quartus_preflow file listed in "
+
self
.
path
+
" doesn't exist: "
+
path
+
".
\n
Exiting."
)
quit
()
self
.
quartus_preflow
=
TCLFile
(
path
)
if
self
.
manifest_dict
[
"quartus_postmodule"
]
!=
None
:
path
=
path_mod
.
rel2abs
(
self
.
manifest_dict
[
"quartus_postmodule"
],
self
.
path
);
path
=
path_mod
.
rel2abs
(
self
.
manifest_dict
[
"quartus_postmodule"
],
self
.
path
)
if
not
os
.
path
.
exists
(
path
):
p
.
error
(
"quartus_postmodule file listed in "
+
self
.
path
+
" doesn't exist: "
+
path
+
".
\n
Exiting."
)
logging
.
error
(
"quartus_postmodule file listed in "
+
self
.
path
+
" doesn't exist: "
+
path
+
".
\n
Exiting."
)
quit
()
self
.
quartus_postmodule
=
TCLFile
(
path
)
if
self
.
manifest_dict
[
"quartus_postflow"
]
!=
None
:
path
=
path_mod
.
rel2abs
(
self
.
manifest_dict
[
"quartus_postflow"
],
self
.
path
);
path
=
path_mod
.
rel2abs
(
self
.
manifest_dict
[
"quartus_postflow"
],
self
.
path
)
if
not
os
.
path
.
exists
(
path
):
p
.
error
(
"quartus_postflow file listed in "
+
self
.
path
+
" doesn't exist: "
+
path
+
".
\n
Exiting."
)
logging
.
error
(
"quartus_postflow file listed in "
+
self
.
path
+
" doesn't exist: "
+
path
+
".
\n
Exiting."
)
quit
()
self
.
quartus_postflow
=
TCLFile
(
path
)
...
...
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