Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
rkx7-litex-boards
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Reform
rkx7-litex-boards
Commits
caac75c7
Commit
caac75c7
authored
Jun 16, 2021
by
Florent Kermarrec
Browse files
Options
Downloads
Patches
Plain Diff
trenz_max1000: Review/Cleanup.
parent
8ef138ea
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
litex_boards/platforms/trenz_max1000.py
+39
-27
39 additions, 27 deletions
litex_boards/platforms/trenz_max1000.py
litex_boards/targets/trenz_max1000.py
+3
-3
3 additions, 3 deletions
litex_boards/targets/trenz_max1000.py
with
42 additions
and
30 deletions
litex_boards/platforms/trenz_max1000.py
+
39
−
27
View file @
caac75c7
# This file is Copyright (c) 2019 (year 0 AG) Antti Lukats <antti.lukats@gmail.com>
#
# This file is Copyright (c) 2014-2019 Florent Kermarrec <florent@enjoy-digital.fr>
# This file is part of LiteX-Boards.
# License: BSD
#
# Copyright (c) 2019-2021 Antti Lukats <antti.lukats@gmail.com>
# info about the board http://trenz.org/max1000-info
# SPDX-License-Identifier: BSD-2-Clause
#
# http://trenz.org/max1000-info
from
litex.build.generic_platform
import
*
from
litex.build.generic_platform
import
*
from
litex.build.altera
import
AlteraPlatform
from
litex.build.altera
import
AlteraPlatform
...
@@ -11,17 +13,30 @@ from litex.build.altera.programmer import USBBlaster
...
@@ -11,17 +13,30 @@ from litex.build.altera.programmer import USBBlaster
# IOs ----------------------------------------------------------------------------------------------
# IOs ----------------------------------------------------------------------------------------------
_io
=
[
_io
=
[
(
"
clk12
"
,
0
,
Pins
(
"
H6
"
),
IOStandard
(
"
3.3-V LVTTL
"
)),
# 12MHz clock
# Clk / Rst
(
"
user_led
"
,
0
,
Pins
(
"
C5
"
),
IOStandard
(
"
3.3-V LVTTL
"
)),
# CONF Done, inverted polarity
(
"
clk12
"
,
0
,
Pins
(
"
H6
"
),
IOStandard
(
"
3.3-V LVTTL
"
)),
(
"
sw
"
,
0
,
Pins
(
"
E6
"
),
IOStandard
(
"
3.3-V LVTTL
"
)),
# Leds
(
"
sw
"
,
1
,
Pins
(
"
E7
"
),
IOStandard
(
"
3.3-V LVTTL
"
)),
# nConfig
(
"
user_led
"
,
0
,
Pins
(
"
A8
"
),
IOStandard
(
"
3.3-V LVTTL
"
)),
(
"
user_led
"
,
1
,
Pins
(
"
A9
"
),
IOStandard
(
"
3.3-V LVTTL
"
)),
(
"
user_led
"
,
2
,
Pins
(
"
A11
"
),
IOStandard
(
"
3.3-V LVTTL
"
)),
(
"
user_led
"
,
3
,
Pins
(
"
A10
"
),
IOStandard
(
"
3.3-V LVTTL
"
)),
(
"
user_led
"
,
4
,
Pins
(
"
B10
"
),
IOStandard
(
"
3.3-V LVTTL
"
)),
(
"
user_led
"
,
5
,
Pins
(
"
C9
"
),
IOStandard
(
"
3.3-V LVTTL
"
)),
(
"
user_led
"
,
6
,
Pins
(
"
C10
"
),
IOStandard
(
"
3.3-V LVTTL
"
)),
(
"
user_led
"
,
7
,
Pins
(
"
D8
"
),
IOStandard
(
"
3.3-V LVTTL
"
)),
# Buttons
(
"
user_btn
"
,
0
,
Pins
(
"
E6
"
),
IOStandard
(
"
3.3-V LVTTL
"
)),
(
"
user_btn
"
,
1
,
Pins
(
"
E7
"
),
IOStandard
(
"
3.3-V LVTTL
"
)),
# nConfig.
# Serial
(
"
serial
"
,
0
,
(
"
serial
"
,
0
,
Subsignal
(
"
tx
"
,
Pins
(
"
B4
"
),
IOStandard
(
"
3.3-V LVTTL
"
)),
Subsignal
(
"
tx
"
,
Pins
(
"
B4
"
),
IOStandard
(
"
3.3-V LVTTL
"
)),
Subsignal
(
"
rx
"
,
Pins
(
"
A4
"
),
IOStandard
(
"
3.3-V LVTTL
"
))
Subsignal
(
"
rx
"
,
Pins
(
"
A4
"
),
IOStandard
(
"
3.3-V LVTTL
"
))
),
),
# SPI Flash
(
"
spiflash4x
"
,
0
,
(
"
spiflash4x
"
,
0
,
Subsignal
(
"
cs_n
"
,
Pins
(
"
B3
"
)),
Subsignal
(
"
cs_n
"
,
Pins
(
"
B3
"
)),
Subsignal
(
"
clk
"
,
Pins
(
"
A3
"
)),
Subsignal
(
"
clk
"
,
Pins
(
"
A3
"
)),
...
@@ -38,26 +53,25 @@ _io = [
...
@@ -38,26 +53,25 @@ _io = [
IOStandard
(
"
3.3-V LVTTL
"
),
IOStandard
(
"
3.3-V LVTTL
"
),
),
),
# SDRAM
(
"
sdram_clock
"
,
0
,
Pins
(
"
M9
"
),
IOStandard
(
"
3.3-V LVTTL
"
)),
(
"
sdram_clock
"
,
0
,
Pins
(
"
M9
"
),
IOStandard
(
"
3.3-V LVTTL
"
)),
(
"
sdram
"
,
0
,
(
"
sdram
"
,
0
,
Subsignal
(
"
a
"
,
Pins
(
"
K6 M5 N5 J8 N10 M11 N9 L10 M13 N8 N4 M10
"
)),
#0, 1, ...
Subsignal
(
"
a
"
,
Pins
(
"
K6 M5 N5 J8 N10 M11 N9 L10
"
,
"
M13 N8 N4 M10
"
)),
Subsignal
(
"
ba
"
,
Pins
(
"
N6 K8
"
)),
Subsignal
(
"
ba
"
,
Pins
(
"
N6 K8
"
)),
Subsignal
(
"
cs_n
"
,
Pins
(
"
M4
"
)),
Subsignal
(
"
cs_n
"
,
Pins
(
"
M4
"
)),
Subsignal
(
"
cke
"
,
Pins
(
"
M8
"
)),
Subsignal
(
"
cke
"
,
Pins
(
"
M8
"
)),
Subsignal
(
"
ras_n
"
,
Pins
(
"
M7
"
)),
Subsignal
(
"
ras_n
"
,
Pins
(
"
M7
"
)),
Subsignal
(
"
cas_n
"
,
Pins
(
"
N7
"
)),
Subsignal
(
"
cas_n
"
,
Pins
(
"
N7
"
)),
Subsignal
(
"
we_n
"
,
Pins
(
"
K7
"
)),
Subsignal
(
"
we_n
"
,
Pins
(
"
K7
"
)),
Subsignal
(
"
dq
"
,
Pins
(
"
D11 G10 F10 F9 E10 D9 G9 F8 F13 E12 E13 D12 C12 B12 B13 A12
"
)),
Subsignal
(
"
dq
"
,
Pins
(
"
D11 G10 F10 F9 E10 D9 G9 F8
"
,
"
F13 E12 E13 D12 C12 B12 B13 A12
"
)),
Subsignal
(
"
dm
"
,
Pins
(
"
E9 F12
"
)),
Subsignal
(
"
dm
"
,
Pins
(
"
E9 F12
"
)),
IOStandard
(
"
3.3-V LVTTL
"
)
IOStandard
(
"
3.3-V LVTTL
"
)
),
),
(
"
gpio_leds
"
,
0
,
Pins
(
"
A8 A9 A11 A10 B10 C9 C10 D8
"
),
IOStandard
(
"
3.3-V LVTTL
"
)
),
# all IO not connected to peripherals mapped to MFIO
# all IO not connected to peripherals mapped to MFIO
# <- LEDS -> <- PMOD -> <- D0..D14, D11R, D12R -> <- AIN0..AIN7 -> JE [C O I S i1 i2]sw
# <- LEDS -> <- PMOD -> <- D0..D14, D11R, D12R -> <- AIN0..AIN7 -> JE [C O I S i1 i2]sw
(
"
bbio
"
,
0
,
Pins
(
"
A8 A9 A11 A10 B10 C9 C10 D8 M3 L3 M2 M1 N3 N2 K2 K1 H8 K10 H5 H4 J1 J2 L12 J12 J13 K11 K12 J10 H10 H13 G12 B11 G13 E1 C2 C1 D1 E3 F1 E4 B1 E5 J6 J7 K5 L5 J5 L4 E6
"
),
(
"
bbio
"
,
0
,
Pins
(
"
A8 A9 A11 A10 B10 C9 C10 D8 M3 L3 M2 M1 N3 N2 K2 K1 H8 K10 H5 H4 J1 J2 L12 J12 J13 K11 K12 J10 H10 H13 G12 B11 G13 E1 C2 C1 D1 E3 F1 E4 B1 E5 J6 J7 K5 L5 J5 L4 E6
"
),
...
@@ -70,10 +84,8 @@ _io = [
...
@@ -70,10 +84,8 @@ _io = [
class
Platform
(
AlteraPlatform
):
class
Platform
(
AlteraPlatform
):
default_clk_name
=
"
clk12
"
default_clk_name
=
"
clk12
"
default_clk_period
=
83
default_clk_period
=
1e9
/
12e6
# def __init__(self, device):
# AlteraPlatform.__init__(self, device, _io)
def
__init__
(
self
):
def
__init__
(
self
):
AlteraPlatform
.
__init__
(
self
,
"
10M08SAU169C8G
"
,
_io
)
AlteraPlatform
.
__init__
(
self
,
"
10M08SAU169C8G
"
,
_io
)
self
.
add_platform_command
(
"
set_global_assignment -name FAMILY
\"
MAX 10
\"
"
)
self
.
add_platform_command
(
"
set_global_assignment -name FAMILY
\"
MAX 10
\"
"
)
...
...
This diff is collapsed.
Click to expand it.
litex_boards/targets/trenz_max1000.py
100644 → 100755
+
3
−
3
View file @
caac75c7
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
#
#
# This file is part of LiteX-Boards.
# This file is part of LiteX-Boards.
#
#
# Copyright (c) 20
21 Jakub Cabal <jakubcabal
@gmail.com>
# Copyright (c) 20
19-2021 Antti Lukats <antti.lukats
@gmail.com>
# SPDX-License-Identifier: BSD-2-Clause
# SPDX-License-Identifier: BSD-2-Clause
import
os
import
os
...
@@ -11,7 +11,7 @@ import argparse
...
@@ -11,7 +11,7 @@ import argparse
from
migen
import
*
from
migen
import
*
from
litex_boards.platforms
import
trenz_
max1000
from
litex_boards.platforms
import
max1000
from
litex.soc.cores.clock
import
CycloneVPLL
from
litex.soc.cores.clock
import
CycloneVPLL
from
litex.soc.integration.soc_core
import
*
from
litex.soc.integration.soc_core
import
*
...
@@ -48,7 +48,7 @@ class _CRG(Module):
...
@@ -48,7 +48,7 @@ class _CRG(Module):
class
BaseSoC
(
SoCCore
):
class
BaseSoC
(
SoCCore
):
def
__init__
(
self
,
sys_clk_freq
=
int
(
50e6
),
**
kwargs
):
def
__init__
(
self
,
sys_clk_freq
=
int
(
50e6
),
**
kwargs
):
platform
=
trenz_
max1000
.
Platform
()
platform
=
max1000
.
Platform
()
kwargs
[
"
integrated_rom_size
"
]
=
0x6000
kwargs
[
"
integrated_rom_size
"
]
=
0x6000
kwargs
[
"
integrated_sram_size
"
]
=
0x1000
kwargs
[
"
integrated_sram_size
"
]
=
0x1000
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment