Kconfig 13.6 KB
Newer Older
1 2 3

mainmenu "WR PTP Core software configuration"

4 5
# Later we'll build wr_cpu.bin for wr-switch from this code base
config WR_SWITCH
6
	bool "Build rt_cpu.bin, for the WR-Switch FPGA"
7
	default n
8
	select UART
9 10 11

config WR_NODE
	bool
12
	default !WR_SWITCH
13

14 15
# most options with no prompt here are prompted-for in the "advanced" section

16 17 18 19
config PPSI_FORCE_CONFIG
	bool
	default y

20
config PRINT_BUFSIZE
21 22
	int
	default 128
23

24 25
config RAMSIZE
	int
26
	default 65536 if WR_SWITCH
27
	default 131072
28

29 30 31 32
config TEMP_POLL_INTERVAL
	int
	default 15

33 34 35 36
config PLL_VERBOSE
	boolean
	default y if WR_SWITCH

37 38 39
config PFILTER_VERBOSE
	boolean

40 41 42 43
config WRC_VERBOSE
	boolean
	default y if WR_SWITCH

44 45 46 47 48 49 50
config VLAN
	boolean

config VLAN_NR
	int
	default 10 if VLAN
	default 0
51

52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
config VLAN_1_FOR_CLASS7
	int
	default 20 if VLAN
	default 0

config VLAN_2_FOR_CLASS7
	int
	default 30 if VLAN
	default 0

config VLAN_FOR_CLASS6
	int
	default 100 if VLAN
	default 0

67 68 69 70 71 72 73 74 75 76 77
config HOST_PROCESS
	boolean
	default n

config LM32
	boolean
	default !HOST_PROCESS

config EMBEDDED_NODE
	boolean
	default LM32 && WR_NODE
78

79 80
# CONFIG_WR_SWITCH has no further options at all at this point

81 82 83 84 85 86 87 88
config WR_NODE_PCS16
	depends on WR_NODE
	boolean "Compile for 16-bit PCS"
	default n
	help
		This allows to compile the WR PTP Core software for 16-bit PCS platforms
		(e.g. Kintex-7).

89
config STACKSIZE
90 91
	depends on WR_NODE
	int
92 93
	default 2048

94
config PPSI
95
	depends on WR_NODE
96 97
	boolean
	default y
Aurelio Colosimo's avatar
Aurelio Colosimo committed
98

99 100
config UART
	boolean
101 102
	default y if EMBEDDED_NODE
	default n
Aurelio Colosimo's avatar
Aurelio Colosimo committed
103

104
config W1
105
	depends on EMBEDDED_NODE
106 107
	boolean
	default y
Aurelio Colosimo's avatar
Aurelio Colosimo committed
108

109 110
config LATENCY_ETHTYPE
	int
111
	default 291
112

113 114 115
config LATENCY_SYSLOG
	bool

116 117
# The other ones can be set by non-developers

118 119 120 121 122 123 124 125 126 127 128
config P2P
	depends on WR_NODE
	default n
	boolean "Build peer-delay mechanism (and prefer it)"
	help
	  This choice selects peer-to-peer ("P2P"), or "peer delay"
	  PTP protocol. If activated, but P2P and E2E (end to end)
	  are built, and they can be chosen at run time, with P2P preset.
	  If you deny this option, P2P code is not built, to save some
	  binary size.

129
config IP
130
	depends on WR_NODE
131
	boolean "Compile minimal IP support in wrpc-sw"
132
	help
133 134 135
	  This allows to run LM32 code that is aware of IP. The feature is
	  needed to run Etherbone in your gateware, because Etherbone
	  is UDP-based and thus the CPU needs to run DHCP.
136

137
config CMD_CONFIG
138
	depends on WR_NODE
139
	boolean "Include configuration in the output binary"
Aurelio Colosimo's avatar
Aurelio Colosimo committed
140
	help
141 142 143
	  This options adds the "config" command to the shell, which
	  reports the current configuration.  This adds half a kilobyte
	  to the binary size (100b for the code plus the .config file).
Aurelio Colosimo's avatar
Aurelio Colosimo committed
144

145 146 147 148 149 150 151 152
config SYSLOG
	depends on IP
	boolean "Include syslog client support"
	help
	  This enable a UDP syslog client, configured by a shell command.
	  The user (or init script) must use "syslog <ipaddr> <macaddr>"
	  to enable it.  The special "off" ipaddr disables syslog.

