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
edb220cb
Commit
edb220cb
authored
Apr 04, 2019
by
Javier D. Garcia-Lasheras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Provide the Quartus properties as a dictionary
parent
63139ec6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
27 deletions
+30
-27
quartus.py
hdlmake/tools/quartus.py
+30
-27
No files found.
hdlmake/tools/quartus.py
View file @
edb220cb
...
...
@@ -155,11 +155,11 @@ class ToolQuartus(ToolSyn):
property_dict
=
{
'what'
:
None
,
'name'
:
None
,
'
name_
type'
:
None
,
'from
_
'
:
None
,
'to
_
'
:
None
,
'type'
:
None
,
'from'
:
None
,
'to'
:
None
,
'section_id'
:
None
,
'tag
_
'
:
None
}
'tag'
:
None
}
property_dict
.
update
(
new_property
)
words
=
[]
words
.
append
(
dict
([(
b
,
a
)
for
a
,
b
in
...
...
@@ -168,17 +168,17 @@ class ToolQuartus(ToolSyn):
words
.
append
(
property_dict
[
'what'
])
if
property_dict
[
'name'
]
is
not
None
:
words
.
append
(
"-name"
)
words
.
append
(
property_dict
[
'name_type'
])
words
.
append
(
property_dict
[
'name'
])
if
property_dict
[
'from_'
]
is
not
None
:
words
.
append
(
'
\\
"
%
s
\\
"'
%
property_dict
[
'value'
])
if
property_dict
[
'from'
]
is
not
None
:
words
.
append
(
"-from"
)
words
.
append
(
property_dict
[
'from
_
'
])
if
property_dict
[
'tag
_
'
]
is
not
None
:
words
.
append
(
property_dict
[
'from'
])
if
property_dict
[
'tag'
]
is
not
None
:
words
.
append
(
"-tag"
)
words
.
append
(
property_dict
[
't
o_
'
])
if
property_dict
[
'to
_
'
]
is
not
None
:
words
.
append
(
property_dict
[
't
ag
'
])
if
property_dict
[
'to'
]
is
not
None
:
words
.
append
(
"-to"
)
words
.
append
(
property_dict
[
'to
_
'
])
words
.
append
(
property_dict
[
'to'
])
if
property_dict
[
'section_id'
]
is
not
None
:
words
.
append
(
"-section_id"
)
words
.
append
(
property_dict
[
'section_id'
])
...
...
@@ -190,24 +190,27 @@ class ToolQuartus(ToolSyn):
command_list
.
append
(
self
.
_tcl_controls
[
"project"
])
command_list
.
append
(
self
.
_emit_property
(
self
.
SET_GLOBAL_ASSIGNMENT
,
{
'name
_type
'
:
'FAMILY'
,
'
name'
:
'
\\
"$(SYN_FAMILY)
\\
"
'
}))
{
'name'
:
'FAMILY'
,
'
value'
:
'$(SYN_FAMILY)
'
}))
command_list
.
append
(
self
.
_emit_property
(
self
.
SET_GLOBAL_ASSIGNMENT
,
{
'name
_type
'
:
'DEVICE'
,
'
name'
:
'
\\
"$(SYN_DEVICE)
\\
"
'
}))
{
'name'
:
'DEVICE'
,
'
value'
:
'$(SYN_DEVICE)
'
}))
command_list
.
append
(
self
.
_emit_property
(
self
.
SET_GLOBAL_ASSIGNMENT
,
{
'name
_type
'
:
'TOP_LEVEL_ENTITY'
,
'
name'
:
'
\\
"$(TOP_MODULE)
\\
"
'
}))
{
'name'
:
'TOP_LEVEL_ENTITY'
,
'
value'
:
'$(TOP_MODULE)
'
}))
for
user_property
in
self
.
manifest_dict
.
get
(
"syn_properties"
,
[]):
if
not
isinstance
(
user_property
,
dict
):
logging
.
error
(
"Quartus property should be defined as dict: "
+
str
(
user_property
))
quit
(
1
)
command_list
.
append
(
self
.
_emit_property
(
self
.
SET_GLOBAL_ASSIGNMENT
,
{
'name_type'
:
user_property
[
0
],
'name'
:
'
\\
"
%
s
\\
"'
%
user_property
[
1
]}))
user_property
))
for
inc
in
self
.
manifest_dict
.
get
(
"include_dirs"
,
[]):
command_list
.
append
(
self
.
_emit_property
(
self
.
SET_GLOBAL_ASSIGNMENT
,
{
'name
_type
'
:
'SEARCH_PATH'
,
'
name'
:
'
\\
"
%
s
\\
"'
%
inc
}))
{
'name'
:
'SEARCH_PATH'
,
'
value'
:
inc
}))
self
.
_tcl_controls
[
"project"
]
=
'
\n
'
.
join
(
command_list
)
super
(
ToolQuartus
,
self
)
.
_makefile_syn_tcl
()
...
...
@@ -224,8 +227,8 @@ class ToolQuartus(ToolSyn):
quit
(
1
)
preflow
=
'"'
+
'quartus_sh:'
+
path
+
'"'
command_list
.
append
(
self
.
_emit_property
(
self
.
SET_GLOBAL_ASSIGNMENT
,
{
'name
_type
'
:
'PRE_FLOW_SCRIPT_FILE'
,
'
nam
e'
:
preflow
}))
{
'name'
:
'PRE_FLOW_SCRIPT_FILE'
,
'
valu
e'
:
preflow
}))
if
"quartus_postmodule"
in
self
.
manifest_dict
:
path
=
shell
.
tclpath
(
path_mod
.
compose
(
self
.
manifest_dict
[
"quartus_postmodule"
],
...
...
@@ -237,8 +240,8 @@ class ToolQuartus(ToolSyn):
quit
(
1
)
postmodule
=
'"'
+
'quartus_sh:'
+
path
+
'"'
command_list
.
append
(
self
.
_emit_property
(
self
.
SET_GLOBAL_ASSIGNMENT
,
{
'name
_type
'
:
'POST_MODULE_SCRIPT_FILE'
,
'
nam
e'
:
postmodule
}))
{
'name'
:
'POST_MODULE_SCRIPT_FILE'
,
'
valu
e'
:
postmodule
}))
if
"quartus_postflow"
in
self
.
manifest_dict
:
path
=
shell
.
tclpath
(
path_mod
.
compose
(
self
.
manifest_dict
[
"quartus_postflow"
],
os
.
getcwd
()))
...
...
@@ -249,7 +252,7 @@ class ToolQuartus(ToolSyn):
quit
(
1
)
postflow
=
'"'
+
'quartus_sh:'
+
path
+
'"'
command_list
.
append
(
self
.
_emit_property
(
self
.
SET_GLOBAL_ASSIGNMENT
,
{
'name
_type
'
:
'POST_FLOW_SCRIPT_FILE'
,
'
nam
e'
:
postflow
}))
{
'name'
:
'POST_FLOW_SCRIPT_FILE'
,
'
valu
e'
:
postflow
}))
self
.
_tcl_controls
[
"files"
]
=
'
\n
'
.
join
(
command_list
)
super
(
ToolQuartus
,
self
)
.
_makefile_syn_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