Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
DIOT Igloo2-based radiation-tolerant System Board
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
7
Issues
7
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Projects
DIOT Igloo2-based radiation-tolerant System Board
Commits
88f7ef82
Commit
88f7ef82
authored
Mar 14, 2023
by
Tristan Gingold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fip_urv: do not send pad
parent
8ee50fb0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
42 deletions
+41
-42
fip_urv.c
sw/fip_urv/fip_urv.c
+29
-32
mfip_urv.c
sw/mfip_urv/mfip_urv.c
+12
-10
No files found.
sw/fip_urv/fip_urv.c
View file @
88f7ef82
...
...
@@ -435,13 +435,14 @@ copy_app_to_fip(void)
return
0
;
src
=
&
REGS
->
sh_mem
[
128
+
(
rslot
<<
5
)];
d
&=
0xffffff0f
;
d
|=
CMD_APP_FLAG
;
d
=
*
src
++
;
d
&=
0xffffff0f
;
d
|=
CMD_APP_FLAG
;
/* Produce variable */
REGS
->
fip_var3
=
1
;
/* Unpack and copy */
i
=
0
;
while
(
1
)
{
...
...
@@ -455,6 +456,8 @@ copy_app_to_fip(void)
d
>>=
8
;
}
REGS
->
fip_var3
=
0
;
/* Update slot. */
REGS
->
app
[
0
].
mailboxes
.
mboxout
=
(
lmb
+
1
)
&
0xffffff03
;
...
...
@@ -592,7 +595,7 @@ int main (void)
}
if
(
fip_status
&
1
)
{
/* Variable received (from FIP) */
/* Variable
var1
received (from FIP) */
unsigned
char
cmd
;
unsigned
char
id
;
...
...
@@ -603,12 +606,6 @@ int main (void)
if
(
cmd
&
CMD_APP_FLAG
)
{
/* Just data. */
copy_fip_to_app
(
cmd
);
reply
[
0
]
=
CMD_ERROR
;
reply
[
1
]
=
0
;
/* Send data or pad. */
rdy
=
2
;
}
else
{
id
=
REGS
->
fip_reg
[
0x03
];
...
...
@@ -765,10 +762,9 @@ int main (void)
reply
[
6
]
=
0
;
reply
[
7
]
=
0
;
}
else
{
/* No reply for pad (or error). */
reply
[
0
]
=
CMD_ERROR
;
/* Send a pad. */
rdy
=
2
;
rdy
=
0
;
}
}
...
...
@@ -776,31 +772,32 @@ int main (void)
REGS
->
fip_var1
=
0
;
}
if
(
(
fip_status
&
2
)
&&
rdy
)
{
int
i
;
if
(
fip_status
&
2
)
{
/* var3 can be written. */
/* Produce variable */
REGS
->
fip_var3
=
1
;
/* High priority: answer packet from management. */
if
(
rdy
)
{
int
i
;
if
(
rdy
==
2
)
{
/* No reply to send (either app data or pad was received). */
if
(
copy_app_to_fip
())
{
/* But we could send data. */
goto
wr_done
;
}
else
stat_regs
[
STAT_FIP_PAD
]
++
;
}
/* Produce variable */
REGS
->
fip_var3
=
1
;
/* Write a reply. */
for
(
i
=
0
;
i
<
rlen
;
i
++
)
{
REGS
->
fip_reg
[
0x102
+
i
]
=
reply
[
i
];
}
/* Write a reply. */
for
(
i
=
0
;
i
<
rlen
;
i
++
)
{
REGS
->
fip_reg
[
0x102
+
i
]
=
reply
[
i
];
}
wr_done:
REGS
->
fip_var3
=
0
;
REGS
->
fip_var3
=
0
;
rdy
=
0
;
rdy
=
0
;
}
else
if
(
copy_app_to_fip
())
{
/* done */
}
else
{
/* Nothing to do; do not send data, clear var3_rdy. */
REGS
->
fip_var3
=
2
;
}
}
if
((
i2c
.
state
&
0x0f
)
!=
I2C_CMD_IDLE
)
{
...
...
sw/mfip_urv/mfip_urv.c
View file @
88f7ef82
...
...
@@ -252,14 +252,16 @@ static int read_cons_vars(void)
return
0
;
case
MSTRFIP_DATA_PAYLOAD_ERROR
:
ftb
->
nbr_errors
++
;
fprintf
(
stderr
,
"%s var cons: payload err (%u):"
,
now
(),
ftb
->
nbr_errors
);
if
(
pvar
->
payload_error
&
MSTRFIP_FRAME_PAYLOAD_NOT_REFRESH
)
fprintf
(
stderr
,
" not-refreshed"
);
if
(
pvar
->
payload_error
&
MSTRFIP_FRAME_PAYLOAD_NOT_SIGNIFICANT
)
fprintf
(
stderr
,
" not-significant"
);
fprintf
(
stderr
,
"
\n
"
);
if
(
0
)
{
ftb
->
nbr_errors
++
;
fprintf
(
stderr
,
"%s var cons: payload err (%u):"
,
now
(),
ftb
->
nbr_errors
);
if
(
pvar
->
payload_error
&
MSTRFIP_FRAME_PAYLOAD_NOT_REFRESH
)
fprintf
(
stderr
,
" not-refreshed"
);
if
(
pvar
->
payload_error
&
MSTRFIP_FRAME_PAYLOAD_NOT_SIGNIFICANT
)
fprintf
(
stderr
,
" not-significant"
);
fprintf
(
stderr
,
"
\n
"
);
}
return
1
;
case
MSTRFIP_DATA_NOT_RECEIVED
:
...
...
@@ -306,8 +308,8 @@ static int update_prod_vars(void)
pvar
->
buffer
[
2
]
=
0
;
pvar
->
buffer
[
3
]
=
0
;
if
(
flag_trace
)
fprintf
(
stderr
,
"Send padding (%s)
\n
"
,
ftb
->
waitrep
?
"waiting for reply"
:
"idle"
);
fprintf
(
stderr
,
"Send padding (%s)
\n
"
,
ftb
->
waitrep
?
"waiting for reply"
:
"idle"
);
}
else
if
(
ftb
->
idx_cmd
>=
ftb
->
nbr_cmds
)
{
/* End of command list. */
...
...
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