Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
x393
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
x393
Commits
8731fd2f
Commit
8731fd2f
authored
Mar 30, 2016
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Corrected address offsets
parent
c6586f9e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
297 additions
and
295 deletions
+297
-295
x393.c
py393/generated/x393.c
+288
-288
x393.h
py393/generated/x393.h
+1
-0
x393_export_c.py
py393/x393_export_c.py
+8
-7
No files found.
py393/generated/x393.c
View file @
8731fd2f
This source diff could not be displayed because it is too large. You can
view the blob
instead.
py393/generated/x393.h
View file @
8731fd2f
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
#include "elphel/x393_types.h"
#include "elphel/x393_types.h"
//#include "elphel/x393_defs.h // alternative variant"
//#include "elphel/x393_defs.h // alternative variant"
// See elphel/x393_map.h for the ordered list of all I/O register addresses used
// init_mmio_ptr() should be called once before using any of the other declared functions
// init_mmio_ptr() should be called once before using any of the other declared functions
int
init_mmio_ptr
(
void
);
int
init_mmio_ptr
(
void
);
...
...
py393/x393_export_c.py
View file @
8731fd2f
...
@@ -127,6 +127,7 @@ class X393ExportC(object):
...
@@ -127,6 +127,7 @@ class X393ExportC(object):
# Includes section
# Includes section
txt
=
'
\n
#include "elphel/x393_types.h"
\n
'
txt
=
'
\n
#include "elphel/x393_types.h"
\n
'
txt
+=
'//#include "elphel/x393_defs.h // alternative variant"
\n\n
'
txt
+=
'//#include "elphel/x393_defs.h // alternative variant"
\n\n
'
txt
+=
'// See elphel/x393_map.h for the ordered list of all I/O register addresses used
\n
'
txt
+=
'// init_mmio_ptr() should be called once before using any of the other declared functions
\n\n
'
txt
+=
'// init_mmio_ptr() should be called once before using any of the other declared functions
\n\n
'
txt
+=
'int init_mmio_ptr(void);
\n
'
txt
+=
'int init_mmio_ptr(void);
\n
'
...
@@ -1193,7 +1194,7 @@ class X393ExportC(object):
...
@@ -1193,7 +1194,7 @@ class X393ExportC(object):
elif
(
mode
==
'func_def'
):
elif
(
mode
==
'func_def'
):
return
self
.
func_define
(
define_tuple
=
(
name
,
return
self
.
func_define
(
define_tuple
=
(
name
,
var_name
,
var_name
,
address
*
4
+
self
.
MAXI0_BASE
,
address
*
4
,
#
+ self.MAXI0_BASE,
address_inc
*
4
,
address_inc
*
4
,
var_range
,
var_range
,
data_type
,
data_type
,
...
@@ -1287,7 +1288,7 @@ class X393ExportC(object):
...
@@ -1287,7 +1288,7 @@ class X393ExportC(object):
s
+=
'{
%
s d;
%
s = readl(mmio_ptr + '
%
(
data_type
,
td
)
s
+=
'{
%
s d;
%
s = readl(mmio_ptr + '
%
(
data_type
,
td
)
if
address_inc
:
if
address_inc
:
s
+=
'(0x
%0
8
x'
%
(
address
)
s
+=
'(0x
%0
4
x'
%
(
address
)
if
multivar
:
if
multivar
:
for
vn
,
vi
in
zip
(
var_name
,
address_inc
):
for
vn
,
vi
in
zip
(
var_name
,
address_inc
):
s
+=
' + 0x
%
x *
%
s'
%
(
vi
,
vn
.
lower
())
s
+=
' + 0x
%
x *
%
s'
%
(
vi
,
vn
.
lower
())
...
@@ -1295,7 +1296,7 @@ class X393ExportC(object):
...
@@ -1295,7 +1296,7 @@ class X393ExportC(object):
s
+=
' + 0x
%
x *
%
s'
%
(
address_inc
,
arg
)
s
+=
' + 0x
%
x *
%
s'
%
(
address_inc
,
arg
)
s
+=
')'
s
+=
')'
else
:
else
:
s
+=
'0x
%0
8
x'
%
(
address
)
s
+=
'0x
%0
4
x'
%
(
address
)
s
+=
'); return d; }'
s
+=
'); return d; }'
else
:
else
:
s
+=
';'
s
+=
';'
...
@@ -1342,7 +1343,7 @@ class X393ExportC(object):
...
@@ -1342,7 +1343,7 @@ class X393ExportC(object):
td
=
'd'
td
=
'd'
s
+=
'{writel(
%
s, mmio_ptr + '
%
(
td
)
s
+=
'{writel(
%
s, mmio_ptr + '
%
(
td
)
if
address_inc
:
if
address_inc
:
s
+=
'(0x
%0
8
x'
%
(
address
)
s
+=
'(0x
%0
4
x'
%
(
address
)
if
multivar
:
if
multivar
:
for
vn
,
vi
in
zip
(
var_name
,
address_inc
):
for
vn
,
vi
in
zip
(
var_name
,
address_inc
):
s
+=
' + 0x
%
x *
%
s'
%
(
vi
,
vn
.
lower
())
s
+=
' + 0x
%
x *
%
s'
%
(
vi
,
vn
.
lower
())
...
@@ -1350,7 +1351,7 @@ class X393ExportC(object):
...
@@ -1350,7 +1351,7 @@ class X393ExportC(object):
s
+=
' + 0x
%
x *
%
s'
%
(
address_inc
,
arg
)
s
+=
' + 0x
%
x *
%
s'
%
(
address_inc
,
arg
)
s
+=
')'
s
+=
')'
else
:
else
:
s
+=
'0x
%0
8
x'
%
(
address
)
s
+=
'0x
%0
4
x'
%
(
address
)
s
+=
');}'
s
+=
');}'
else
:
else
:
s
+=
';'
s
+=
';'
...
@@ -1388,7 +1389,7 @@ class X393ExportC(object):
...
@@ -1388,7 +1389,7 @@ class X393ExportC(object):
# s+='{'
# s+='{'
s
+=
'{writel(0, mmio_ptr + '
s
+=
'{writel(0, mmio_ptr + '
if
address_inc
:
if
address_inc
:
s
+=
'(0x
%0
8
x'
%
(
address
)
s
+=
'(0x
%0
4
x'
%
(
address
)
if
multivar
:
if
multivar
:
for
vn
,
vi
in
zip
(
var_name
,
address_inc
):
for
vn
,
vi
in
zip
(
var_name
,
address_inc
):
s
+=
' + 0x
%
x *
%
s'
%
(
vi
,
vn
.
lower
())
s
+=
' + 0x
%
x *
%
s'
%
(
vi
,
vn
.
lower
())
...
@@ -1396,7 +1397,7 @@ class X393ExportC(object):
...
@@ -1396,7 +1397,7 @@ class X393ExportC(object):
s
+=
' + 0x
%
x *
%
s'
%
(
address_inc
,
arg
)
s
+=
' + 0x
%
x *
%
s'
%
(
address_inc
,
arg
)
s
+=
')'
s
+=
')'
else
:
else
:
s
+=
'0x
%0
8
x'
%
(
address
)
s
+=
'0x
%0
4
x'
%
(
address
)
s
+=
');}'
s
+=
');}'
else
:
else
:
s
+=
';'
s
+=
';'
...
...
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