Adam Wujek's avatar
Adam Wujek committed
153 154 155 156 157
config SNMP
       depends on IP
       default y
       boolean "Mini SNMP responder"

Adam Wujek's avatar
Adam Wujek committed
158 159 160 161 162 163 164
config SNMP_SET
       depends on SNMP
       default y
       boolean "Add SET support to the Mini SNMP responder"
       help
	  This option enables support for SET requests for Mini SNMP responder

165 166 167 168 169 170 171 172
config SNMP_AUX_DIAG
       depends on SNMP && AUX_DIAG
       default y if AUX_DIAG
       default n
       boolean "Adds support of auxiliary diagnostics registers to SNMP"
       help
	  This option adds branch wrpcAuxDiag to the SNMP

173
config SNMP_HW_TYPE
174
	depends on SNMP
175 176
	default "spec"
	string "Hardware type reported by SNMP"
177

178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207
config BUILD_INIT
	depends on WR_NODE
	default n
	boolean "Include an init command in the binary (build-time)"

config INIT_COMMAND
	depends on BUILD_INIT
	string "Enter the init command, use ';' as command separator"
	default ""

config INIT_COMMAND
	string
	default ""

# The following two integer values are derived, and used in if() (shell.c)
config HAS_BUILD_INIT
	int
	default 1 if BUILD_INIT
	default 0

config HAS_FLASH_INIT
	int
	default 1 if FLASH_INIT
	default 0

config FLASH_INIT
  boolean
  default y if EMBEDDED_NODE
  default n

208 209 210 211 212 213 214
config AUX_DIAG
       default n
       boolean "Add support for auxiliary diagnostics registers"
       help
	  This option adds support for read/write of aux diag registers and
	  the diag command.

215 216 217 218 219 220 221 222 223 224 225 226 227
#
# This is a set of configuration options that should not be changed by
# normal users. If the "developer" menu is used, the binary is tainted.

comment "wrpc-sw is tainted if you change the following options"
config DEVELOPER
	bool "Advanced configurations, only for developers"
	help
	  The following options are new features under testing, or
	  special customizations not normally useful for people not
	  directly working on this package.  Please don't use unless
	  you are a developer of wrpc-sw.

228 229 230 231 232 233 234 235 236 237
config PPSI_FORCE_CONFIG
	depends on DEVELOPER && WR_NODE       
	bool "Reconfigure ppsi from wrpc-sw at every build"
	default y
	help
	  If you are playing with custom ppsi configurations, please
	  disable this. Otherwise the option allows wrpc-sw to always
	  reconfigura ppsi, so if you change from end-to-end to
	  peer-to-peer here, the change is propagated to the ppsi build.

238
config HOST_PROCESS
239
	depends on DEVELOPER && WR_NODE
240 241 242 243
	boolean "Build as a host process, to develop/debug network"

config RAMSIZE
	depends on DEVELOPER && EMBEDDED_NODE
244 245 246 247 248 249 250
	int "Size of the RAM in the FPGA for this program"
	default 90112
	help
	  The usual configuration for wrpc-sw is 0x16000 bytes
	  (i.e. 88kB = 90112 bytes) but if your project has less or
	  more features you may want to adjust the FPGA size and
	  choose your preferred value here.
Aurelio Colosimo's avatar
Aurelio Colosimo committed
251

252
config STACKSIZE
253
	depends on DEVELOPER && EMBEDDED_NODE
254 255 256 257 258 259
	int "Size of the stack area needed by this program"
	default 2048
	help
	  The linker complains if the code doesn't fit into RAM, but
	  we must also consider the stack, or the program will crash
	  at run time. (However, we have a detector for overflows).
260

261
config PRINT_BUFSIZE
262
	depends on DEVELOPER && WR_NODE
263 264 265 266 267 268 269
	int "Size for the temporary output string of pp_printf"
	default 128
	help
	  This buffer is constant storage (i.e. wasted space), but it
	  also constraints the maximum lenght of text that can be written
	  in a single call to printf.

270 271 272 273
config TEMP_POLL_INTERVAL
	depends on DEVELOPER && WR_NODE
	int "Poll interval, in seconds, for temperature sensors"

274 275 276 277 278 279 280 281 282 283
config TEMP_HIGH_THRESHOLD
	depends on DEVELOPER && WR_NODE && SYSLOG
	default 70
	int "Threshold for temperature: tell syslog if higher"

