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
42600066
Commit
42600066
authored
Mar 13, 2017
by
Javier D. Garcia-Lasheras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle hdl and supported files as a dictionay and test it on Vivado
parent
d255ef82
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
21 deletions
+25
-21
vivado.py
hdlmake/tools/vivado.py
+14
-4
xilinx.py
hdlmake/tools/xilinx.py
+11
-17
No files found.
hdlmake/tools/vivado.py
View file @
42600066
...
...
@@ -46,9 +46,19 @@ class ToolVivado(ToolXilinx, ToolSim):
STANDARD_LIBS
=
[
'ieee'
,
'std'
]
SUPPORTED_FILES
=
[
XDCFile
,
XCIFile
,
NGCFile
,
XMPFile
,
XCOFile
,
COEFile
,
BDFile
,
TCLFile
,
MIFFile
,
RAMFile
,
VHOFile
,
VEOFile
]
SUPPORTED_FILES
=
{
XDCFile
:
ToolXilinx
.
_XILINX_SOURCE
,
XCIFile
:
ToolXilinx
.
_XILINX_SOURCE
,
NGCFile
:
ToolXilinx
.
_XILINX_SOURCE
,
XMPFile
:
ToolXilinx
.
_XILINX_SOURCE
,
XCOFile
:
ToolXilinx
.
_XILINX_SOURCE
,
COEFile
:
ToolXilinx
.
_XILINX_SOURCE
,
BDFile
:
ToolXilinx
.
_XILINX_SOURCE
,
TCLFile
:
ToolXilinx
.
_XILINX_SOURCE
,
MIFFile
:
ToolXilinx
.
_XILINX_SOURCE
,
RAMFile
:
ToolXilinx
.
_XILINX_SOURCE
,
VHOFile
:
ToolXilinx
.
_XILINX_SOURCE
,
VEOFile
:
ToolXilinx
.
_XILINX_SOURCE
}
CLEAN_TARGETS
=
{
'clean'
:
[
"run.tcl"
,
".Xil"
,
"*.jou"
,
"*.log"
,
"*.pb"
,
"$(PROJECT).cache"
,
"$(PROJECT).data"
,
"work"
,
...
...
@@ -70,7 +80,7 @@ class ToolVivado(ToolXilinx, ToolSim):
def
__init__
(
self
):
super
(
ToolVivado
,
self
)
.
__init__
()
self
.
_tool_info
.
update
(
ToolVivado
.
TOOL_INFO
)
self
.
_supported_files
.
extend
(
ToolVivado
.
SUPPORTED_FILES
)
self
.
_supported_files
.
update
(
ToolVivado
.
SUPPORTED_FILES
)
self
.
_standard_libs
.
extend
(
ToolVivado
.
STANDARD_LIBS
)
self
.
_clean_targets
.
update
(
ToolVivado
.
CLEAN_TARGETS
)
self
.
_tcl_controls
.
update
(
ToolVivado
.
TCL_CONTROLS
)
...
...
hdlmake/tools/xilinx.py
View file @
42600066
...
...
@@ -34,7 +34,15 @@ class ToolXilinx(ToolSyn):
"""Class providing the interface for Xilinx Vivado synthesis"""
HDL_FILES
=
[
VHDLFile
,
VerilogFile
,
SVFile
]
_XILINX_SOURCE
=
(
"add_files -norecurse $$filename
\n
"
"set_property IS_GLOBAL_INCLUDE 1 [get_files $$filename]"
)
HDL_FILES
=
{
VHDLFile
:
_XILINX_SOURCE
,
VerilogFile
:
_XILINX_SOURCE
,
SVFile
:
_XILINX_SOURCE
}
SUPPORTED_FILES
=
{
TCLFile
:
'source $$filename'
}
CLEAN_TARGETS
=
{
'mrproper'
:
[
"*.bit"
,
"*.bin"
]}
...
...
@@ -67,7 +75,8 @@ $(TCL_CLOSE)'''
def
__init__
(
self
):
super
(
ToolXilinx
,
self
)
.
__init__
()
self
.
_hdl_files
.
extend
(
ToolXilinx
.
HDL_FILES
)
self
.
_hdl_files
.
update
(
ToolXilinx
.
HDL_FILES
)
self
.
_supported_files
.
update
(
ToolXilinx
.
SUPPORTED_FILES
)
self
.
_clean_targets
.
update
(
ToolXilinx
.
CLEAN_TARGETS
)
self
.
_tcl_controls
.
update
(
ToolXilinx
.
TCL_CONTROLS
)
...
...
@@ -130,18 +139,3 @@ $(TCL_CLOSE)'''
"impl_1"
,
"
\n
"
.
join
(
par_new
))
super
(
ToolXilinx
,
self
)
.
makefile_syn_tcl
()
def
makefile_syn_files
(
self
):
"""Write the files TCL section of the Makefile"""
self
.
writeln
(
"define TCL_FILES"
)
tmp
=
"add_files -norecurse {0}"
tcl
=
"source {0}"
hack
=
"set_property IS_GLOBAL_INCLUDE 1 [get_files {0}]"
for
file_aux
in
self
.
fileset
:
if
isinstance
(
file_aux
,
TCLFile
):
self
.
writeln
(
tcl
.
format
(
file_aux
.
rel_path
()))
else
:
self
.
writeln
(
tmp
.
format
(
file_aux
.
rel_path
()))
self
.
writeln
(
hack
.
format
(
file_aux
.
rel_path
()))
self
.
writeln
(
"endef"
)
self
.
writeln
(
"export TCL_FILES"
)
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