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
403ccb9d
Commit
403ccb9d
authored
Aug 06, 2016
by
Javier D. Garcia-Lasheras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve how the selected tool is loaded in simulation and synthesis actions
parent
b9c20d5d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
35 deletions
+19
-35
simulation.py
hdlmake/action/simulation.py
+10
-21
synthesis.py
hdlmake/action/synthesis.py
+9
-14
No files found.
hdlmake/action/simulation.py
View file @
403ccb9d
...
...
@@ -57,45 +57,34 @@ class ActionSimulation(
self
.
_check_all_fetched_or_quit
()
self
.
_check_simulation_makefile
()
tool_name
=
self
.
get_top_module
()
.
manifest_dict
[
"sim_tool"
]
if
tool_name
is
"iverilog"
:
tool_object
=
ToolIVerilog
()
elif
tool_name
is
"isim"
:
tool_object
=
ToolISim
()
elif
tool_name
is
"modelsim"
:
tool_object
=
ToolModelsim
()
elif
tool_name
is
"active-hdl"
:
tool_object
=
ToolActiveHDL
()
elif
tool_name
is
"riviera"
:
tool_object
=
ToolRiviera
()
elif
tool_name
is
"ghdl"
:
tool_object
=
ToolGHDL
()
tool_dict
=
{
"iverilog"
:
ToolIVerilog
,
"isim"
:
ToolISim
,
"modelsim"
:
ToolModelsim
,
"active-hdl"
:
ToolActiveHDL
,
"riviera"
:
ToolRiviera
,
"ghdl"
:
ToolGHDL
}
if
not
tool_name
in
tool_dict
:
logging
.
error
(
"Unknown sim_tool:
%
s"
,
tool_name
)
sys
.
exit
(
"Exiting"
)
tool_object
=
tool_dict
[
tool_name
]()
tool_info
=
tool_object
.
TOOL_INFO
if
sys
.
platform
==
'cygwin'
:
bin_name
=
tool_info
[
'windows_bin'
]
else
:
bin_name
=
tool_info
[
'linux_bin'
]
path_key
=
tool_info
[
'id'
]
+
'_path'
name
=
tool_info
[
'name'
]
self
.
env
.
check_tool
(
tool_object
)
self
.
env
.
check_general
()
if
self
.
env
[
path_key
]
is
None
and
self
.
env
.
options
.
force
is
not
True
:
logging
.
error
(
"Can't generate a "
+
name
+
" makefile. "
+
bin_name
+
" not found."
)
sys
.
exit
(
"Exiting"
)
logging
.
info
(
"Generating "
+
name
+
" makefile for simulation."
)
top_module
=
self
.
get_top_module
()
fset
=
self
.
build_file_set
(
top_module
.
manifest_dict
[
"sim_top"
])
dep_files
=
fset
.
filter
(
DepFile
)
# dep_solver.solve(dep_files)
# tool_object.generate_simulation_makefile(dep_files, top_module)
tool_object
.
makefile_sim_top
(
top_module
)
tool_object
.
makefile_sim_options
(
top_module
)
...
...
hdlmake/action/synthesis.py
View file @
403ccb9d
...
...
@@ -42,21 +42,16 @@ class ActionSynthesis(ToolISE, ToolPlanAhead, ToolVivado,
def
_load_synthesis_tool
(
self
):
"""Returns a tool_object that provides the synthesis tool interface"""
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
:
tool_dict
=
{
"ise"
:
ToolISE
,
"planahead"
:
ToolPlanAhead
,
"vivado"
:
ToolVivado
,
"quartus"
:
ToolQuartus
,
"diamond"
:
ToolDiamond
,
"libero"
:
ToolLibero
}
if
not
tool_name
in
tool_dict
:
logging
.
error
(
"Synthesis tool not recognized:
%
s"
,
tool_name
)
return
tool_object
quit
()
return
tool_dict
[
tool_name
]()
def
_check_synthesis_project
(
self
):
"""Check the manifest contains all the keys for a synthesis project"""
...
...
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