Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Software for White Rabbit PTP Core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
32
Issues
32
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Software for White Rabbit PTP Core
Commits
02d430f1
Commit
02d430f1
authored
Feb 24, 2017
by
Maciej Lipinski
Committed by
Adam Wujek
Feb 27, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[tb/wrpc] updated test_1() to return OK/ERROR to the testbench
parent
25a0100b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
wrc_main_sim.c
wrc_main_sim.c
+8
-2
No files found.
wrc_main_sim.c
View file @
02d430f1
...
@@ -166,19 +166,25 @@ int wrpc_test_1(void)
...
@@ -166,19 +166,25 @@ int wrpc_test_1(void)
&
hwts
);
&
hwts
);
/** check whether the received value is OK */
/** check whether the received value is OK */
if
(
ret
==
0
)
if
(
ret
==
0
)
{
code
=
0xE0
;
/* Error: returned zero value */
code
=
0xE0
;
/* Error: returned zero value */
hdl_testbench
.
return_val
=
TESTBENCH_RET_ERROR
;
}
else
if
(
ret
>
0
)
{
else
if
(
ret
>
0
)
{
pl_cnt
=
0xFFFF
&
((
tx_payload
[
0
]
<<
8
)
|
tx_payload
[
1
]);
pl_cnt
=
0xFFFF
&
((
tx_payload
[
0
]
<<
8
)
|
tx_payload
[
1
]);
if
(
pl_cnt
==
rx_cnt
)
{
if
(
pl_cnt
==
rx_cnt
)
{
rx_cnt
++
;
rx_cnt
++
;
code
=
0xBB
;
/* OK */
code
=
0xBB
;
/* OK */
hdl_testbench
.
return_val
=
TESTBENCH_RET_OK
;
}
else
{
}
else
{
rx_cnt
=
pl_cnt
+
1
;
rx_cnt
=
pl_cnt
+
1
;
code
=
0xE1
;
/* Error: wrong seqID */
code
=
0xE1
;
/* Error: wrong seqID */
hdl_testbench
.
return_val
=
TESTBENCH_RET_ERROR
;
}
}
}
else
}
else
{
code
=
0xE2
;
/* Error: error of rx */
code
=
0xE2
;
/* Error: error of rx */
hdl_testbench
.
return_val
=
TESTBENCH_RET_ERROR
;
}
}
}
}
}
...
...
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