Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
litex-boards
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kestrel Collaboration
Kestrel LiteX
litex-boards
Commits
3463e3be
Unverified
Commit
3463e3be
authored
Dec 07, 2020
by
enjoy-digital
Committed by
GitHub
Dec 07, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #131 from antmicro/sync_arty
Sync Arty Board files with main LiteX repository
parents
0b8a01f9
18337cdf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
13 deletions
+20
-13
litex_boards/platforms/arty.py
litex_boards/platforms/arty.py
+3
-2
litex_boards/targets/arty.py
litex_boards/targets/arty.py
+17
-11
No files found.
litex_boards/platforms/arty.py
View file @
3463e3be
...
...
@@ -312,12 +312,12 @@ class Platform(XilinxPlatform):
default_clk_name
=
"clk100"
default_clk_period
=
1e9
/
100e6
def
__init__
(
self
,
variant
=
"a7-35"
):
def
__init__
(
self
,
variant
=
"a7-35"
,
toolchain
=
"vivado"
):
device
=
{
"a7-35"
:
"xc7a35ticsg324-1L"
,
"a7-100"
:
"xc7a100tcsg324-1"
}[
variant
]
XilinxPlatform
.
__init__
(
self
,
device
,
_io
,
_connectors
,
toolchain
=
"vivado"
)
XilinxPlatform
.
__init__
(
self
,
device
,
_io
,
_connectors
,
toolchain
=
toolchain
)
self
.
toolchain
.
bitstream_commands
=
\
[
"set_property BITSTREAM.CONFIG.SPI_BUSWIDTH 4 [current_design]"
]
self
.
toolchain
.
additional_commands
=
\
...
...
@@ -331,4 +331,5 @@ class Platform(XilinxPlatform):
def
do_finalize
(
self
,
fragment
):
XilinxPlatform
.
do_finalize
(
self
,
fragment
)
from
litex.build.xilinx
import
symbiflow
self
.
add_period_constraint
(
self
.
lookup_request
(
"clk100"
,
loose
=
True
),
1e9
/
100e6
)
litex_boards/targets/arty.py
View file @
3463e3be
...
...
@@ -4,6 +4,7 @@
# This file is part of LiteX-Boards.
#
# Copyright (c) 2015-2019 Florent Kermarrec <florent@enjoy-digital.fr>
# Copyright (c) 2020 Antmicro <www.antmicro.com>
# SPDX-License-Identifier: BSD-2-Clause
import
os
...
...
@@ -54,13 +55,13 @@ class _CRG(Module):
# BaseSoC ------------------------------------------------------------------------------------------
class
BaseSoC
(
SoCCore
):
def
__init__
(
self
,
sys_clk_freq
=
int
(
100e6
),
with_ethernet
=
False
,
with_etherbone
=
Fals
e
,
**
kwargs
):
platform
=
arty
.
Platform
()
def
__init__
(
self
,
toolchain
=
"vivado"
,
sys_clk_freq
=
int
(
100e6
),
with_ethernet
=
False
,
with_etherbone
=
False
,
ident_version
=
Tru
e
,
**
kwargs
):
platform
=
arty
.
Platform
(
toolchain
=
toolchain
)
# SoCCore ----------------------------------------------------------------------------------
SoCCore
.
__init__
(
self
,
platform
,
sys_clk_freq
,
ident
=
"LiteX SoC on Arty A7"
,
ident_version
=
True
,
ident_version
=
ident_version
,
**
kwargs
)
# CRG --------------------------------------------------------------------------------------
...
...
@@ -104,13 +105,15 @@ class BaseSoC(SoCCore):
def
main
():
parser
=
argparse
.
ArgumentParser
(
description
=
"LiteX SoC on Arty A7"
)
parser
.
add_argument
(
"--build"
,
action
=
"store_true"
,
help
=
"Build bitstream"
)
parser
.
add_argument
(
"--load"
,
action
=
"store_true"
,
help
=
"Load bitstream"
)
parser
.
add_argument
(
"--sys-clk-freq"
,
default
=
100e6
,
help
=
"System clock frequency (default: 100MHz)"
)
parser
.
add_argument
(
"--with-ethernet"
,
action
=
"store_true"
,
help
=
"Enable Ethernet support"
)
parser
.
add_argument
(
"--with-etherbone"
,
action
=
"store_true"
,
help
=
"Enable Etherbone support"
)
parser
.
add_argument
(
"--with-spi-sdcard"
,
action
=
"store_true"
,
help
=
"Enable SPI-mode SDCard support"
)
parser
.
add_argument
(
"--with-sdcard"
,
action
=
"store_true"
,
help
=
"Enable SDCard support"
)
parser
.
add_argument
(
"--toolchain"
,
default
=
"vivado"
,
help
=
"Toolchain use to build (default: vivado)"
)
parser
.
add_argument
(
"--build"
,
action
=
"store_true"
,
help
=
"Build bitstream"
)
parser
.
add_argument
(
"--load"
,
action
=
"store_true"
,
help
=
"Load bitstream"
)
parser
.
add_argument
(
"--sys-clk-freq"
,
default
=
100e6
,
help
=
"System clock frequency (default: 100MHz)"
)
parser
.
add_argument
(
"--with-ethernet"
,
action
=
"store_true"
,
help
=
"Enable Ethernet support"
)
parser
.
add_argument
(
"--with-etherbone"
,
action
=
"store_true"
,
help
=
"Enable Etherbone support"
)
parser
.
add_argument
(
"--with-spi-sdcard"
,
action
=
"store_true"
,
help
=
"Enable SPI-mode SDCard support"
)
parser
.
add_argument
(
"--with-sdcard"
,
action
=
"store_true"
,
help
=
"Enable SDCard support"
)
parser
.
add_argument
(
"--no-ident-version"
,
action
=
"store_false"
,
help
=
"Disable build time output"
)
builder_args
(
parser
)
soc_sdram_args
(
parser
)
vivado_build_args
(
parser
)
...
...
@@ -118,9 +121,11 @@ def main():
assert
not
(
args
.
with_ethernet
and
args
.
with_etherbone
)
soc
=
BaseSoC
(
toolchain
=
args
.
toolchain
,
sys_clk_freq
=
int
(
float
(
args
.
sys_clk_freq
)),
with_ethernet
=
args
.
with_ethernet
,
with_etherbone
=
args
.
with_etherbone
,
ident_version
=
args
.
no_ident_version
,
**
soc_sdram_argdict
(
args
)
)
assert
not
(
args
.
with_spi_sdcard
and
args
.
with_sdcard
)
...
...
@@ -130,7 +135,8 @@ def main():
if
args
.
with_sdcard
:
soc
.
add_sdcard
()
builder
=
Builder
(
soc
,
**
builder_argdict
(
args
))
builder
.
build
(
**
vivado_build_argdict
(
args
),
run
=
args
.
build
)
builder_kwargs
=
vivado_build_argdict
(
args
)
if
args
.
toolchain
==
"vivado"
else
{}
builder
.
build
(
**
builder_kwargs
,
run
=
args
.
build
)
if
args
.
load
:
prog
=
soc
.
platform
.
create_programmer
()
...
...
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