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
594750f9
Commit
594750f9
authored
Mar 12, 2017
by
Javier D. Garcia-Lasheras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle hdl and supportedfiles as a dictionay and test it on ISE
parent
434c9f5e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
23 deletions
+17
-23
ise.py
hdlmake/tools/ise.py
+10
-19
make_syn.py
hdlmake/tools/make_syn.py
+7
-4
No files found.
hdlmake/tools/ise.py
View file @
594750f9
...
...
@@ -61,9 +61,15 @@ class ToolISE(ToolSyn):
STANDARD_LIBS
=
[
'ieee'
,
'ieee_proposed'
,
'iSE'
,
'simprims'
,
'std'
,
'synopsys'
,
'unimacro'
,
'unisim'
,
'XilinxCoreLib'
]
SUPPORTED_FILES
=
[
UCFFile
,
CDCFile
,
NGCFile
]
SUPPORTED_FILES
=
{
UCFFile
:
'xfile add $$filename'
,
CDCFile
:
'xfile add $$filename'
,
NGCFile
:
'xfile add $$filename'
}
HDL_FILES
=
[
VHDLFile
,
VerilogFile
,
SVFile
]
HDL_FILES
=
{
VHDLFile
:
'xfile add $$filename'
,
VerilogFile
:
'xfile add $$filename'
,
SVFile
:
'xfile add $$filename'
}
CLEAN_TARGETS
=
{
'clean'
:
[
"xst xlnx_auto_*_xdb"
,
"iseconfig _xmsgs"
,
"_ngo"
,
"*.b"
,
"*_summary.html"
,
"*.tcl"
,
...
...
@@ -101,10 +107,6 @@ $(TCL_CLOSE)'''
'close'
:
'project close'
,
'project'
:
'$(TCL_CREATE)
\n
'
'$(TCL_FILES)
\n
'
'foreach filename $$hdl_files {{
\n
'
' xfile add $$filename
\n
'
' puts "Adding file $$filename to the project."
\n
'
'}}
\n
'
'{0}
\n
'
'project set top $(TOP_MODULE)
\n
'
'$(TCL_SAVE)
\n
'
...
...
@@ -119,8 +121,8 @@ $(TCL_CLOSE)'''
def
__init__
(
self
):
super
(
ToolISE
,
self
)
.
__init__
()
self
.
_tool_info
.
update
(
ToolISE
.
TOOL_INFO
)
self
.
_hdl_files
.
extend
(
ToolISE
.
HDL_FILES
)
self
.
_supported_files
.
extend
(
ToolISE
.
SUPPORTED_FILES
)
self
.
_hdl_files
.
update
(
ToolISE
.
HDL_FILES
)
self
.
_supported_files
.
update
(
ToolISE
.
SUPPORTED_FILES
)
self
.
_standard_libs
.
extend
(
ToolISE
.
STANDARD_LIBS
)
self
.
_clean_targets
.
update
(
ToolISE
.
CLEAN_TARGETS
)
self
.
_tcl_controls
.
update
(
ToolISE
.
TCL_CONTROLS
)
...
...
@@ -159,14 +161,3 @@ $(TCL_CLOSE)'''
self
.
_tcl_controls
[
"project"
]
=
project_tcl
.
format
(
"
\n
"
.
join
(
project_new
))
super
(
ToolISE
,
self
)
.
makefile_syn_tcl
()
def
makefile_syn_files
(
self
):
"""Write the files TCL section of the Makefile"""
hdl
=
" {0}"
self
.
writeln
(
"define TCL_FILES"
)
self
.
writeln
(
"set hdl_files {"
)
for
file_aux
in
self
.
fileset
:
self
.
writeln
(
hdl
.
format
(
file_aux
.
rel_path
()))
self
.
writeln
(
"}"
)
self
.
writeln
(
"endef"
)
self
.
writeln
(
"export TCL_FILES"
)
hdlmake/tools/make_syn.py
View file @
594750f9
...
...
@@ -113,10 +113,13 @@ export TCL_{1}
"""Write the files TCL section of the Makefile"""
ret
=
[]
ret
.
append
(
"define TCL_FILES"
)
for
hdl_filetype
in
self
.
_hdl_files
:
fileset_dict
=
{}
fileset_dict
.
update
(
self
.
_hdl_files
)
fileset_dict
.
update
(
self
.
_supported_files
)
for
filetype
in
fileset_dict
:
file_list
=
[]
for
file_aux
in
self
.
fileset
:
if
isinstance
(
file_aux
,
hdl_
filetype
):
if
isinstance
(
file_aux
,
filetype
):
file_list
.
append
(
file_aux
.
rel_path
())
if
not
file_list
==
[]:
ret
.
append
(
...
...
@@ -126,9 +129,9 @@ export TCL_{1}
'foreach filename $${0} {{
\n
'
' {2}
\n
'
' puts "Adding {0} file $$filename to the project."
\n
'
'}}'
.
format
(
hdl_
filetype
.
__name__
,
'}}'
.
format
(
filetype
.
__name__
,
'
\n
'
.
join
(
file_list
),
self
.
_hdl_files
[
hdl_
filetype
]))
fileset_dict
[
filetype
]))
ret
.
append
(
"endef"
)
ret
.
append
(
"export TCL_FILES"
)
self
.
writeln
(
'
\n
'
.
join
(
ret
))
...
...
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