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
90a22a00
Commit
90a22a00
authored
Feb 08, 2015
by
Garcia-Lasheras
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'tune-ise-remote-synthesis' into develop
parents
fa0d59ac
3975ca9c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
36 deletions
+40
-36
remote_synthesis.py
hdlmake/action/remote_synthesis.py
+28
-28
ise.py
hdlmake/tools/ise/ise.py
+12
-8
No files found.
hdlmake/action/remote_synthesis.py
View file @
90a22a00
...
...
@@ -49,29 +49,29 @@ class GenerateRemoteSynthesisMakefile(Action):
self
.
_generate_remote_synthesis_makefile
(
tool_object
)
def
_search_tcl_file
(
self
,
directory
=
None
):
# This function is used in _generate_remote_ise_makefile
if
directory
is
None
:
directory
=
"."
filenames
=
os
.
listdir
(
directory
)
tcls
=
[]
for
filename
in
filenames
:
file_parts
=
filename
.
split
(
'.'
)
if
file_parts
[
len
(
file_parts
)
-
1
]
==
"tcl"
:
tcls
.
append
(
filename
)
if
len
(
tcls
)
==
0
:
return
None
if
len
(
tcls
)
>
1
:
logging
.
warning
(
"Multiple tcls in the current directory: "
+
str
(
tcls
)
+
"
\n
"
+
"Picking the first one: "
+
tcls
[
0
])
return
tcls
[
0
]
def
_generate_tcl
(
self
):
# This function is used in _generate_remote_ise_makefile
f
=
open
(
"run.tcl"
,
"w"
)
f
.
write
(
"project open "
+
self
.
top_module
.
syn_project
+
'
\n
'
)
f
.
write
(
"process run {Generate Programming File} -force rerun_all
\n
"
)
f
.
close
()
#
def _search_tcl_file(self, directory=None):
#
# This function is used in _generate_remote_ise_makefile
#
if directory is None:
#
directory = "."
#
filenames = os.listdir(directory)
#
tcls = []
#
for filename in filenames:
#
file_parts = filename.split('.')
#
if file_parts[len(file_parts)-1] == "tcl":
#
tcls.append(filename)
#
if len(tcls) == 0:
#
return None
#
if len(tcls) > 1:
#
logging.warning("Multiple tcls in the current directory: " + str(tcls) + "\n" +
#
"Picking the first one: " + tcls[0])
#
return tcls[0]
#
def _generate_tcl(self):
#
# This function is used in _generate_remote_ise_makefile
#
f = open("run.tcl", "w")
#
f.write("project open " + self.top_module.syn_project + '\n')
#
f.write("process run {Generate Programming File} -force rerun_all\n")
#
f.close()
def
_generate_remote_synthesis_makefile
(
self
,
tool_object
):
...
...
@@ -80,14 +80,14 @@ class GenerateRemoteSynthesisMakefile(Action):
top_mod
=
self
.
modules_pool
.
get_top_module
()
tcl
=
self
.
_search_tcl_file
()
if
tcl
is
None
:
self
.
_generate_tcl
()
tcl
=
"run.tcl"
#
tcl = self._search_tcl_file()
#
if tcl is None:
#
self._generate_tcl()
#
tcl = "run.tcl"
files
=
self
.
modules_pool
.
build_global_file_set
()
sff
=
SourceFileFactory
()
files
.
add
(
sff
.
new
(
tcl
,
module
=
None
))
files
.
add
(
sff
.
new
(
"run.tcl"
,
module
=
None
))
files
.
add
(
sff
.
new
(
top_mod
.
syn_project
,
module
=
None
))
tool_object
.
generate_remote_synthesis_makefile
(
files
=
files
,
name
=
top_mod
.
syn_name
,
...
...
hdlmake/tools/ise/ise.py
View file @
90a22a00
...
...
@@ -48,6 +48,8 @@ FAMILY_NAMES = {
"XC6V"
:
"Virtex6"
,
"XC5V"
:
"Virtex5"
,
"XC4V"
:
"Virtex4"
,
"XC7Z"
:
"Zynq"
,
"XC7V"
:
"Virtex7"
,
"XC7K"
:
"Kintex7"
,
"XC7A"
:
"Artix7"
}
...
...
@@ -116,23 +118,23 @@ class ToolControls(MakefileWriter):
remote_name_tmpl
=
"R_NAME:={0}"
files_tmpl
=
"FILES := {0}"
user_tmpl
=
user_tmpl
.
format
(
"$(HDLMAKE_RSYNTH_USER)#take the value from the environment"
)
user_tmpl
=
user_tmpl
.
format
(
"$(HDLMAKE_RSYNTH_USER)#
take the value from the environment"
)
test_tmpl
=
"""__test_for_remote_synthesis_variables:
ifeq (x$(USER),x)
\t
@echo "Remote synthesis user is not set.
\
\t
@echo "Remote synthesis user is not set.
\
You can set it by editing variable USER in the makefile or setting env. variable HDLMAKE_RSYNTH_USER." && false
endif
ifeq (x$(SERVER),x)
\t
@echo "Remote synthesis server is not set.
\
\t
@echo "Remote synthesis server is not set.
\
You can set it by editing variable SERVER in the makefile or setting env. variable HDLMAKE_RSYNTH_SERVER." && false
endif
ifeq (x$(ISE_PATH),x)
\t
@echo "Remote synthesis server is not set.
\
\t
@echo "Remote synthesis server is not set.
\
You can set it by editing variable ISE_PATH in the makefile or setting env. variable HDLMAKE_RSYNTH_ISE_PATH." && false
endif
"""
if
server
is
None
:
server_tmpl
=
server_tmpl
.
format
(
"$(HDLMAKE_RSYNTH_SERVER)#take the value from the environment"
)
server_tmpl
=
server_tmpl
.
format
(
"$(HDLMAKE_RSYNTH_SERVER)#
take the value from the environment"
)
else
:
server_tmpl
=
server_tmpl
.
format
(
server
)
...
...
@@ -150,7 +152,7 @@ endif
self
.
writeln
(
files_tmpl
.
format
(
'
\\\n
'
.
join
([
s
.
rel_path
()
for
s
in
files
])))
self
.
writeln
(
""
)
self
.
writeln
(
"#target for running synthesis in the remote location"
)
self
.
writeln
(
"remote: __test_for_remote_synthesis_variables __send __do_synthesis"
)
self
.
writeln
(
"remote: __test_for_remote_synthesis_variables
generate_tcl
__send __do_synthesis"
)
self
.
writeln
(
"__send_back: __do_synthesis"
)
self
.
writeln
(
"__do_synthesis: __send"
)
self
.
writeln
(
"__send: __test_for_remote_synthesis_variables"
)
...
...
@@ -235,15 +237,17 @@ webtalk_pn.xml \
run.tcl
#target for performing local synthesis
local: syn_pre_cmd check_tool synthesis syn_post_cmd
local: syn_pre_cmd check_tool
generate_tcl
synthesis syn_post_cmd
synthesis
:
generate_tcl
:
\t\t
echo "project open $$(PROJECT)" > run.tcl
\t\t
echo "process run {Synthesize - XST}" >> run.tcl
\t\t
echo "process run {Translate}" >> run.tcl
\t\t
echo "process run {Map}" >> run.tcl
\t\t
echo "process run {Place & Route}" >> run.tcl
\t\t
echo "process run {Generate Programming File}" >> run.tcl
synthesis:
\t\t
${xtclsh_path} run.tcl
check_tool:
...
...
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