Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
litedram
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
Kestrel Collaboration
Kestrel LiteX
litedram
Commits
75f87538
Commit
75f87538
authored
Dec 10, 2020
by
Florent Kermarrec
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bench: use common load_bios function.
parent
ea634802
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
29 additions
and
28 deletions
+29
-28
bench/arty.py
bench/arty.py
+2
-2
bench/common.py
bench/common.py
+19
-18
bench/genesys2.py
bench/genesys2.py
+2
-2
bench/kc705.py
bench/kc705.py
+2
-2
bench/kcu105.py
bench/kcu105.py
+2
-2
bench/xcu1525.py
bench/xcu1525.py
+2
-2
No files found.
bench/arty.py
View file @
75f87538
...
...
@@ -142,8 +142,8 @@ def main():
prog
.
load_bitstream
(
os
.
path
.
join
(
builder
.
gateware_dir
,
soc
.
build_name
+
".bit"
))
if
args
.
load_bios
:
from
common
import
s7_
load_bios
s7_
load_bios
(
"build/arty/software/bios/bios.bin"
)
from
common
import
load_bios
load_bios
(
"build/arty/software/bios/bios.bin"
)
if
args
.
set_sys_clk
is
not
None
:
from
common
import
s7_set_sys_clk
...
...
bench/common.py
View file @
75f87538
...
...
@@ -106,6 +106,24 @@ class BenchController:
self
.
bus
.
write
(
self
.
bus
.
mems
.
rom
.
base
+
4
*
i
,
data
)
time
.
sleep
(
delay
)
def
load_bios
(
bios_filename
):
from
litex
import
RemoteClient
bus
=
RemoteClient
()
bus
.
open
()
# # #
# Load BIOS and reboot SoC.
print
(
"Loading BIOS..."
)
ctrl
=
BenchController
(
bus
)
ctrl
.
load_rom
(
bios_filename
,
delay
=
1e-4
)
# FIXME: delay needed @ 115200bauds.
ctrl
.
reboot
()
# # #
bus
.
close
()
# Bench Test ---------------------------------------------------------------------------------------
def
s7_bench_test
(
freq_min
,
freq_max
,
freq_step
,
vco_freq
,
bios_filename
,
bios_timeout
=
40
):
...
...
@@ -172,24 +190,6 @@ def s7_bench_test(freq_min, freq_max, freq_step, vco_freq, bios_filename, bios_t
bus
.
close
()
def
s7_load_bios
(
bios_filename
):
from
litex
import
RemoteClient
bus
=
RemoteClient
()
bus
.
open
()
# # #
# Load BIOS and reboot SoC.
print
(
"Loading BIOS..."
)
ctrl
=
BenchController
(
bus
)
ctrl
.
load_rom
(
bios_filename
,
delay
=
1e-4
)
# FIXME: delay needed @ 115200bauds.
ctrl
.
reboot
()
# # #
bus
.
close
()
def
s7_set_sys_clk
(
clk_freq
,
vco_freq
):
import
time
from
litex
import
RemoteClient
...
...
@@ -280,6 +280,7 @@ def us_bench_test(freq_min, freq_max, freq_step, vco_freq, bios_filename, bios_t
for
c
in
bus
.
read
(
bus
.
regs
.
uart_xover_rxtx
.
addr
,
1
,
burst
=
"fixed"
):
print
(
"{:c}"
.
format
(
c
),
end
=
""
)
print
(
""
)
# # #
bus
.
close
()
bench/genesys2.py
View file @
75f87538
...
...
@@ -140,8 +140,8 @@ def main():
prog
.
load_bitstream
(
os
.
path
.
join
(
builder
.
gateware_dir
,
soc
.
build_name
+
".bit"
))
if
args
.
load_bios
:
from
common
import
s7_
load_bios
s7_
load_bios
(
"build/genesys2/software/bios/bios.bin"
)
from
common
import
load_bios
load_bios
(
"build/genesys2/software/bios/bios.bin"
)
if
args
.
set_sys_clk
is
not
None
:
from
common
import
s7_set_sys_clk
...
...
bench/kc705.py
View file @
75f87538
...
...
@@ -140,8 +140,8 @@ def main():
prog
.
load_bitstream
(
os
.
path
.
join
(
builder
.
gateware_dir
,
soc
.
build_name
+
".bit"
))
if
args
.
load_bios
:
from
common
import
s7_
load_bios
s7_
load_bios
(
"build/kc705/software/bios/bios.bin"
)
from
common
import
load_bios
load_bios
(
"build/kc705/software/bios/bios.bin"
)
if
args
.
set_sys_clk
is
not
None
:
from
common
import
us_set_sys_clk
...
...
bench/kcu105.py
View file @
75f87538
...
...
@@ -161,8 +161,8 @@ def main():
prog
.
load_bitstream
(
os
.
path
.
join
(
builder
.
gateware_dir
,
soc
.
build_name
+
".bit"
))
if
args
.
load_bios
:
from
common
import
s7_
load_bios
s7_
load_bios
(
"build/kcu105/software/bios/bios.bin"
)
from
common
import
load_bios
load_bios
(
"build/kcu105/software/bios/bios.bin"
)
if
args
.
set_sys_clk
is
not
None
:
from
common
import
us_set_sys_clk
...
...
bench/xcu1525.py
View file @
75f87538
...
...
@@ -151,8 +151,8 @@ def main():
prog
.
load_bitstream
(
os
.
path
.
join
(
builder
.
gateware_dir
,
soc
.
build_name
+
".bit"
))
if
args
.
load_bios
:
from
common
import
us_
load_bios
us_
load_bios
(
"build/xcu1525/software/bios/bios.bin"
)
from
common
import
load_bios
load_bios
(
"build/xcu1525/software/bios/bios.bin"
)
if
args
.
set_sys_clk
is
not
None
:
from
common
import
us_set_sys_clk
...
...
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