config TEMP_HIGH_RAPPEL
	depends on DEVELOPER && WR_NODE && SYSLOG
	default 60
	int "Remember over-temperature every that many seconds"

284
config CMD_LL
285
	depends on DEVELOPER && EMBEDDED_NODE
286 287 288 289 290 291 292 293
	bool "Build low-level commands for development/testing"
	help
	  This enables low-level commands: "devmem" to read/write memory
	  and "delays" to read/write the constant delays in this device.
	  Please note that the delays have no immediate effect when set
	  on the master, because they are just sent to the slave
	  during the initial handshake

294
config FLASH_INIT
295
	depends on DEVELOPER && EMBEDDED_NODE
296 297 298
	default y
	boolean "Read init commands from flash storage"

299
# CHECK_RESET for switch and node
300
config CHECK_RESET
301
	depends on DEVELOPER && !HOST_PROCESS
302 303 304 305 306 307
	bool "Print a stack trace if reset happens"
	help
	  If the CPU is following a NULL pointer, the program will
	  be restarted. If this option is activated, the main function
	  detects that it is re-executed and dumps a stack trace; it
	  then clears the stack (for next time) and restarts again.
308

309
config SPLL_FIFO_LOG
310
	depends on DEVELOPER && !HOST_PROCESS
311 312 313 314 315 316 317
	bool "Add a circular buffer for spll logging, used by tools/wrpc-dump"
	help
	  This option addrs 256 bytes to the wrpc bynary, to log
	  the DDMTD tags read from the fifos, the interrupts and the
	  related timing.  The information is shown by tools/wrpc-dump
	  if present, no change/rebuild of the tool is needed.

318 319
choice
	prompt "Implementation of pp_printf"
320
	depends on DEVELOPER && WR_NODE
321

322
config PRINTF_IS_XINT
323 324 325 326 327 328
	bool "hex-and-int"
	help
	  This selects a printf that can only print decimal and hex
	  numbers, without obeying the format modifiers. %c and %s are
	  supported too, and %p is equivalent to %x.
	  See pp_printf/README for details.
329

330
config PRINTF_IS_FULL
331
	bool "full"
332 333 334 335 336 337
	help
	  This selects an implementation that supports all standard
	  formats with modifiers, like "%08X" and "%.5s". It costs
	  around 2k of compiled code more than XINT.
	  See pp_printf/README for details.

338
config PRINTF_IS_MINI
339
	bool "minimal"
340 341 342 343 344 345
	help
	  This selects a printf that prints all integers as hex,
	  without obeying the format modifiers. %c and %s are
	  supported too. See pp_printf/README for details.
	  This is not probably what you want for wrpc-sw.

346
config PRINTF_IS_NONE
347
	bool "empty"
348 349 350 351 352 353
	help
	  This selects a printf that prints the format string
	  alone and ignores all further arguments. Minimal size,
	  but not suited for wrpc-sw. See pp_printf/README for details.
endchoice

354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370
config PRINTF_XINT
	boolean
	default PRINTF_IS_XINT if (DEVELOPER && WR_NODE)
	default y

config PRINTF_FULL
       boolean
       default PRINTF_IS_FULL

config PRINTF_MINI
       boolean
       default PRINTF_IS_MINI

config PRINTF_NONE
       boolean
       default PRINTF_IS_NONE

371
config PPSI
372
	depends on WR_NODE
373
	boolean
374
	help
375
	  Select this option for the ppsi engine (now only option)
376 377

config DETERMINISTIC_BINARY
378
	depends on DEVELOPER && EMBEDDED_NODE
379
	boolean "Build a binary that is the same every time"
380
	help
381 382 383 384 385 386 387 388
	  This option is used to #ifdef __DATE__ and __TIME__ strings
	  out of the compiled WRC binary. If you set it you'll get the
	  same binary bit-by-bit at each rebuild.  I am using this
	  option to hack the build procedure and use a simple "diff"
	  between the old and new output to verify I didn't introduce
	  changes.

	  If in doubt, say No.
389

390 391
config UART
	boolean "Use hardware uart (and/or vuart if available)"
392
	depends on (DEVELOPER && EMBEDDED_NODE) || WR_SWITCH
393
	help
