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
6
Merge Requests
6
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
dec144d5
Commit
dec144d5
authored
Feb 27, 2017
by
Adam Wujek
💬
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch "ML-sim_fixes"
parents
3fbbe7b9
9a94d846
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
4 deletions
+24
-4
spec_snmp_defconfig
configs/spec_snmp_defconfig
+4
-1
spec_snmp_set_verbose_defconfig
configs/spec_snmp_set_verbose_defconfig
+4
-1
wrc_main_sim.c
wrc_main_sim.c
+16
-2
No files found.
configs/spec_snmp_defconfig
View file @
dec144d5
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
#
#
# CONFIG_WR_SWITCH is not set
# CONFIG_WR_SWITCH is not set
CONFIG_WR_NODE=y
CONFIG_WR_NODE=y
CONFIG_PPSI_FORCE_CONFIG=y
CONFIG_PRINT_BUFSIZE=128
CONFIG_PRINT_BUFSIZE=128
CONFIG_RAMSIZE=131072
CONFIG_RAMSIZE=131072
CONFIG_TEMP_POLL_INTERVAL=15
CONFIG_TEMP_POLL_INTERVAL=15
...
@@ -26,13 +27,14 @@ CONFIG_IP=y
...
@@ -26,13 +27,14 @@ CONFIG_IP=y
# CONFIG_SYSLOG is not set
# CONFIG_SYSLOG is not set
CONFIG_SNMP=y
CONFIG_SNMP=y
# CONFIG_SNMP_SET is not set
# CONFIG_SNMP_SET is not set
CONFIG_SNMP_AUX_DIAG=y
CONFIG_SNMP_HW_TYPE="spec"
CONFIG_SNMP_HW_TYPE="spec"
# CONFIG_BUILD_INIT is not set
# CONFIG_BUILD_INIT is not set
CONFIG_INIT_COMMAND=""
CONFIG_INIT_COMMAND=""
CONFIG_HAS_BUILD_INIT=0
CONFIG_HAS_BUILD_INIT=0
CONFIG_HAS_FLASH_INIT=1
CONFIG_HAS_FLASH_INIT=1
CONFIG_FLASH_INIT=y
CONFIG_FLASH_INIT=y
# CONFIG_AUX_DIAG is not set
CONFIG_AUX_DIAG=y
#
#
# wrpc-sw is tainted if you change the following options
# wrpc-sw is tainted if you change the following options
...
@@ -44,4 +46,5 @@ CONFIG_PRINTF_XINT=y
...
@@ -44,4 +46,5 @@ CONFIG_PRINTF_XINT=y
# CONFIG_PRINTF_NONE is not set
# CONFIG_PRINTF_NONE is not set
CONFIG_SDB_STORAGE=y
CONFIG_SDB_STORAGE=y
# CONFIG_LEGACY_EEPROM is not set
# CONFIG_LEGACY_EEPROM is not set
# CONFIG_WR_NODE_SIM is not set
CONFIG_VLAN_ARRAY_SIZE=1
CONFIG_VLAN_ARRAY_SIZE=1
configs/spec_snmp_set_verbose_defconfig
View file @
dec144d5
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
#
#
# CONFIG_WR_SWITCH is not set
# CONFIG_WR_SWITCH is not set
CONFIG_WR_NODE=y
CONFIG_WR_NODE=y
CONFIG_PPSI_FORCE_CONFIG=y
CONFIG_PRINT_BUFSIZE=128
CONFIG_PRINT_BUFSIZE=128
CONFIG_RAMSIZE=131072
CONFIG_RAMSIZE=131072
CONFIG_TEMP_POLL_INTERVAL=15
CONFIG_TEMP_POLL_INTERVAL=15
...
@@ -30,13 +31,14 @@ CONFIG_IP=y
...
@@ -30,13 +31,14 @@ CONFIG_IP=y
# CONFIG_SYSLOG is not set
# CONFIG_SYSLOG is not set
CONFIG_SNMP=y
CONFIG_SNMP=y
CONFIG_SNMP_SET=y
CONFIG_SNMP_SET=y
CONFIG_SNMP_AUX_DIAG=y
CONFIG_SNMP_HW_TYPE="spec"
CONFIG_SNMP_HW_TYPE="spec"
# CONFIG_BUILD_INIT is not set
# CONFIG_BUILD_INIT is not set
CONFIG_INIT_COMMAND=""
CONFIG_INIT_COMMAND=""
CONFIG_HAS_BUILD_INIT=0
CONFIG_HAS_BUILD_INIT=0
CONFIG_HAS_FLASH_INIT=1
CONFIG_HAS_FLASH_INIT=1
CONFIG_FLASH_INIT=y
CONFIG_FLASH_INIT=y
# CONFIG_AUX_DIAG is not set
CONFIG_AUX_DIAG=y
#
#
# wrpc-sw is tainted if you change the following options
# wrpc-sw is tainted if you change the following options
...
@@ -61,4 +63,5 @@ CONFIG_FAKE_TEMPERATURES=y
...
@@ -61,4 +63,5 @@ CONFIG_FAKE_TEMPERATURES=y
CONFIG_SDB_STORAGE=y
CONFIG_SDB_STORAGE=y
# CONFIG_LEGACY_EEPROM is not set
# CONFIG_LEGACY_EEPROM is not set
# CONFIG_LATENCY_PROBE is not set
# CONFIG_LATENCY_PROBE is not set
# CONFIG_WR_NODE_SIM is not set
CONFIG_VLAN_ARRAY_SIZE=1
CONFIG_VLAN_ARRAY_SIZE=1
wrc_main_sim.c
View file @
dec144d5
...
@@ -35,9 +35,11 @@
...
@@ -35,9 +35,11 @@
#define TESTBENCH_MAGIC 0x4d433ebc
#define TESTBENCH_MAGIC 0x4d433ebc
#define TESTBENCH_VERSION 1
#define TESTBENCH_VERSION 1
#define TESTBENCH_RET_NO_TEST 0
#define TESTBENCH_RET_OK 1
#define TESTBENCH_RET_OK 1
#define TESTBENCH_RET_ERROR 2
#define TESTBENCH_RET_ERROR 2
/*
/*
* This is a structure to pass information from the testbench to lm32's
* This is a structure to pass information from the testbench to lm32's
* software. hdl_testbench structure is meant to be set by testbench through
* software. hdl_testbench structure is meant to be set by testbench through
...
@@ -92,6 +94,7 @@ static void wrc_sim_initialize(void)
...
@@ -92,6 +94,7 @@ static void wrc_sim_initialize(void)
minic_init
();
minic_init
();
shw_pps_gen_init
();
shw_pps_gen_init
();
spll_very_init
();
spll_very_init
();
shw_pps_gen_enable_output
(
1
);
}
}
/*
/*
* This is a test used by:
* This is a test used by:
...
@@ -163,19 +166,25 @@ int wrpc_test_1(void)
...
@@ -163,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
;
}
}
}
}
}
...
@@ -192,6 +201,11 @@ void main(void)
...
@@ -192,6 +201,11 @@ void main(void)
;
;
}
}
switch
(
hdl_testbench
.
test_num
)
{
switch
(
hdl_testbench
.
test_num
)
{
case
0
:
/* for simulations that just need link-up */
hdl_testbench
.
return_val
=
TESTBENCH_RET_NO_TEST
;
while
(
1
)
;
case
1
:
case
1
:
wrpc_test_1
();
wrpc_test_1
();
break
;
break
;
...
...
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