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
0
Merge Requests
0
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
Timothy Pearson
litex-boards
Commits
aa35cd2e
Unverified
Commit
aa35cd2e
authored
Jun 03, 2020
by
enjoy-digital
Committed by
GitHub
Jun 03, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #79 from gsomlo/gls-trellis-sdcard
targets/trellisboard: add initial LiteSDCard support
parents
d87a11a9
f9a8edb9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
litex_boards/targets/trellisboard.py
litex_boards/targets/trellisboard.py
+9
-2
No files found.
litex_boards/targets/trellisboard.py
View file @
aa35cd2e
...
...
@@ -33,6 +33,7 @@ class _CRG(Module):
self
.
clock_domains
.
cd_sys
=
ClockDomain
()
self
.
clock_domains
.
cd_sys2x
=
ClockDomain
()
self
.
clock_domains
.
cd_sys2x_i
=
ClockDomain
(
reset_less
=
True
)
self
.
clock_domains
.
cd_clk10
=
ClockDomain
()
# FIXME: LiteSDCard test
# # #
...
...
@@ -55,6 +56,7 @@ class _CRG(Module):
pll
.
register_clkin
(
clk12
,
12e6
)
pll
.
create_clkout
(
self
.
cd_sys2x_i
,
2
*
sys_clk_freq
)
pll
.
create_clkout
(
self
.
cd_init
,
25e6
)
pll
.
create_clkout
(
self
.
cd_clk10
,
10e6
)
self
.
specials
+=
[
Instance
(
"ECLKBRIDGECS"
,
i_CLK0
=
self
.
cd_sys2x_i
.
clk
,
...
...
@@ -71,8 +73,9 @@ class _CRG(Module):
i_CLKI
=
self
.
cd_sys2x
.
clk
,
i_RST
=
self
.
cd_sys2x
.
rst
,
o_CDIVX
=
self
.
cd_sys
.
clk
),
AsyncResetSynchronizer
(
self
.
cd_init
,
~
por_done
|
~
pll
.
locked
|
rst
),
AsyncResetSynchronizer
(
self
.
cd_sys
,
~
por_done
|
~
pll
.
locked
|
rst
)
AsyncResetSynchronizer
(
self
.
cd_init
,
~
por_done
|
~
pll
.
locked
|
rst
),
AsyncResetSynchronizer
(
self
.
cd_sys
,
~
por_done
|
~
pll
.
locked
|
rst
),
AsyncResetSynchronizer
(
self
.
cd_clk10
,
~
por_done
|
~
pll
.
locked
|
rst
)
]
self
.
comb
+=
platform
.
request
(
"dram_vtt_en"
).
eq
(
1
)
...
...
@@ -132,13 +135,17 @@ def main():
parser
.
add_argument
(
"--sys-clk-freq"
,
default
=
75e6
,
help
=
"system clock frequency (default=75MHz)"
)
parser
.
add_argument
(
"--with-ethernet"
,
action
=
"store_true"
,
help
=
"enable Ethernet 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"
)
args
=
parser
.
parse_args
()
soc
=
BaseSoC
(
sys_clk_freq
=
int
(
float
(
args
.
sys_clk_freq
)),
with_ethernet
=
args
.
with_ethernet
,
**
soc_sdram_argdict
(
args
))
assert
not
(
args
.
with_spi_sdcard
and
args
.
with_sdcard
)
if
args
.
with_spi_sdcard
:
soc
.
add_spi_sdcard
()
if
args
.
with_sdcard
:
soc
.
add_sdcard
()
builder
=
Builder
(
soc
,
**
builder_argdict
(
args
))
builder_kargs
=
trellis_argdict
(
args
)
if
args
.
toolchain
==
"trellis"
else
{}
builder
.
build
(
**
builder_kargs
,
run
=
args
.
build
)
...
...
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