Commit e31f3745 authored by Maciej Lipinski's avatar Maciej Lipinski Committed by Adam Wujek

[tb/wrpc] for modelsim simulation

parent 2c69a7c0
......@@ -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
......
......@@ -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
......
#
# 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
......@@ -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;
......
/*
* 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();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment