Kconfig 7.17 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 16
# most options with no prompt here are prompted-for in the "advanced" section

config PRINT_BUFSIZE
17 18
	int
	default 128
19 20 21 22

config PRINTF_XINT
	boolean
	default y
Aurelio Colosimo's avatar
Aurelio Colosimo committed
23

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

# CONFIG_WR_SWITCH has no further options at all at this point

31 32 33 34 35 36 37 38
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).

39
config STACKSIZE
40 41
	depends on WR_NODE
	int
42 43
	default 2048

44
config PPSI
45
	depends on WR_NODE
46 47
	boolean
	default y
Aurelio Colosimo's avatar
Aurelio Colosimo committed
48

49
config UART
50
	depends on WR_NODE
51
	boolean
52
	default y
Aurelio Colosimo's avatar
Aurelio Colosimo committed
53

54
config W1
55
	depends on WR_NODE
56 57
	boolean
	default y
Aurelio Colosimo's avatar
Aurelio Colosimo committed
58

59 60 61
# The other ones can be set by non-developers

config ETHERBONE
62
	depends on WR_NODE
63
	boolean "Compile Etherbone support in wrpc-sw"
64
	help
65 66 67
	  This allows to run LM32 code that is aware of Etherbone.
	  You need to run a gateware file that includes Etherbone support.
	  If in doubt, say No.
68

69
config CMD_CONFIG
70
	depends on WR_NODE
71
	boolean "Include configuration in the output binary"
Aurelio Colosimo's avatar
Aurelio Colosimo committed
72
	help
73 74 75
	  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
76

77
config NIC_PFILTER
78
	depends on WR_NODE
79 80 81
	depends on ETHERBONE
	bool "Add packet filter rules for wr-nic"
	help
82
	  When using wr-nic (7S), the host must receive frames that are not
83 84 85 86
	  ptp nor etherbone ones.  This adds the needed filter rules
	  to that effect.  Such rules are not needed when no Etherbone
	  is there, because in that case all non-ptp frames reach the
	  host.
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101

#
# 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.

config RAMSIZE
102
	depends on DEVELOPER && WR_NODE
103 104 105 106 107 108 109
	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
110

111
config STACKSIZE
112
	depends on DEVELOPER && WR_NODE
113 114 115 116 117 118
	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).
119

120
config PRINT_BUFSIZE
121
	depends on DEVELOPER && WR_NODE
122 123 124 125 126 127 128
	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.

129 130 131 132 133 134 135 136 137 138
config CMD_LL
	depends on DEVELOPER && WR_NODE
	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

139
# CHECK_RESET for switch and node
140 141 142 143 144 145 146 147
config CHECK_RESET
	depends on DEVELOPER
	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.
148

149 150 151 152 153 154 155 156 157
config SPLL_FIFO_LOG
	depends on DEVELOPER
	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.

158 159
choice
	prompt "Implementation of pp_printf"
160
	depends on DEVELOPER && WR_NODE
161 162 163 164 165 166 167 168

config PRINTF_XINT
	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.
169 170

config PRINTF_FULL
171
	bool "full"
172 173 174 175 176 177 178
	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.

config PRINTF_MINI
179
	bool "minimal"
180 181 182 183 184 185 186
	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.

config PRINTF_NONE
187
	bool "empty"
188 189 190 191 192 193
	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

194
config PPSI
195
	depends on WR_NODE
196
	boolean
197
	help
198
	  Select this option for the ppsi engine (now only option)
199 200

config DETERMINISTIC_BINARY
201
	depends on DEVELOPER && WR_NODE
202
	boolean "Build a binary that is the same every time"
203
	help
204 205 206 207 208 209 210 211
	  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.
212

213 214
config UART
	boolean "Use hardware uart (and/or vuart if available)"
215
	depends on DEVELOPER && WR_NODE
216
	default y
217
	help
218 219 220
	  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. 
221

222
config UART_SW
223
	depends on DEVELOPER && WR_NODE
224 225 226 227 228 229 230 231
	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.
232

233
config SDB_STORAGE
234
	depends on WR_NODE
235
	default y
236
	boolean "Use SDB to manage storage (instead of legacy eeprom code)"
237
	help
238 239
	  Use SDB to manage flash and eeproms (both W1 and I2C). If not, legacy code
	  (eeprom only) will be selected.
240 241

config LEGACY_EEPROM
242
	depends on WR_NODE
243
	boolean
244
	default !SDB_STORAGE
245

246 247 248 249 250 251 252
# 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

253
# CONFIG_WR_NODE