Merge branch 'next'
[u-boot/qq2440-u-boot.git] / board / openrisc / openrisc-generic / or1ksim.cfg
blob2bd86429326718b56218c3f549c7c00a726c7aae
1 /* sim.cfg -- Simulator configuration script file
2    Copyright (C) 2001-2002, Marko Mlinar, markom@opencores.org
4 This file is part of OpenRISC 1000 Architectural Simulator.
5 It contains the default configuration and help about configuring
6 the simulator.
8  * SPDX-License-Identifier:     GPL-2.0+
9  */
12 /* INTRODUCTION
14    The ork1sim has various parameters, that are set in configuration files
15    like this one. The user can switch between configurations at startup by
16    specifying the required configuration file with the -f <filename.cfg> option.
17    If no configuration file is specified or1ksim searches for the default
18    configuration file sim.cfg. First it searches for './sim.cfg'. If this
19    file is not found, it searches for '~/or1k/sim.cfg'. If this file is
20    not found too, it reverts to the built-in default configuration.
22    NOTE: Users should not rely on the built-in configuration, since the
23          default configuration may differ between version.
24          Rather create a configuration file that sets all critical values.
26    This file may contain (standard C) comments only - no // support.
28    Configure files may be be included, using:
29    include "file_name_to_include"
31    Like normal configuration files, the included file is divided into
32    sections. Each section is described in detail also.
34    Some section have subsections. One example of such a subsection is:
36    device <index>
37      instance specific parameters...
38    enddevice
40    which creates a device instance.
44 /* MEMORY SECTION
46    This section specifies how the memory is generated and the blocks
47    it consists of.
49    type = random/unknown/pattern
50       Specifies the initial memory values.
51       'random' generates random memory using seed 'random_seed'.
52       'pattern' fills memory with 'pattern'.
53       'unknown' does not specify how memory should be generated,
54       leaving the memory in a undefined state. This is the fastest
55       option.
57    random_seed = <value>
58       random seed for randomizer, used if type = 'random'.
60    pattern = <value>
61       pattern to fill memory, used if type = 'pattern'.
63    nmemories = <value>
64       number of memory instances connected
66    baseaddr = <hex_value>
67       memory start address
69    size = <hex_value>
70       memory size
72    name = "<string>"
73       memory block name
75    ce = <value>
76       chip enable index of the memory instance
78    mc = <value>
79       memory controller this memory is connected to
81    delayr = <value>
82       cycles, required for read access, -1 if instance does not support reading
84    delayw = <value>
85       cycles, required for write access, -1 if instance does not support writing
87    log = "<filename>"
88       filename, where to log memory accesses to, no log, if log command is not specified
92 section memory
93   pattern = 0x00
94   type = unknown /* Fastest */
96   name = "FLASH"
97   ce = 0
98   mc = 0
99   baseaddr = 0xf0000000
100   size = 0x01000000
101   delayr =  1
102   delayw = -1
105 section memory
106   pattern = 0x00
107   type = unknown /* Fastest */
109   name = "RAM"
110   ce = 1
111   mc = 0
112   baseaddr = 0x00000000
113   size = 0x02000000
114   delayr = 1
115   delayw = 1
118 section memory
119   pattern = 0x00
120   type = unknown /* Fastest */
122   name = "SRAM"
123   mc = 0
124   ce = 2
125   baseaddr = 0xa4000000
126   size = 0x00100000
127   delayr = 1
128   delayw = 2
132 /* IMMU SECTION
134     This section configures the Instruction Memory Manangement Unit
136     enabled = 0/1
137        '0': disabled
138        '1': enabled
139        (NOTE: UPR bit is set)
141     nsets = <value>
142        number of ITLB sets; must be power of two
144     nways = <value>
145        number of ITLB ways
147     pagesize = <value>
148        instruction page size; must be power of two
150     entrysize = <value>
151        instruction entry size in bytes
153     ustates = <value>
154        number of ITLB usage states (2, 3, 4 etc., max is 4)
156     hitdelay = <value>
157        number of cycles immu hit costs
159     missdelay = <value>
160        number of cycles immu miss costs
163 section immu
164   enabled = 1
165   nsets = 64
166   nways = 1
167   pagesize = 8192
168   hitdelay = 0
169   missdelay = 0
173 /* DMMU SECTION
175     This section configures the Data Memory Manangement Unit
177     enabled = 0/1
178        '0': disabled
179        '1': enabled
180        (NOTE: UPR bit is set)
182     nsets = <value>
183        number of DTLB sets; must be power of two
185     nways = <value>
186        number of DTLB ways
188     pagesize = <value>
189        data page size; must be power of two
191     entrysize = <value>
192        data entry size in bytes
194     ustates = <value>
195        number of DTLB usage states (2, 3, 4 etc., max is 4)
197     hitdelay = <value>
198        number of cycles dmmu hit costs
200     missdelay = <value>
201        number of cycles dmmu miss costs
204 section dmmu
205   enabled = 1
206   nsets = 64
207   nways = 1
208   pagesize = 8192
209   hitdelay = 0
210   missdelay = 0
214 /* IC SECTION
216    This section configures the Instruction Cache
218    enabled = 0/1
219        '0': disabled
220        '1': enabled
221       (NOTE: UPR bit is set)
223    nsets = <value>
224       number of IC sets; must be power of two
226    nways = <value>
227       number of IC ways
229    blocksize = <value>
230       IC block size in bytes; must be power of two
232    ustates = <value>
233       number of IC usage states (2, 3, 4 etc., max is 4)
235    hitdelay = <value>
236       number of cycles ic hit costs
238     missdelay = <value>
239       number of cycles ic miss costs
242 section ic
243   enabled = 1
244   nsets = 512
245   nways = 1
246   blocksize = 16
247   hitdelay = 1
248   missdelay = 1
252 /* DC SECTION
254    This section configures the Data Cache
256    enabled = 0/1
257        '0': disabled
258        '1': enabled
259       (NOTE: UPR bit is set)
261    nsets = <value>
262       number of DC sets; must be power of two
264    nways = <value>
265       number of DC ways
267    blocksize = <value>
268       DC block size in bytes; must be power of two
270    ustates = <value>
271       number of DC usage states (2, 3, 4 etc., max is 4)
273    load_hitdelay = <value>
274       number of cycles dc load hit costs
276    load_missdelay = <value>
277       number of cycles dc load miss costs
279    store_hitdelay = <value>
280       number of cycles dc load hit costs
282    store_missdelay = <value>
283       number of cycles dc load miss costs
286 section dc
287   enabled = 1
288   nsets = 512
289   nways = 1
290   blocksize = 16
291   load_hitdelay = 1
292   load_missdelay = 1
293   store_hitdelay = 1
294   store_missdelay = 1
298 /* SIM SECTION
300   This section specifies how or1ksim should behave.
302   verbose = 0/1
303        '0': don't print extra messages
304        '1': print extra messages
306   debug = 0-9
307       0  : no debug messages
308       1-9: debug message level.
309            higher numbers produce more messages
311   profile = 0/1
312       '0': don't generate profiling file 'sim.profile'
313       '1': don't generate profiling file 'sim.profile'
315   prof_fn = "<filename>"
316       optional filename for the profiling file.
317       valid only if 'profile' is set
319   mprofile = 0/1
320       '0': don't generate memory profiling file 'sim.mprofile'
321       '1': generate memory profiling file 'sim.mprofile'
323   mprof_fn = "<filename>"
324       optional filename for the memory profiling file.
325       valid only if 'mprofile' is set
327   history = 0/1
328       '0': don't track execution flow
329       '1': track execution flow
330       Execution flow can be tracked for the simulator's
331       'hist' command. Useful for back-trace debugging.
333   iprompt = 0/1
334      '0': start in <not interactive prompt> (so what do we start in ???)
335      '1': start in interactive prompt.
337   exe_log = 0/1
338       '0': don't generate execution log.
339       '1': generate execution log.
341   exe_log = default/hardware/simple/software
342       type of execution log, default is used when not specified
344   exe_log_start = <value>
345       index of first instruction to start logging, default = 0
347   exe_log_end = <value>
348       index of last instruction to end logging; not limited, if omitted
350   exe_log_marker = <value>
351       <value> specifies number of instructions before horizontal marker is
352       printed; if zero, markers are disabled (default)
354   exe_log_fn = "<filename>"
355       filename for the exection log file.
356       valid only if 'exe_log' is set
358   clkcycle = <value>[ps|ns|us|ms]
359       specifies time measurement for one cycle
362 section sim
363   verbose = 1
364   debug = 0
365   profile = 0
366   history = 0
368   clkcycle = 10ns
372 /* SECTION VAPI
374     This section configures the Verification API, used for Advanced
375     Core Verification.
377     enabled = 0/1
378         '0': disbable VAPI server
379         '1': enable/start VAPI server
381     server_port = <value>
382         TCP/IP port to start VAPI server on
384     log_enabled = 0/1
385        '0': disable VAPI requests logging
386        '1': enable VAPI requests logging
388     hide_device_id = 0/1
389        '0': don't log device id (for compatability with old version)
390        '1': log device id
393     vapi_fn = <filename>
394        filename for the log file.
395        valid only if log_enabled is set
398 section VAPI
399   enabled = 0
400   server_port = 9998
401   log_enabled = 0
402   vapi_log_fn = "vapi.log"
406 /* CPU SECTION
408    This section specifies various CPU parameters.
410    ver = <value>
411    rev = <value>
412       specifies version and revision of the CPU used
414    upr = <value>
415       changes the upr register
417    sr = <value>
418       sets the initial Supervision Register value
419       supervisor mode (SM) and fixed one (FO) set = 0x8001
420       exception prefix high (EPH, vectors@0xf0000000) = 0x4000
421       together, (SM | FO | EPH) = 0xc001
422    superscalar = 0/1
423       '0': CPU is scalar
424       '1': CPU is superscalar
425       (modify cpu/or32/execute.c to tune superscalar model)
427    hazards = 0/1
428       '0': don't track data hazards in superscalar CPU
429       '1': track data hazards in superscalar CPU
430       If tracked, data hazards can be displayed using the
431       simulator's 'r' command.
433    dependstats = 0/1
434       '0': don't calculate inter-instruction dependencies.
435       '1': calculate inter-instruction dependencies.
436       If calculated, inter-instruction dependencies can be
437       displayed using the simulator's 'stat' command.
439    sbuf_len = <value>
440       length of store buffer (<= 256), 0 = disabled
443 section cpu
444   ver = 0x12
445   cfg = 0x00
446   rev = 0x01
447   sr =  0x8001 /*SPR_SR_FO  | SPR_SR_SM | SPR_SR_EPH */
448   /* upr = */
449   superscalar = 0
450   hazards = 0
451   dependstats = 0
452   sbuf_len = 0
456 /* PM SECTION
458    This section specifies Power Management parameters
460    enabled = 0/1
461       '0': disable power management
462       '1': enable power management
465 section pm
466   enabled = 0
470 /* BPB SECTION
472    This section specifies how branch prediction should behave.
474    enabled = 0/1
475      '0': disable branch prediction
476      '1': enable branch prediction
478    btic = 0/1
479      '0': disable branch target instruction cache model
480      '1': enable branch target instruction cache model
482    sbp_bf_fwd = 0/1
483      Static branch prediction for 'l.bf'
484      '0': don't use forward prediction
485      '1': use forward prediction
487    sbp_bnf_fwd = 0/1
488      Static branch prediction for 'l.bnf'
489      '0': don't use forward prediction
490      '1': use forward prediction
492    hitdelay = <value>
493        number of cycles bpb hit costs
495    missdelay = <value>
496        number of cycles bpb miss costs
499 section bpb
500   enabled = 0
501   btic = 0
502   sbp_bf_fwd = 0
503   sbp_bnf_fwd = 0
504   hitdelay = 0
505   missdelay = 0
509 /* DEBUG SECTION
511    This sections specifies how the debug unit should behave.
513    enabled = 0/1
514       '0': disable debug unit
515       '1': enable debug unit
517    gdb_enabled = 0/1
518       '0': don't start gdb server
519       '1': start gdb server at port 'server_port'
521    server_port = <value>
522       TCP/IP port to start gdb server on
523       valid only if gdb_enabled is set
525    vapi_id = <hex_value>
526       Used to create "fake" vapi log file containing the JTAG proxy messages.
528 section debug
529   enabled = 0
530 /*  gdb_enabled = 0 */
531 /*  server_port = 9999*/
532   rsp_enabled = 1
533   rsp_port = 50001
537 /* MC SECTION
539    This section configures the memory controller
541    enabled = 0/1
542      '0': disable memory controller
543      '1': enable memory controller
545    baseaddr = <hex_value>
546       address of first MC register
548    POC = <hex_value>
549       Power On Configuration register
551    index = <value>
552       Index of this memory controller amongst all the memory controllers
555 section mc
556   enabled = 0
557   baseaddr = 0x93000000
558   POC = 0x00000008                 /* Power on configuration register */
559   index = 0
563 /* UART SECTION
565    This section configures the UARTs
567      enabled = <0|1>
568         Enable/disable the peripheral.  By default if it is enabled.
570      baseaddr = <hex_value>
571         address of first UART register for this device
574      channel = <channeltype>:<args>
576         The channel parameter indicates the source of received UART characters
577         and the sink for transmitted UART characters.
579         The <channeltype> can be either "file", "xterm", "tcp", "fd", or "tty"
580         (without quotes).
582           A) To send/receive characters from a pair of files, use a file
583              channel:
585                channel=file:<rxfile>,<txfile>
587           B) To create an interactive terminal window, use an xterm channel:
589                channel=xterm:[<xterm_arg>]*
591           C) To create a bidirectional tcp socket which one could, for example,
592              access via telnet, use a tcp channel:
594                channel=tcp:<port number>
596           D) To cause the UART to read/write from existing numeric file
597              descriptors, use an fd channel:
599                channel=fd:<rx file descriptor num>,<tx file descriptor num>
601           E) To connect the UART to a physical serial port, create a tty
602              channel:
604                channel=tty:device=/dev/ttyS0,baud=9600
606      irq = <value>
607         irq number for this device
609      16550 = 0/1
610         '0': this device is a UART16450
611         '1': this device is a UART16550
613      jitter = <value>
614         in msecs... time to block, -1 to disable it
616      vapi_id = <hex_value>
617         VAPI id of this instance
620 section uart
621   enabled = 1
622   baseaddr = 0x90000000
623   irq = 2
624   /* channel = "file:uart0.rx,uart0.tx" */
625   /* channel = "tcp:10084" */
626   channel = "xterm:"
627   jitter = -1                     /* async behaviour */
628   16550 = 1
632 /* DMA SECTION
634    This section configures the DMAs
636      enabled = <0|1>
637         Enable/disable the peripheral.  By default if it is enabled.
639      baseaddr = <hex_value>
640         address of first DMA register for this device
642      irq = <value>
643         irq number for this device
645      vapi_id = <hex_value>
646         VAPI id of this instance
649 section dma
650   enabled = 1
651   baseaddr = 0x9a000000
652   irq = 11
656 /* ETHERNET SECTION
658    This section configures the ETHERNETs
660      enabled = <0|1>
661         Enable/disable the peripheral.  By default if it is enabled.
663      baseaddr = <hex_value>
664         address of first ethernet register for this device
666      dma = <value>
667         which controller is this ethernet "connected" to
669      irq = <value>
670         ethernet mac IRQ level
672      rtx_type = <value>
673         use 0 - file interface, 1 - socket interface
675      rx_channel = <value>
676         DMA channel used for RX
678      tx_channel = <value>
679         DMA channel used for TX
681      rxfile = "<filename>"
682         filename, where to read data from
684      txfile = "<filename>"
685         filename, where to write data to
687      sockif = "<ifacename>"
688         interface name of ethernet socket
690      vapi_id = <hex_value>
691         VAPI id of this instance
694 section ethernet
695   enabled = 1
696   baseaddr = 0x92000000
697   /* dma = 0 */
698   irq = 4
699   rtx_type = "tap"
700   tap_dev = "tap0"
701   /* tx_channel = 0 */
702   /* rx_channel = 1 */
703   rxfile = "eth0.rx"
704   txfile = "eth0.tx"
705   sockif = "eth0"
709 /* GPIO SECTION
711    This section configures the GPIOs
713      enabled = <0|1>
714         Enable/disable the peripheral.  By default if it is enabled.
716      baseaddr = <hex_value>
717         address of first GPIO register for this device
719      irq = <value>
720         irq number for this device
722      base_vapi_id = <hex_value>
723         first VAPI id of this instance
724         GPIO uses 8 consecutive VAPI IDs
727 section gpio
728   enabled = 0
729   baseaddr = 0x91000000
730   irq = 3
731   base_vapi_id = 0x0200
734 /* VGA SECTION
736     This section configures the VGA/LCD controller
738       enabled = <0|1>
739         Enable/disable the peripheral.  By default if it is enabled.
741       baseaddr = <hex_value>
742         address of first VGA register
744       irq = <value>
745         irq number for this device
747       refresh_rate = <value>
748         number of cycles between screen dumps
750       filename = "<filename>"
751         template name for generated names (e.g. "primary" produces "primary0023.bmp")
754 section vga
755   enabled = 0
756   baseaddr = 0x97100000
757   irq = 8
758   refresh_rate = 100000
759   filename = "primary"
763 /* TICK TIMER SECTION
765     This section configures tick timer
767     enabled = 0/1
768       whether tick timer is enabled
771 section pic
772   enabled = 1
773   edge_trigger = 1
776 /* FB SECTION
778     This section configures the frame buffer
780     enabled = <0|1>
781       Enable/disable the peripheral.  By default if it is enabled.
783     baseaddr = <hex_value>
784       base address of frame buffer
786     paladdr = <hex_value>
787       base address of first palette entry
789     refresh_rate = <value>
790       number of cycles between screen dumps
792     filename = "<filename>"
793       template name for generated names (e.g. "primary" produces "primary0023.bmp")
796 section fb
797   enabled = 0
798   baseaddr = 0x97000000
799   refresh_rate = 1000000
800   filename = "primary"
804 /* KBD SECTION
806     This section configures the PS/2 compatible keyboard
808     baseaddr = <hex_value>
809       base address of the keyboard device
811     rxfile = "<filename>"
812       filename, where to read data from
815 section kbd
816   enabled = 0
817   irq = 5
818   baseaddr = 0x94000000
819   rxfile = "kbd.rx"
823 /* ATA SECTION
825     This section configures the ATA/ATAPI host controller
827       baseaddr = <hex_value>
828         address of first ATA register
830       enabled = <0|1>
831         Enable/disable the peripheral.  By default if it is enabled.
833       irq = <value>
834         irq number for this device
836       debug = <value>
837         debug level for ata models.
838         0: no debug messages
839         1: verbose messages
840         3: normal messages (more messages than verbose)
841         5: debug messages (normal debug messages)
842         7: flow control messages (debug statemachine flows)
843         9: low priority message (display everything the code does)
845       dev_type0/1 = <value>
846         ata device 0 type
847         0: NO_CONNeCT: none (not connected)
848         1: FILE      : simulated harddisk
849         2: LOCAL     : local system harddisk
851       dev_file0/1 = "<filename>"
852         filename for simulated ATA device
853         valid only if dev_type0 == 1
855       dev_size0/1 = <value>
856         size of simulated hard-disk (in MBytes)
857         valid only if dev_type0 == 1
859       dev_packet0/1 = <value>
860         0: simulated ATA device does NOT implement PACKET command feature set
861         1: simulated ATA device does implement PACKET command feature set
863    FIXME: irq number
866 section ata
867   enabled = 0
868   baseaddr = 0x9e000000
869   irq = 15