Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pts-base
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
misc
pts-base
Commits
2f5f41b7
Commit
2f5f41b7
authored
12 years ago
by
user
Browse files
Options
Downloads
Patches
Plain Diff
Add a function to return the file descriptor of the SPEC board.
This function is used by the fmc_delay C library.
parent
ce1dbfb5
Branches
Branches containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gnurabbit/python/rr.py
+6
-2
6 additions, 2 deletions
gnurabbit/python/rr.py
with
6 additions
and
2 deletions
gnurabbit/python/rr.py
+
6
−
2
View file @
2f5f41b7
...
...
@@ -70,6 +70,9 @@ class Gennum(object):
self
.
loaderlib
=
CDLL
(
cwd
+
Gennum
.
rr_loader_lib
)
self
.
fd
=
os
.
open
(
Gennum
.
device
,
os
.
O_RDWR
)
def
get_fd
(
self
):
return
self
.
fd
def
iread
(
self
,
bar
,
offset
,
width
):
"""
do a read by means of the ioctl interface
...
...
@@ -188,10 +191,11 @@ class Gennum(object):
return
self
.
errno
def
load_firmware
(
self
,
bitstream
):
self
.
loaderlib
.
rr_init
(
self
.
fd
)
self
.
err
=
self
.
loaderlib
.
rr_init
(
self
.
fd
)
self
.
loaderlib
.
gpio_config
()
self
.
loaderlib
.
gpio_bootselect
(
GENNUM_FPGA
)
return
self
.
loaderlib
.
rr_load_bitstream_from_file
(
bitstream
)
self
.
err
=
self
.
loaderlib
.
rr_load_bitstream_from_file
(
bitstream
)
return
self
.
err
if
__name__
==
'
__main__
'
:
g
=
Gennum
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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