Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Kestrel Collaboration
Kestrel LiteX
migen
Commits
67679668
Commit
67679668
authored
7 years ago
by
William D. Jones
Committed by
Sébastien Bourdeauducq
7 years ago
Browse files
Options
Download
Email Patches
Plain Diff
lattice/icestorm: Add attribute support (keep).
parent
2274a75b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
1 deletion
+24
-1
migen/build/lattice/icestorm.py
migen/build/lattice/icestorm.py
+17
-0
migen/build/lattice/platform.py
migen/build/lattice/platform.py
+7
-1
No files found.
migen/build/lattice/icestorm.py
View file @
67679668
...
...
@@ -82,6 +82,23 @@ icepack {icepack_opt} {build_name}.txt {build_name}.bin{fail_stmt}
class
LatticeIceStormToolchain
:
attr_translate
=
{
"keep"
:
(
"keep"
,
"true"
),
"no_retiming"
:
None
,
# yosys does not do retiming
"async_reg"
:
None
,
# The next 5 attributes are Vivado-specific. Ignore.
"mr_ff"
:
None
,
"mr_false_path"
:
None
,
# user-defined attribute
"ars_ff1"
:
None
,
# user-defined attribute
"ars_ff2"
:
None
,
# user-defined attribute
"ars_false_path"
:
None
,
# user-defined attribute
# Shift reg primitive issues are ISE-specific. Ignore.
"no_shreg_extract"
:
None
}
def
__init__
(
self
):
self
.
yosys_opt
=
"-q"
self
.
pnr_opt
=
"-q"
...
...
This diff is collapsed.
Click to expand it.
migen/build/lattice/platform.py
View file @
67679668
...
...
@@ -18,7 +18,13 @@ class LatticePlatform(GenericPlatform):
def
get_verilog
(
self
,
*
args
,
special_overrides
=
dict
(),
**
kwargs
):
so
=
dict
(
common
.
lattice_special_overrides
)
so
.
update
(
special_overrides
)
return
GenericPlatform
.
get_verilog
(
self
,
*
args
,
special_overrides
=
so
,
**
kwargs
)
if
isinstance
(
self
.
toolchain
,
diamond
.
LatticeDiamondToolchain
):
return
GenericPlatform
.
get_verilog
(
self
,
*
args
,
special_overrides
=
so
,
**
kwargs
)
elif
isinstance
(
self
.
toolchain
,
icestorm
.
LatticeIceStormToolchain
):
return
GenericPlatform
.
get_verilog
(
self
,
*
args
,
special_overrides
=
so
,
attr_translate
=
self
.
toolchain
.
attr_translate
,
**
kwargs
)
else
:
raise
ValueError
(
"Unknown toolchain"
)
def
build
(
self
,
*
args
,
**
kwargs
):
return
self
.
toolchain
.
build
(
self
,
*
args
,
**
kwargs
)
...
...
This diff is collapsed.
Click to expand it.
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