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
68ab75cb
Commit
68ab75cb
authored
Jul 29, 2016
by
Javier D. Garcia-Lasheras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Module is now independent from Altera
parent
50f030e3
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
39 additions
and
65 deletions
+39
-65
__main__.py
hdlmake/__main__.py
+1
-1
qsys_hw_tcl_update.py
hdlmake/action/qsys_hw_tcl_update.py
+1
-1
__init__.py
hdlmake/module/__init__.py
+0
-1
altera.py
hdlmake/module/altera.py
+0
-59
module.py
hdlmake/module/module.py
+2
-2
quartus.py
hdlmake/tools/quartus/quartus.py
+35
-1
No files found.
hdlmake/__main__.py
View file @
68ab75cb
...
...
@@ -146,7 +146,7 @@ def _action_runner(modules_pool):
GenerateRemoteSynthesisMakefile
]
elif
top_mod
.
action
==
"qsys_hw_tcl_update"
:
if
not
top_mod
.
hw_tcl_filename
:
if
not
top_mod
.
manifest_dict
[
"hw_tcl_filename"
]
:
logging
.
error
(
"'hw_tcl_filename' manifest variable has to be specified. "
"Otherwise hdlmake doesn't know which file to update."
)
quit
()
...
...
hdlmake/action/qsys_hw_tcl_update.py
View file @
68ab75cb
...
...
@@ -41,7 +41,7 @@ class QsysHwTclUpdate(Action):
file_tcl
[
-
1
]
+=
" TOP_LEVEL_FILE"
file_tcl
.
append
(
"
\n
"
)
hw_tcl_filename
=
self
.
modules_pool
.
get_top_module
()
.
hw_tcl_filename
;
hw_tcl_filename
=
self
.
modules_pool
.
get_top_module
()
.
manifest_dict
[
"hw_tcl_filename"
]
infile
=
open
(
hw_tcl_filename
,
"r"
)
inserted
=
True
...
...
hdlmake/module/__init__.py
View file @
68ab75cb
...
...
@@ -2,6 +2,5 @@
from
.core
import
ModuleCore
from
.content
import
ModuleContent
from
.altera
import
ModuleAltera
from
.module
import
Module
,
ModuleArgs
hdlmake/module/altera.py
deleted
100644 → 0
View file @
50f030e3
"""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
self
.
quartus_postmodule
=
None
self
.
quartus_postflow
=
None
self
.
hw_tcl_filename
=
None
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
)
if
not
os
.
path
.
exists
(
path
):
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
)
if
not
os
.
path
.
exists
(
path
):
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
)
if
not
os
.
path
.
exists
(
path
):
logging
.
error
(
"quartus_postflow file listed in "
+
self
.
path
+
" doesn't exist: "
+
path
+
".
\n
Exiting."
)
quit
()
self
.
quartus_postflow
=
TCLFile
(
path
)
if
"hw_tcl_filename"
in
self
.
manifest_dict
:
self
.
hw_tcl_filename
=
self
.
manifest_dict
[
"hw_tcl_filename"
]
hdlmake/module/module.py
View file @
68ab75cb
...
...
@@ -33,7 +33,7 @@ import logging
from
hdlmake.util
import
path
as
path_mod
from
hdlmake.manifest_parser
import
ManifestParser
from
hdlmake.module
import
ModuleContent
,
ModuleAltera
from
hdlmake.module
import
ModuleContent
class
ModuleArgs
(
object
):
...
...
@@ -56,7 +56,7 @@ class ModuleArgs(object):
return
self
.
parent
,
self
.
url
,
self
.
source
,
self
.
fetchto
class
Module
(
ModuleContent
,
ModuleAltera
):
class
Module
(
ModuleContent
):
"""
This is the class providing the HDLMake module, the basic element
providing the modular behavior allowing for structured designs.
...
...
hdlmake/tools/quartus/quartus.py
View file @
68ab75cb
...
...
@@ -141,11 +141,45 @@ mrproper:
def
_set_tcl_files
(
self
,
mod
):
"""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
mod
.
manifest_dict
[
"quartus_preflow"
]
!=
None
:
path
=
path_mod
.
compose
(
mod
.
manifest_dict
[
"quartus_preflow"
],
mod
.
path
)
if
not
os
.
path
.
exists
(
path
):
logging
.
error
(
"quartus_preflow file listed in "
+
mod
.
path
+
" doesn't exist: "
+
path
+
".
\n
Exiting."
)
quit
()
self
.
preflow
=
TCLFile
(
path
)
if
mod
.
manifest_dict
[
"quartus_postmodule"
]
!=
None
:
path
=
path_mod
.
compose
(
mod
.
manifest_dict
[
"quartus_postmodule"
],
mod
.
path
)
if
not
os
.
path
.
exists
(
path
):
logging
.
error
(
"quartus_postmodule file listed in "
+
mod
.
path
+
" doesn't exist: "
+
path
+
".
\n
Exiting."
)
quit
()
self
.
postmodule
=
TCLFile
(
path
)
if
mod
.
manifest_dict
[
"quartus_postflow"
]
!=
None
:
path
=
path_mod
.
compose
(
mod
.
manifest_dict
[
"quartus_postflow"
],
mod
.
path
)
if
not
os
.
path
.
exists
(
path
):
logging
.
error
(
"quartus_postflow file listed in "
+
mod
.
path
+
" doesn't exist: "
+
path
+
".
\n
Exiting."
)
quit
()
self
.
postflow
=
TCLFile
(
path
)
def
generate_synthesis_project
(
self
,
update
=
False
,
tool_version
=
''
,
top_mod
=
None
,
fileset
=
None
):
self
.
properties
=
[]
self
.
files
=
[]
self
.
filename
=
top_mod
.
manifest_dict
[
"syn_project"
]
self
.
preflow
=
top_mod
.
quartus_preflow
self
.
_set_tcl_files
(
top_mod
)
self
.
postmodule
=
top_mod
.
quartus_postmodule
self
.
postflow
=
top_mod
.
quartus_postflow
...
...
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