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
a67c8fde
Commit
a67c8fde
authored
May 24, 2017
by
Javier D. Garcia-Lasheras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Load the appropriated tool when the pool is created
parent
484d5d34
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
13 deletions
+14
-13
action.py
hdlmake/action/action.py
+11
-0
core.py
hdlmake/action/core.py
+1
-11
make_sim.py
hdlmake/tools/make_sim.py
+1
-1
make_syn.py
hdlmake/tools/make_syn.py
+1
-1
No files found.
hdlmake/action/action.py
View file @
a67c8fde
...
...
@@ -28,6 +28,7 @@ import os
import
logging
import
sys
from
hdlmake.tools
import
load_syn_tool
,
load_sim_tool
from
hdlmake
import
shell
from
hdlmake.util.termcolor
import
colored
from
hdlmake
import
new_dep_solver
as
dep_solver
...
...
@@ -72,6 +73,16 @@ class Action(list):
source
=
fetch_mod
.
LOCAL
,
fetchto
=
"."
)
self
.
config
=
self
.
_get_config_dict
()
action
=
self
.
config
.
get
(
"action"
)
if
action
==
None
:
self
.
tool
=
None
elif
action
==
"simulation"
:
self
.
tool
=
load_sim_tool
(
self
.
config
.
get
(
"sim_tool"
))
elif
action
==
"synthesis"
:
self
.
tool
=
load_syn_tool
(
self
.
config
.
get
(
"syn_tool"
))
else
:
logging
.
error
(
"Unknown requested action:
%
s"
,
action
)
quit
()
def
new_module
(
self
,
parent
,
url
,
source
,
fetchto
):
"""Add new module to the pool.
...
...
hdlmake/action/core.py
View file @
a67c8fde
...
...
@@ -28,7 +28,6 @@ import os
import
sys
import
os.path
from
hdlmake.tools
import
load_syn_tool
,
load_sim_tool
import
hdlmake.fetch
as
fetch
import
hdlmake.new_dep_solver
as
dep_solver
from
hdlmake.util
import
path
as
path_mod
...
...
@@ -62,16 +61,7 @@ class ActionCore(Action):
def
makefile
(
self
):
"""Write the Makefile for the current design"""
self
.
_check_all_fetched_or_quit
()
action
=
self
.
config
.
get
(
"action"
)
if
action
==
"simulation"
:
sim_writer
=
load_sim_tool
(
self
.
config
.
get
(
"sim_tool"
))
sim_writer
.
simulation_makefile
(
self
)
elif
action
==
"synthesis"
:
syn_writer
=
load_syn_tool
(
self
.
config
.
get
(
"syn_tool"
))
syn_writer
.
synthesis_makefile
(
self
)
else
:
logging
.
error
(
"Unknown requested action:
%
s"
,
action
)
quit
()
self
.
tool
.
write_makefile
(
self
)
def
_fetch_all
(
self
):
"""Fetch all the modules declared in the design"""
...
...
hdlmake/tools/make_sim.py
View file @
a67c8fde
...
...
@@ -30,7 +30,7 @@ class ToolSim(ToolMakefile):
super
(
ToolSim
,
self
)
.
__init__
()
self
.
_simulator_controls
=
{}
def
simulation
_makefile
(
self
,
pool
):
def
write
_makefile
(
self
,
pool
):
"""Execute the simulation action"""
_check_simulation_manifest
(
pool
.
config
)
fset
=
pool
.
build_file_set
(
...
...
hdlmake/tools/make_syn.py
View file @
a67c8fde
...
...
@@ -39,7 +39,7 @@ class ToolSyn(ToolMakefile):
def
__init__
(
self
):
super
(
ToolSyn
,
self
)
.
__init__
()
def
synthesis
_makefile
(
self
,
pool
):
def
write
_makefile
(
self
,
pool
):
"""Generate a Makefile for the specific synthesis tool"""
_check_synthesis_manifest
(
pool
.
config
)
fileset
=
pool
.
build_file_set
(
...
...
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