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
21508031
Commit
21508031
authored
May 31, 2016
by
Javier D. Garcia-Lasheras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add specific synthesis pre/post commands for the different stage targets at ISE
parent
0ab8c787
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
83 additions
and
26 deletions
+83
-26
manifest_parser.py
hdlmake/manifest_parser.py
+12
-2
module.py
hdlmake/module.py
+11
-0
ise.py
hdlmake/tools/ise/ise.py
+60
-24
No files found.
hdlmake/manifest_parser.py
View file @
21508031
...
...
@@ -63,8 +63,18 @@ class ManifestParser(ConfigParser):
self
.
add_option
(
'syn_project'
,
default
=
None
,
help
=
"Project file (.xise, .ise, .qpf)"
,
type
=
''
)
self
.
add_option
(
'syn_ise_version'
,
default
=
None
,
help
=
"Force particular ISE version"
,
type
=
float
)
self
.
add_type
(
'syn_ise_version'
,
type
=
''
)
self
.
add_option
(
'syn_pre_cmd'
,
default
=
None
,
help
=
"Command to be executed before synthesis"
,
type
=
''
)
self
.
add_option
(
'syn_post_cmd'
,
default
=
None
,
help
=
"Command to be executed after synthesis"
,
type
=
''
)
self
.
add_option
(
'syn_pre_cmd'
,
default
=
''
,
help
=
"Command to be executed before synthesis: local"
,
type
=
''
)
self
.
add_option
(
'syn_pre_synthesize_cmd'
,
default
=
''
,
help
=
"Command to be executed before synthesis: synthesize"
,
type
=
''
)
self
.
add_option
(
'syn_post_synthesize_cmd'
,
default
=
''
,
help
=
"Command to be executed after synthesis: synthesize"
,
type
=
''
)
self
.
add_option
(
'syn_pre_translate_cmd'
,
default
=
''
,
help
=
"Command to be executed before synthesis: translate"
,
type
=
''
)
self
.
add_option
(
'syn_post_translate_cmd'
,
default
=
''
,
help
=
"Command to be executed after synthesis: translate"
,
type
=
''
)
self
.
add_option
(
'syn_pre_map_cmd'
,
default
=
''
,
help
=
"Command to be executed before synthesis: map"
,
type
=
''
)
self
.
add_option
(
'syn_post_map_cmd'
,
default
=
''
,
help
=
"Command to be executed after synthesis: map"
,
type
=
''
)
self
.
add_option
(
'syn_pre_par_cmd'
,
default
=
''
,
help
=
"Command to be executed before synthesis: par"
,
type
=
''
)
self
.
add_option
(
'syn_post_par_cmd'
,
default
=
''
,
help
=
"Command to be executed after synthesis: par"
,
type
=
''
)
self
.
add_option
(
'syn_pre_bitstream_cmd'
,
default
=
''
,
help
=
"Command to be executed before synthesis: bitstream"
,
type
=
''
)
self
.
add_option
(
'syn_post_bitstream_cmd'
,
default
=
''
,
help
=
"Command to be executed after synthesis: bitstream"
,
type
=
''
)
self
.
add_option
(
'syn_post_cmd'
,
default
=
''
,
help
=
"Command to be executed after synthesis: local"
,
type
=
''
)
self
.
add_delimiter
()
self
.
add_option
(
'top_module'
,
default
=
None
,
help
=
"Top level entity for synthesis and simulation"
,
type
=
''
)
...
...
hdlmake/module.py
View file @
21508031
...
...
@@ -339,7 +339,18 @@ class Module(object):
self
.
sim_only_files
=
self
.
_create_file_list_from_paths
(
paths
=
paths
)
self
.
syn_pre_cmd
=
self
.
manifest_dict
[
"syn_pre_cmd"
]
self
.
syn_pre_synthesize_cmd
=
self
.
manifest_dict
[
"syn_pre_synthesize_cmd"
]
self
.
syn_post_synthesize_cmd
=
self
.
manifest_dict
[
"syn_post_synthesize_cmd"
]
self
.
syn_pre_translate_cmd
=
self
.
manifest_dict
[
"syn_pre_translate_cmd"
]
self
.
syn_post_translate_cmd
=
self
.
manifest_dict
[
"syn_post_translate_cmd"
]
self
.
syn_pre_map_cmd
=
self
.
manifest_dict
[
"syn_pre_map_cmd"
]
self
.
syn_post_map_cmd
=
self
.
manifest_dict
[
"syn_post_map_cmd"
]
self
.
syn_pre_par_cmd
=
self
.
manifest_dict
[
"syn_pre_par_cmd"
]
self
.
syn_post_par_cmd
=
self
.
manifest_dict
[
"syn_post_par_cmd"
]
self
.
syn_pre_bitstream_cmd
=
self
.
manifest_dict
[
"syn_pre_bitstream_cmd"
]
self
.
syn_post_bitstream_cmd
=
self
.
manifest_dict
[
"syn_post_bitstream_cmd"
]
self
.
syn_post_cmd
=
self
.
manifest_dict
[
"syn_post_cmd"
]
self
.
sim_pre_cmd
=
self
.
manifest_dict
[
"sim_pre_cmd"
]
self
.
sim_post_cmd
=
self
.
manifest_dict
[
"sim_post_cmd"
]
...
...
hdlmake/tools/ise/ise.py
View file @
21508031
...
...
@@ -243,7 +243,7 @@ run_par.tcl \
run_bitstream.tcl
#target for performing local synthesis
local:
bitstream
local:
__syn_pre_cmd __gen_tcl_bitstream __run_tcl_bitstream __syn_post_cmd
__gen_tcl_synthesize:
...
...
@@ -266,31 +266,66 @@ __gen_tcl_bitstream:
\t\t
echo "project open $$(PROJECT)" > run_bitstream.tcl
\t\t
echo "process run {Generate Programming File}" >> run_bitstream.tcl
synthesize: __gen_tcl_synthesize
__run_tcl_synthesize:
\t\t
${xtclsh_path} run_synthesize.tcl
translate: __gen_tcl_translate
__run_tcl_translate:
\t\t
${xtclsh_path} run_translate.tcl
map: __gen_tcl_map
__run_tcl_map:
\t\t
${xtclsh_path} run_map.tcl
par: __gen_tcl_par
__run_tcl_par:
\t\t
${xtclsh_path} run_par.tcl
bitstream: __gen_tcl_bitstream
__run_tcl_bitstream:
\t\t
${xtclsh_path} run_bitstream.tcl
__syn_pre_cmd:
\t\t
${syn_pre_cmd}
check_tool:
\t\t
${check_tool}
__syn_pre_synthesize_cmd:
\t\t
${syn_pre_synthesize_cmd}
__syn_post_synthesize_cmd:
\t\t
${syn_post_synthesize_cmd}
__syn_pre_translate_cmd:
\t\t
${syn_pre_translate_cmd}
__syn_post_translate_cmd:
\t\t
${syn_post_translate_cmd}
__syn_pre_map_cmd:
\t\t
${syn_pre_map_cmd}
__syn_post_map_cmd:
\t\t
${syn_post_map_cmd}
syn_post_cmd:
__syn_pre_par_cmd:
\t\t
${syn_pre_par_cmd}
__syn_post_par_cmd:
\t\t
${syn_post_par_cmd}
__syn_pre_bitstream_cmd:
\t\t
${syn_pre_bitstream_cmd}
__syn_post_bitstream_cmd:
\t\t
${syn_post_bitstream_cmd}
__syn_post_cmd:
\t\t
${syn_post_cmd}
syn_pre_cmd:
\t\t
${syn_pre_cmd}
synthesize: __syn_pre_synthesize_cmd __gen_tcl_synthesize __run_tcl_synthesize __syn_post_synthesize_cmd
translate: __syn_pre_translate_cmd __gen_tcl_translate __run_tcl_translate __syn_post_translate_cmd
map: __syn_pre_map_cmd __gen_tcl_map __run_tcl_map __syn_post_map_cmd
par: __syn_pre_par_cmd __gen_tcl_par __run_tcl_par __syn_post_par_cmd
bitstream: __syn_pre_bitstream_cmd __gen_tcl_bitstream __run_tcl_bitstream __syn_post_bitstream_cmd
check_tool:
\t\t
${check_tool}
#target for cleaning all intermediate stuff
clean:
...
...
@@ -301,18 +336,9 @@ clean:
mrproper:
\t\t
rm -f *.bit *.bin *.mcs
.PHONY: mrproper clean
syn_pre_cmd syn_post_cmd
local check_tool
.PHONY: mrproper clean local check_tool
"""
)
if
top_mod
.
syn_pre_cmd
:
syn_pre_cmd
=
top_mod
.
syn_pre_cmd
else
:
syn_pre_cmd
=
''
if
top_mod
.
syn_post_cmd
:
syn_post_cmd
=
top_mod
.
syn_post_cmd
else
:
syn_post_cmd
=
''
if
top_mod
.
force_tool
:
ft
=
top_mod
.
force_tool
...
...
@@ -328,8 +354,18 @@ mrproper:
project_name
=
top_mod
.
syn_project
,
ise_path
=
tool_path
,
check_tool
=
check_tool
,
syn_pre_cmd
=
syn_pre_cmd
,
syn_post_cmd
=
syn_post_cmd
,
syn_pre_cmd
=
top_mod
.
syn_pre_cmd
,
syn_pre_synthesize_cmd
=
top_mod
.
syn_pre_synthesize_cmd
,
syn_post_synthesize_cmd
=
top_mod
.
syn_post_synthesize_cmd
,
syn_pre_translate_cmd
=
top_mod
.
syn_pre_translate_cmd
,
syn_post_translate_cmd
=
top_mod
.
syn_post_translate_cmd
,
syn_pre_map_cmd
=
top_mod
.
syn_pre_map_cmd
,
syn_post_map_cmd
=
top_mod
.
syn_post_map_cmd
,
syn_pre_par_cmd
=
top_mod
.
syn_pre_par_cmd
,
syn_post_par_cmd
=
top_mod
.
syn_post_par_cmd
,
syn_pre_bitstream_cmd
=
top_mod
.
syn_pre_bitstream_cmd
,
syn_post_bitstream_cmd
=
top_mod
.
syn_post_bitstream_cmd
,
syn_post_cmd
=
top_mod
.
syn_post_cmd
,
xtclsh_path
=
os
.
path
.
join
(
tool_path
,
"xtclsh"
))
self
.
write
(
makefile_text
)
for
f
in
top_mod
.
incl_makefiles
:
...
...
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