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
961a52fa
Commit
961a52fa
authored
Jul 29, 2016
by
Javier D. Garcia-Lasheras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Purge broken functionalities: force_tool is not working
and provides a Makefile target dependent on the hdlmake tool
parent
68ab75cb
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
13 additions
and
117 deletions
+13
-117
fetch.py
hdlmake/action/fetch.py
+2
-3
manifest_parser.py
hdlmake/manifest_parser.py
+0
-4
content.py
hdlmake/module/content.py
+0
-5
core.py
hdlmake/module/core.py
+0
-13
diamond.py
hdlmake/tools/diamond/diamond.py
+2
-16
ise.py
hdlmake/tools/ise/ise.py
+1
-15
libero.py
hdlmake/tools/libero/libero.py
+2
-16
planahead.py
hdlmake/tools/planahead/planahead.py
+2
-15
quartus.py
hdlmake/tools/quartus/quartus.py
+2
-15
vivado.py
hdlmake/tools/vivado/vivado.py
+2
-15
No files found.
hdlmake/action/fetch.py
View file @
961a52fa
...
...
@@ -31,8 +31,7 @@ class FetchModules(Action):
def
run
(
self
):
top_module
=
self
.
modules_pool
.
get_top_module
()
logging
.
info
(
"Fetching needed modules."
)
os
.
system
(
top_module
.
fetch_pre_cmd
)
os
.
system
(
top_module
.
manifest_dict
[
"fetch_pre_cmd"
]
)
self
.
modules_pool
.
fetch_all
()
logging
.
debug
(
str
(
self
.
modules_pool
))
os
.
system
(
top_module
.
fetch_post_cmd
)
os
.
system
(
top_module
.
manifest_dict
[
"fetch_post_cmd"
])
logging
.
info
(
"All modules fetched."
)
hdlmake/manifest_parser.py
View file @
961a52fa
...
...
@@ -80,10 +80,6 @@ class ManifestParser(ConfigParser):
self
.
add_delimiter
()
self
.
add_option
(
'top_module'
,
default
=
None
,
help
=
"Top level entity for synthesis and simulation"
,
type
=
''
)
self
.
add_delimiter
()
self
.
add_option
(
'force_tool'
,
default
=
None
,
help
=
"Force certain version of a tool, e.g. 'ise < 13.2' or 'iverilog == 0.9.6"
,
type
=
''
)
self
.
add_delimiter
()
self
.
add_option
(
'quartus_preflow'
,
default
=
None
,
help
=
"Quartus pre-flow script file"
,
type
=
''
)
self
.
add_option
(
'quartus_postmodule'
,
default
=
None
,
help
=
"Quartus post-module script file"
,
type
=
''
)
...
...
hdlmake/module/content.py
View file @
961a52fa
...
...
@@ -15,8 +15,6 @@ class ModuleContent(ModuleCore):
self
.
local
=
[]
self
.
git
=
[]
self
.
svn
=
[]
self
.
fetch_pre_cmd
=
None
self
.
fetch_post_cmd
=
None
self
.
incl_makefiles
=
[]
super
(
ModuleContent
,
self
)
.
__init__
()
...
...
@@ -55,9 +53,6 @@ class ModuleContent(ModuleCore):
else
:
fetchto
=
self
.
fetchto
()
self
.
fetch_pre_cmd
=
self
.
manifest_dict
[
"fetch_pre_cmd"
]
self
.
fetch_post_cmd
=
self
.
manifest_dict
[
"fetch_post_cmd"
]
# Process required modules
if
"local"
in
self
.
manifest_dict
[
"modules"
]:
local_paths
=
path_mod
.
flatten_list
(
...
...
hdlmake/module/core.py
View file @
961a52fa
...
...
@@ -113,7 +113,6 @@ class ModuleCore(ModuleConfig):
# Universal Manifest Properties
self
.
library
=
"work"
self
.
action
=
None
self
.
force_tool
=
None
self
.
pool
=
None
self
.
top_module
=
None
self
.
manifest_dict
=
None
...
...
@@ -129,22 +128,10 @@ class ModuleCore(ModuleConfig):
def
process_manifest
(
self
):
"""Method that process the core manifest section"""
self
.
_process_manifest_force_tool
()
self
.
_process_manifest_universal
()
super
(
ModuleCore
,
self
)
.
process_manifest
()
def
_process_manifest_force_tool
(
self
):
"""Method processing the force_tool manifest directive"""
if
self
.
manifest_dict
[
"force_tool"
]:
force_tool
=
self
.
manifest_dict
[
"force_tool"
]
self
.
force_tool
=
force_tool
.
split
(
' '
)
if
len
(
self
.
force_tool
)
!=
3
:
logging
.
warning
(
"Incorrect force_tool format
%
s. Ignoring"
,
self
.
force_tool
)
self
.
force_tool
=
None
def
_process_manifest_universal
(
self
):
"""Method processing the universal manifest directives"""
#if "top_module" in self.manifest_dict:
...
...
hdlmake/tools/diamond/diamond.py
View file @
961a52fa
...
...
@@ -57,7 +57,7 @@ $$(PROJECT)1.sty \
run.tcl
#target for performing local synthesis
local: syn_pre_cmd
check_tool
synthesis syn_post_cmd
local: syn_pre_cmd synthesis syn_post_cmd
synthesis:
\t\t
echo "prj_project open
\"
$$(PROJECT).ldf
\"
" > run.tcl
...
...
@@ -67,9 +67,6 @@ synthesis:
\t\t
${diamondc_path} run.tcl
\t\t
cp $$(PROJECT)/$$(PROJECT)_$$(PROJECT).jed $$(PROJECT).jed
check_tool:
\t\t
${check_tool}
syn_post_cmd:
\t\t
${syn_post_cmd}
...
...
@@ -85,7 +82,7 @@ clean:
mrproper:
\t\t
rm -f *.jed
.PHONY: mrproper clean syn_pre_cmd syn_post_cmd synthesis local
check_tool
.PHONY: mrproper clean syn_pre_cmd syn_post_cmd synthesis local
"""
)
if
top_mod
.
manifest_dict
[
"syn_pre_cmd"
]:
...
...
@@ -99,16 +96,6 @@ mrproper:
syn_post_cmd
=
''
if
top_mod
.
force_tool
:
ft
=
top_mod
.
force_tool
check_tool
=
"""python $(HDLMAKE_HDLMAKE_PATH)/hdlmake _conditioncheck --tool {tool} --reference {reference} --condition "{condition}"
\\
|| (echo "{tool} version does not meet condition: {condition} {reference}" && false)
"""
.
format
(
tool
=
ft
[
0
],
condition
=
ft
[
1
],
reference
=
ft
[
2
])
else
:
check_tool
=
''
if
sys
.
platform
==
'cygwin'
:
bin_name
=
'pnmainc'
else
:
...
...
@@ -116,7 +103,6 @@ mrproper:
makefile_text
=
makefile_tmplt
.
substitute
(
syn_top
=
top_mod
.
manifest_dict
[
"syn_top"
],
project_name
=
top_mod
.
manifest_dict
[
"syn_project"
],
diamond_path
=
tool_path
,
check_tool
=
check_tool
,
syn_pre_cmd
=
syn_pre_cmd
,
syn_post_cmd
=
syn_post_cmd
,
diamondc_path
=
os
.
path
.
join
(
tool_path
,
bin_name
))
...
...
hdlmake/tools/ise/ise.py
View file @
961a52fa
...
...
@@ -320,9 +320,6 @@ 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:
\t\t
rm -f $$(ISE_CRAP)
...
...
@@ -332,24 +329,13 @@ clean:
mrproper:
\t\t
rm -f *.bit *.bin *.mcs
.PHONY: mrproper clean local
check_tool
.PHONY: mrproper clean local
"""
)
if
top_mod
.
force_tool
:
ft
=
top_mod
.
force_tool
check_tool
=
"""python $(HDLMAKE_HDLMAKE_PATH)/hdlmake _conditioncheck --tool {tool} --reference {reference} --condition "{condition}"
\\
|| (echo "{tool} version does not meet condition: {condition} {reference}" && false)
"""
.
format
(
tool
=
ft
[
0
],
condition
=
ft
[
1
],
reference
=
ft
[
2
])
else
:
check_tool
=
''
makefile_text
=
makefile_tmplt
.
substitute
(
syn_top
=
top_mod
.
manifest_dict
[
"syn_top"
],
project_name
=
top_mod
.
manifest_dict
[
"syn_project"
],
ise_path
=
tool_path
,
check_tool
=
check_tool
,
syn_pre_cmd
=
top_mod
.
manifest_dict
[
"syn_pre_cmd"
],
syn_post_cmd
=
top_mod
.
manifest_dict
[
"syn_post_cmd"
],
syn_pre_synthesize_cmd
=
top_mod
.
manifest_dict
[
"syn_pre_synthesize_cmd"
],
...
...
hdlmake/tools/libero/libero.py
View file @
961a52fa
...
...
@@ -59,7 +59,7 @@ LIBERO_CRAP := \
run.tcl
#target for performing local synthesis
local: syn_pre_cmd
check_tool
synthesis syn_post_cmd
local: syn_pre_cmd synthesis syn_post_cmd
synthesis:
\t\t
echo "open_project -file {$$(PROJECT)/$$(PROJECT).prjx}" > run.tcl
...
...
@@ -69,9 +69,6 @@ synthesis:
\t\t
${libero_sh_path} SCRIPT:run.tcl
\t\t
cp $$(PROJECT)/designer/impl1/${syn_top}.pdb ${syn_top}.pdb
check_tool:
\t\t
${check_tool}
syn_post_cmd:
\t\t
${syn_post_cmd}
...
...
@@ -87,7 +84,7 @@ clean:
mrproper:
\t\t
rm -f *.pdb *.stp
.PHONY: mrproper clean syn_pre_cmd syn_post_cmd synthesis local
check_tool
.PHONY: mrproper clean syn_pre_cmd syn_post_cmd synthesis local
"""
)
...
...
@@ -102,20 +99,9 @@ mrproper:
syn_post_cmd
=
''
if
top_mod
.
force_tool
:
ft
=
top_mod
.
force_tool
check_tool
=
"""python $(HDLMAKE_HDLMAKE_PATH)/hdlmake _conditioncheck --tool {tool} --reference {reference} --condition "{condition}"
\\
|| (echo "{tool} version does not meet condition: {condition} {reference}" && false)
"""
.
format
(
tool
=
ft
[
0
],
condition
=
ft
[
1
],
reference
=
ft
[
2
])
else
:
check_tool
=
''
makefile_text
=
makefile_tmplt
.
substitute
(
syn_top
=
top_mod
.
manifest_dict
[
"syn_top"
],
project_name
=
top_mod
.
manifest_dict
[
"syn_project"
],
libero_path
=
tool_path
,
check_tool
=
check_tool
,
syn_pre_cmd
=
syn_pre_cmd
,
syn_post_cmd
=
syn_post_cmd
,
libero_sh_path
=
os
.
path
.
join
(
tool_path
,
"libero"
))
...
...
hdlmake/tools/planahead/planahead.py
View file @
961a52fa
...
...
@@ -62,7 +62,7 @@ planAhead.* \
run.tcl
#target for performing local synthesis
local: syn_pre_cmd
check_tool
synthesis syn_post_cmd
local: syn_pre_cmd synthesis syn_post_cmd
synthesis:
\t\t
echo "open_project $$(PROJECT).ppr" > run.tcl
...
...
@@ -78,9 +78,6 @@ synthesis:
\t\t
${planahead_sh_path} -mode tcl -source run.tcl
\t\t
cp $$(PROJECT).runs/impl_1/${syn_top}.bit ${syn_top}.bit
check_tool:
\t\t
${check_tool}
syn_post_cmd:
\t\t
${syn_post_cmd}
...
...
@@ -96,7 +93,7 @@ clean:
mrproper:
\t\t
rm -f *.bit
.PHONY: mrproper clean syn_pre_cmd syn_post_cmd synthesis local
check_tool
.PHONY: mrproper clean syn_pre_cmd syn_post_cmd synthesis local
"""
)
...
...
@@ -110,20 +107,10 @@ mrproper:
else
:
syn_post_cmd
=
''
if
top_mod
.
force_tool
:
ft
=
top_mod
.
force_tool
check_tool
=
"""python $(HDLMAKE_HDLMAKE_PATH)/hdlmake _conditioncheck --tool {tool} --reference {reference} --condition "{condition}"
\\
|| (echo "{tool} version does not meet condition: {condition} {reference}" && false)
"""
.
format
(
tool
=
ft
[
0
],
condition
=
ft
[
1
],
reference
=
ft
[
2
])
else
:
check_tool
=
''
makefile_text
=
makefile_tmplt
.
substitute
(
syn_top
=
top_mod
.
manifest_dict
[
"syn_top"
],
project_name
=
top_mod
.
manifest_dict
[
"syn_project"
],
planahead_path
=
tool_path
,
check_tool
=
check_tool
,
syn_pre_cmd
=
syn_pre_cmd
,
syn_post_cmd
=
syn_post_cmd
,
planahead_sh_path
=
os
.
path
.
join
(
tool_path
,
"planAhead"
))
...
...
hdlmake/tools/quartus/quartus.py
View file @
961a52fa
...
...
@@ -73,7 +73,7 @@ $$(PROJECT).sta.summary \
run.tcl
#target for performing local synthesis
local: syn_pre_cmd
check_tool
synthesis syn_post_cmd
local: syn_pre_cmd synthesis syn_post_cmd
synthesis:
\t\t
echo "load_package flow" > run.tcl
...
...
@@ -81,9 +81,6 @@ synthesis:
\t\t
echo "execute_flow -compile" >> run.tcl
\t\t
${quartus_sh_path} -t run.tcl
check_tool:
\t\t
${check_tool}
syn_post_cmd:
\t\t
${syn_post_cmd}
...
...
@@ -99,7 +96,7 @@ clean:
mrproper:
\t\t
rm -f *.sof *.pof *.jam *.jbc *.ekp *.jic
.PHONY: mrproper clean syn_pre_cmd syn_post_cmd synthesis local
check_tool
.PHONY: mrproper clean syn_pre_cmd syn_post_cmd synthesis local
"""
)
...
...
@@ -113,20 +110,10 @@ mrproper:
else
:
syn_post_cmd
=
''
if
top_mod
.
force_tool
:
ft
=
top_mod
.
force_tool
check_tool
=
"""python $(HDLMAKE_HDLMAKE_PATH)/hdlmake _conditioncheck --tool {tool} --reference {reference} --condition "{condition}"
\\
|| (echo "{tool} version does not meet condition: {condition} {reference}" && false)
"""
.
format
(
tool
=
ft
[
0
],
condition
=
ft
[
1
],
reference
=
ft
[
2
])
else
:
check_tool
=
''
makefile_text
=
makefile_tmplt
.
substitute
(
syn_top
=
top_mod
.
manifest_dict
[
"syn_top"
],
project_name
=
top_mod
.
manifest_dict
[
"syn_project"
],
quartus_path
=
tool_path
,
check_tool
=
check_tool
,
syn_pre_cmd
=
syn_pre_cmd
,
syn_post_cmd
=
syn_post_cmd
,
quartus_sh_path
=
os
.
path
.
join
(
tool_path
,
"quartus_sh"
))
...
...
hdlmake/tools/vivado/vivado.py
View file @
961a52fa
...
...
@@ -59,7 +59,7 @@ VIVADO_CRAP := \
run.tcl
#target for performing local synthesis
local: syn_pre_cmd
check_tool
synthesis syn_post_cmd
local: syn_pre_cmd synthesis syn_post_cmd
synthesis:
\t\t
echo "open_project $$(PROJECT).xpr" > run.tcl
...
...
@@ -75,9 +75,6 @@ synthesis:
\t\t
${vivado_sh_path} -mode tcl -source run.tcl
\t\t
cp $$(PROJECT).runs/impl_1/${syn_top}.bit ${syn_top}.bit
check_tool:
\t\t
${check_tool}
syn_post_cmd:
\t\t
${syn_post_cmd}
...
...
@@ -93,7 +90,7 @@ clean:
mrproper:
\t\t
rm -f *.bit
.PHONY: mrproper clean syn_pre_cmd syn_post_cmd synthesis local
check_tool
.PHONY: mrproper clean syn_pre_cmd syn_post_cmd synthesis local
"""
)
...
...
@@ -107,20 +104,10 @@ mrproper:
else
:
syn_post_cmd
=
''
if
top_mod
.
force_tool
:
ft
=
top_mod
.
force_tool
check_tool
=
"""python $(HDLMAKE_HDLMAKE_PATH)/hdlmake _conditioncheck --tool {tool} --reference {reference} --condition "{condition}"
\\
|| (echo "{tool} version does not meet condition: {condition} {reference}" && false)
"""
.
format
(
tool
=
ft
[
0
],
condition
=
ft
[
1
],
reference
=
ft
[
2
])
else
:
check_tool
=
''
makefile_text
=
makefile_tmplt
.
substitute
(
syn_top
=
top_mod
.
manifest_dict
[
"syn_top"
],
project_name
=
top_mod
.
manifest_dict
[
"syn_project"
],
planahead_path
=
tool_path
,
check_tool
=
check_tool
,
syn_pre_cmd
=
syn_pre_cmd
,
syn_post_cmd
=
syn_post_cmd
,
vivado_sh_path
=
os
.
path
.
join
(
tool_path
,
"vivado"
))
...
...
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