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
29
Issues
29
List
Board
Labels
Milestones
Merge Requests
5
Merge Requests
5
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
e31f3745
Commit
e31f3745
authored
Feb 03, 2017
by
Maciej Lipinski
Committed by
Adam Wujek
Feb 23, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[tb/wrpc] for modelsim simulation
parent
2c69a7c0
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
111 additions
and
1 deletion
+111
-1
Kconfig
Kconfig
+13
-0
Makefile
Makefile
+1
-0
wrpc_sim_defconfig
configs/wrpc_sim_defconfig
+61
-0
wrc_main.c
wrc_main.c
+2
-1
wrc_main_sim.c
wrc_main_sim.c
+34
-0
No files found.
Kconfig
View file @
e31f3745
...
...
@@ -503,6 +503,19 @@ config LATENCY_SYSLOG
bool "Report latency problems to syslog"
default y
config WR_NODE_SIM
depends on WR_NODE
boolean "Build simple software for test of WR PTP Core in simulatin"
default n
help
This option builds binary that is meant to be used in testbench
simulations. It initializes only simulation-needed essentials.
All the initialization that is time-consuming and unnecessery
is avoided. The main function sends min-size frames to PTP
MAC address destination and expects the simulation to return
these frames.
# This is needed to size the pp_instance data strucuture. Instead of
# including the ppsi autoconf.h, with duplicate definitions, define it
# here, as we know what the value is
...
...
Makefile
View file @
e31f3745
...
...
@@ -30,6 +30,7 @@ LDS-$(CONFIG_WR_SWITCH) = arch/lm32/ram-wrs.ld
LDS-$(CONFIG_HOST_PROCESS)
=
obj-$(CONFIG_WR_NODE)
+=
wrc_main.o
obj-$(CONFIG_WR_NODE_SIM)
+=
wrc_main_sim.o
obj-$(CONFIG_WR_SWITCH)
+=
wrs_main.o
obj-$(CONFIG_WR_SWITCH)
+=
ipc/minipc-mem-server.o
ipc/rt_ipc.o
...
...
configs/wrpc_sim_defconfig
0 → 100644
View file @
e31f3745
#
# Automatically generated file; DO NOT EDIT.
# WR PTP Core software configuration
#
# CONFIG_WR_SWITCH is not set
CONFIG_WR_NODE=y
CONFIG_PPSI_FORCE_CONFIG=y
CONFIG_PRINT_BUFSIZE=128
CONFIG_RAMSIZE=131072
CONFIG_TEMP_POLL_INTERVAL=15
# CONFIG_PLL_VERBOSE is not set
# CONFIG_PFILTER_VERBOSE is not set
# CONFIG_WRC_VERBOSE is not set
# CONFIG_VLAN is not set
CONFIG_VLAN_NR=0
CONFIG_VLAN_1_FOR_CLASS7=0
CONFIG_VLAN_2_FOR_CLASS7=0
CONFIG_VLAN_FOR_CLASS6=0
# CONFIG_HOST_PROCESS is not set
CONFIG_LM32=y
CONFIG_EMBEDDED_NODE=y
# CONFIG_WR_NODE_PCS16 is not set
CONFIG_STACKSIZE=2048
CONFIG_PPSI=y
CONFIG_UART=y
CONFIG_W1=y
CONFIG_LATENCY_ETHTYPE=291
# CONFIG_P2P is not set
# CONFIG_IP is not set
# CONFIG_CMD_CONFIG is not set
# CONFIG_BUILD_INIT is not set
CONFIG_INIT_COMMAND=""
CONFIG_HAS_BUILD_INIT=0
CONFIG_HAS_FLASH_INIT=1
CONFIG_FLASH_INIT=y
# CONFIG_AUX_DIAG is not set
#
# wrpc-sw is tainted if you change the following options
#
CONFIG_DEVELOPER=y
# CONFIG_CMD_LL is not set
# CONFIG_CHECK_RESET is not set
# CONFIG_SPLL_FIFO_LOG is not set
CONFIG_PRINTF_IS_XINT=y
# CONFIG_PRINTF_IS_FULL is not set
# CONFIG_PRINTF_IS_MINI is not set
# CONFIG_PRINTF_IS_NONE is not set
CONFIG_PRINTF_XINT=y
# CONFIG_PRINTF_FULL is not set
# CONFIG_PRINTF_MINI is not set
# CONFIG_PRINTF_NONE is not set
# CONFIG_DETERMINISTIC_BINARY is not set
# CONFIG_UART_SW is not set
# CONFIG_NET_VERBOSE is not set
# CONFIG_FAKE_TEMPERATURES is not set
CONFIG_SDB_STORAGE=y
# CONFIG_LEGACY_EEPROM is not set
# CONFIG_LATENCY_PROBE is not set
CONFIG_WR_NODE_SIM=y
CONFIG_VLAN_ARRAY_SIZE=1
wrc_main.c
View file @
e31f3745
...
...
@@ -231,7 +231,7 @@ static void account_task(struct wrc_task *t, int done_sth)
}
/* Run a task with profiling */
static
void
wrc_run_task
(
struct
wrc_task
*
t
)
void
wrc_run_task
(
struct
wrc_task
*
t
)
{
int
done_sth
=
0
;
...
...
@@ -245,6 +245,7 @@ static void wrc_run_task(struct wrc_task *t)
account_task
(
t
,
done_sth
);
}
int
main
(
void
)
__attribute__
((
weak
));
int
main
(
void
)
{
struct
wrc_task
*
t
;
...
...
wrc_main_sim.c
0 → 100644
View file @
e31f3745
/*
* This work is part of the White Rabbit project
*
* Copyright (C) 2011,2012 CERN (www.cern.ch)
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
* Author: Grzegorz Daniluk <grzegorz.daniluk@cern.ch>
*
* Released according to the GNU GPL, version 2 or any later version.
*/
#include <stdio.h>
#include <inttypes.h>
#include "system_checks.h"
void
wrc_run_task
(
struct
wrc_task
*
t
);
int
main
(
void
)
{
struct
wrc_task
*
t
;
check_reset
();
/* initialization of individual tasks */
for_each_task
(
t
)
if
(
t
->
init
)
t
->
init
();
for
(;;)
{
for_each_task
(
t
)
wrc_run_task
(
t
);
/* better safe than sorry */
check_stack
();
}
}
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