394 395 396
	  This option selects the serial driver, connected to either
	  the USB socket, or "vuart" (software fifo) or both, according
	  to how the gateware is built. 
397

398
config UART_SW
399
	depends on DEVELOPER && EMBEDDED_NODE
400 401 402 403 404 405 406 407
	default !UART
	boolean "Use software uart"
	help
	  The software uart is made up of two circular buffers. It can
	  be used either as an alternative to the harwdare UART or as
	  an addition. If the option is turned on, ppsi log messages
	  are routed to the software uart. The interactive wrpc shell
	  and diagnostics run on the hardware UART if available.
408

409 410 411 412 413 414 415
config NET_VERBOSE
	depends on DEVELOPER && WR_NODE
	boolean "Extra verbose messages for networking"
	help
	  This is mainly a debug tool, to be left off unless you hack
	  in the network subsystem.

416 417 418 419 420 421 422
config PLL_VERBOSE
	depends on DEVELOPER
	boolean "Verbose messages in softpll"
	help
	  The softpll is usually silent in WR node and verbose in WR
	  switch. You can enable pll messages in WR node for debugging.

423 424 425 426 427 428
config PFILTER_VERBOSE
	depends on DEVELOPER
	boolean "Verbose messages in packet filter setup"
	help
	  A debug tool for people changing the packet filter rules

429 430 431 432 433 434 435
config WRC_VERBOSE
	depends on DEVELOPER
	boolean "More verbose messages in wr core"
	default y if WR_SWITCH
	help
	  This enables some more diagnostic messages. Normally off.

Adam Wujek's avatar
Adam Wujek committed
436 437 438 439 440 441
config SNMP_VERBOSE
	depends on DEVELOPER && SNMP
	boolean "More verbose messages in SNMP"
	help
	  This enables some more diagnostic messages. Normally off.

442 443 444 445 446 447 448
config FAKE_TEMPERATURES
	depends on DEVELOPER
	boolean "Offer an array of 3 fake temperatures, for testing"
	help
	  The option adds also a "faketemp" command, used to set
	  the fake temperatures: e.g. "faketemp 120 -10 50"

449 450 451
config VLAN
	depends on DEVELOPER
	boolean "Filter and rx/tx frames in a VLAN (as opposed to untagged)"
452

453 454 455
config VLAN_NR
	depends on VLAN
	int "Use this VLAN number for filter/tx/rx"
456

457 458 459 460 461 462 463 464 465 466 467 468
config VLAN_1_FOR_CLASS7
	depends on VLAN
	int "Route this VLAN to fabric class 7 (Etherbone)"

config VLAN_2_FOR_CLASS7
	depends on VLAN
	int "Route this VLAN too to fabric class 7 (Etherbone)"

config VLAN_FOR_CLASS6
	depends on VLAN
	int "Route this VLAN too to fabric class 6 (Streamer/NIC)"

469
config SDB_STORAGE
470
	depends on WR_NODE
471
	default y
472
	boolean "Use SDB to manage storage (instead of legacy eeprom code)"
473
	help
474 475
	  Use SDB to manage flash and eeproms (both W1 and I2C). If not, legacy code
	  (eeprom only) will be selected.
476 477

config LEGACY_EEPROM
478
	depends on WR_NODE
479
	boolean
480
	default !SDB_STORAGE
481

482 483 484 485 486 487 488 489 490 491 492 493 494 495
config LATENCY_PROBE
	depends on DEVELOPER
	bool "Build the latency probe mechanism (send/recv)"
	help
	  The latency prober sends two frames to broadcast and
	  then the timestamp of their departure time. The receiver
	  measures the network latency and reports it.

	  If this option is set, the receiver is always running. The
	  sender is built but must be activated by the latency shell cmd.

config LATENCY_ETHTYPE
	depends on LATENCY_PROBE
	int "Ethtype to use for latency probing"
496 497 498 499
	default 291
	help
	  Ethertypes 0x0101-0x01ff are marked as "experimental", apparently.
	  So 0x0123 (291)is a good default, but please pick yours.
500

501 502 503 504 505
config LATENCY_SYSLOG
	depends on LATENCY_PROBE && SYSLOG
	bool "Report latency problems to syslog"
	default y

506 507 508 509 510 511 512 513 514 515 516 517 518
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.


519 520 521 522 523 524 525
# 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
config VLAN_ARRAY_SIZE
	int
	default 1

526
# CONFIG_WR_NODE