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
ad57e7ea
Commit
ad57e7ea
authored
Jul 31, 2016
by
Javier D. Garcia-Lasheras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Synthesis tools are now a set of classes inherited by synthesis action
parent
a76999c2
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
57 additions
and
16 deletions
+57
-16
synthesis.py
hdlmake/action/synthesis.py
+29
-10
__init__.py
hdlmake/tools/__init__.py
+8
-0
diamond.py
hdlmake/tools/diamond.py
+4
-1
__init__.py
hdlmake/tools/diamond/__init__.py
+0
-0
ise.py
hdlmake/tools/ise.py
+4
-1
__init__.py
hdlmake/tools/ise/__init__.py
+0
-0
libero.py
hdlmake/tools/libero.py
+3
-1
__init__.py
hdlmake/tools/libero/__init__.py
+0
-0
planahead.py
hdlmake/tools/planahead.py
+3
-1
__init__.py
hdlmake/tools/planahead/__init__.py
+0
-0
quartus.py
hdlmake/tools/quartus.py
+3
-1
__init__.py
hdlmake/tools/quartus/__init__.py
+0
-0
vivado.py
hdlmake/tools/vivado.py
+3
-1
__init__.py
hdlmake/tools/vivado/__init__.py
+0
-0
No files found.
hdlmake/action/synthesis.py
View file @
ad57e7ea
...
...
@@ -31,7 +31,32 @@ from hdlmake.util import path
from
.action
import
Action
class
ActionSynthesis
(
Action
):
from
hdlmake.tools
import
(
ToolISE
,
ToolPlanAhead
,
ToolVivado
,
ToolQuartus
,
ToolDiamond
,
ToolLibero
)
class
ActionSynthesis
(
Action
,
ToolISE
,
ToolPlanAhead
,
ToolVivado
,
ToolQuartus
,
ToolDiamond
,
ToolLibero
):
def
_load_synthesis_tool
(
self
):
tool_name
=
self
.
get_top_module
()
.
manifest_dict
[
"syn_tool"
]
if
tool_name
is
"ise"
:
tool_object
=
ToolISE
()
elif
tool_name
is
"planahead"
:
tool_object
=
ToolPlanAhead
()
elif
tool_name
is
"vivado"
:
tool_object
=
ToolVivado
()
elif
tool_name
is
"quartus"
:
tool_object
=
ToolQuartus
()
elif
tool_name
is
"diamond"
:
tool_object
=
ToolDiamond
()
elif
tool_name
is
"libero"
:
tool_object
=
ToolLibero
()
else
:
logging
.
error
(
"Synthesis tool not recognized:
%
s"
,
tool_name
)
return
tool_object
def
_check_synthesis_makefile
(
self
):
# NOTE: top_module is not used in synthesis!!
...
...
@@ -49,9 +74,7 @@ class ActionSynthesis(Action):
def
_generate_synthesis_makefile
(
self
):
tool_name
=
self
.
get_top_module
()
.
manifest_dict
[
"syn_tool"
]
tool_module
=
importlib
.
import_module
(
"hdlmake.tools.
%
s.
%
s"
%
(
tool_name
,
tool_name
))
tool_object
=
tool_module
.
ToolControls
()
tool_object
=
self
.
_load_synthesis_tool
()
tool_info
=
tool_object
.
get_keys
()
if
sys
.
platform
==
'cygwin'
:
bin_name
=
tool_info
[
'windows_bin'
]
...
...
@@ -173,9 +196,7 @@ end sdb_meta_pkg;""")
def
_generate_synthesis_project
(
self
):
tool_name
=
self
.
get_top_module
()
.
manifest_dict
[
"syn_tool"
]
tool_module
=
importlib
.
import_module
(
"hdlmake.tools.
%
s.
%
s"
%
(
tool_name
,
tool_name
))
tool_object
=
tool_module
.
ToolControls
()
tool_object
=
self
.
_load_synthesis_tool
()
tool_info
=
tool_object
.
get_keys
()
if
sys
.
platform
==
'cygwin'
:
bin_name
=
tool_info
[
'windows_bin'
]
...
...
@@ -248,9 +269,7 @@ end sdb_meta_pkg;""")
def
_generate_remote_synthesis_makefile
(
self
):
tool_name
=
self
.
get_top_module
()
.
manifest_dict
[
"syn_tool"
]
tool_module
=
importlib
.
import_module
(
"hdlmake.tools.
%
s.
%
s"
%
(
tool_name
,
tool_name
))
tool_object
=
tool_module
.
ToolControls
()
tool_object
=
self
.
_load_synthesis_tool
()
logging
.
info
(
"Generating makefile for remote synthesis."
)
top_mod
=
self
.
get_top_module
()
...
...
hdlmake/tools/__init__.py
View file @
ad57e7ea
...
...
@@ -5,3 +5,11 @@ from .active_hdl import ToolActiveHDL
from
.riviera
import
ToolRiviera
from
.ghdl
import
ToolGHDL
from
.sim_makefile_support
import
VsimMakefileWriter
from
.ise
import
ToolISE
from
.planahead
import
ToolPlanAhead
from
.vivado
import
ToolVivado
from
.quartus
import
ToolQuartus
from
.diamond
import
ToolDiamond
from
.libero
import
ToolLibero
hdlmake/tools/diamond
/diamond
.py
→
hdlmake/tools/diamond.py
View file @
ad57e7ea
...
...
@@ -32,7 +32,10 @@ from hdlmake.makefile_writer import MakefileWriter
DIAMOND_STANDARD_LIBS
=
[
'ieee'
,
'std'
]
class
ToolControls
(
MakefileWriter
):
class
ToolDiamond
(
MakefileWriter
):
def
__init__
(
self
):
super
(
ToolDiamond
,
self
)
.
__init__
()
def
detect_version
(
self
,
path
):
return
'unknown'
...
...
hdlmake/tools/diamond/__init__.py
deleted
100644 → 0
View file @
a76999c2
hdlmake/tools/ise
/ise
.py
→
hdlmake/tools/ise.py
View file @
ad57e7ea
...
...
@@ -49,7 +49,10 @@ FAMILY_NAMES = {
"XC7A"
:
"Artix7"
}
class
ToolControls
(
MakefileWriter
):
class
ToolISE
(
MakefileWriter
):
def
__init__
(
self
):
super
(
ToolISE
,
self
)
.
__init__
()
def
get_keys
(
self
):
tool_info
=
{
...
...
hdlmake/tools/ise/__init__.py
deleted
100644 → 0
View file @
a76999c2
hdlmake/tools/libero
/libero
.py
→
hdlmake/tools/libero.py
View file @
ad57e7ea
...
...
@@ -33,8 +33,10 @@ from hdlmake.makefile_writer import MakefileWriter
LIBERO_STANDARD_LIBS
=
[
'ieee'
,
'std'
]
class
Tool
Controls
(
MakefileWriter
):
class
Tool
Libero
(
MakefileWriter
):
def
__init__
(
self
):
super
(
ToolLibero
,
self
)
.
__init__
()
def
detect_version
(
self
,
path
):
return
'unknown'
...
...
hdlmake/tools/libero/__init__.py
deleted
100644 → 0
View file @
a76999c2
hdlmake/tools/planahead
/planahead
.py
→
hdlmake/tools/planahead.py
View file @
ad57e7ea
...
...
@@ -34,8 +34,10 @@ from hdlmake.makefile_writer import MakefileWriter
PLANAHEAD_STANDARD_LIBS
=
[
'ieee'
,
'std'
]
class
Tool
Controls
(
MakefileWriter
):
class
Tool
PlanAhead
(
MakefileWriter
):
def
__init__
(
self
):
super
(
ToolPlanAhead
,
self
)
.
__init__
()
def
detect_version
(
self
,
path
):
return
'unknown'
...
...
hdlmake/tools/planahead/__init__.py
deleted
100644 → 0
View file @
a76999c2
hdlmake/tools/quartus
/quartus
.py
→
hdlmake/tools/quartus.py
View file @
ad57e7ea
...
...
@@ -34,8 +34,10 @@ from hdlmake.makefile_writer import MakefileWriter
QUARTUS_STANDARD_LIBS
=
[
'altera'
,
'altera_mf'
,
'lpm'
,
'ieee'
,
'std'
]
class
Tool
Control
s
(
MakefileWriter
):
class
Tool
Quartu
s
(
MakefileWriter
):
def
__init__
(
self
):
super
(
ToolQuartus
,
self
)
.
__init__
()
def
detect_version
(
self
,
path
):
return
'unknown'
...
...
hdlmake/tools/quartus/__init__.py
deleted
100644 → 0
View file @
a76999c2
hdlmake/tools/vivado
/vivado
.py
→
hdlmake/tools/vivado.py
View file @
ad57e7ea
...
...
@@ -33,8 +33,10 @@ from hdlmake.makefile_writer import MakefileWriter
VIVADO_STANDARD_LIBS
=
[
'ieee'
,
'std'
]
class
Tool
Controls
(
MakefileWriter
):
class
Tool
Vivado
(
MakefileWriter
):
def
__init__
(
self
):
super
(
ToolVivado
,
self
)
.
__init__
()
def
detect_version
(
self
,
path
):
return
'unknown'
...
...
hdlmake/tools/vivado/__init__.py
deleted
100644 → 0
View file @
a76999c2
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