URL
https://opencores.org/ocsvn/or1k/or1k/trunk
Subversion Repositories or1k
[/] [or1k/] [trunk/] [orpmon/] [sim.cfg] - Rev 1768
Go to most recent revision | Compare with Previous | Blame | View Log
/* sim.cfg -- Simulator configuration script fileCopyright (C) 2001-2002, Marko Mlinar, markom@opencores.orgThis file is part of OpenRISC 1000 Architectural Simulator.It contains the default configuration and help about configuringthe simulator.This program is free software; you can redistribute it and/or modifyit under the terms of the GNU General Public License as published bythe Free Software Foundation; either version 2 of the License, or(at your option) any later version.This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See theGNU General Public License for more details.You should have received a copy of the GNU General Public Licensealong with this program; if not, write to the Free SoftwareFoundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *//* INTRODUCTIONThe ork1sim has various parameters, that are set in configuration fileslike this one. The user can switch between configurations at startup byspecifying the required configuration file with the -f <filename.cfg> option.If no configuration file is specified or1ksim searches for the defaultconfiguration file sim.cfg. First it searches for './sim.cfg'. If thisfile is not found, it searches for '~/or1k/sim.cfg'. If this file isnot found too, it reverts to the built-in default configuration.NOTE: Users should not rely on the built-in configuration, since thedefault configuration may differ between version.Rather create a configuration file that sets all critical values.This file may contain (standard C) comments only - no // support.Configure files may be be included, using:include "file_name_to_include"Like normal configuration files, the included file is divided intosections. Each section is described in detail also.Some section have subsections. One example of such a subsection is:device <index>instance specific parameters...enddevicewhich creates a device instance.*//* MEMORY SECTIONThis section specifies how the memory is generated and the blocksit consists of.type = random/unknown/patternSpecifies the initial memory values.'random' generates random memory using seed 'random_seed'.'pattern' fills memory with 'pattern'.'unknown' does not specify how memory should be generated,leaving the memory in a undefined state. This is the fastestoption.random_seed = <value>random seed for randomizer, used if type = 'random'.pattern = <value>pattern to fill memory, used if type = 'pattern'.nmemories = <value>number of memory instances connectedinstance specific:baseaddr = <hex_value>memory start addresssize = <hex_value>memory sizename = "<string>"memory block namece = <value>chip enable index of the memory instancedelayr = <value>cycles, required for read access, -1 if instance does not support readingdelayw = <value>cycles, required for write access, -1 if instance does not support writinglog = "<filename>"filename, where to log memory accesses to, no log, if log command is not specified*/section memory/*random_seed = 12345type = random*/pattern = 0x00type = unknown /* Fastest */nmemories = 3device 0name = "FLASH"ce = 0baseaddr = 0xf0000000size = 0x00800000delayr = 10delayw = -1enddevicedevice 1name = "RAM"ce = 1baseaddr = 0x00000000size = 0x00400000delayr = 1delayw = 2enddevicedevice 2name = "SRAM"ce = 2baseaddr = 0x08000000size = 0x00400000delayr = 1delayw = 2enddeviceend/* IMMU SECTIONThis section configures the Instruction Memory Manangement Unitenabled = 0/1'0': disabled'1': enabled(NOTE: UPR bit is set)nsets = <value>number of ITLB sets; must be power of twonways = <value>number of ITLB wayspagesize = <value>instruction page size; must be power of twoentrysize = <value>instruction entry size in bytesustates = <value>number of ITLB usage states (2, 3, 4 etc., max is 4)hitdelay = <value>number of cycles immu hit costsmissdelay = <value>number of cycles immu miss costs*/section immuenabled = 1nsets = 64nways = 1pagesize = 8192hitdelay = 0missdelay = 0end/* DMMU SECTIONThis section configures the Data Memory Manangement Unitenabled = 0/1'0': disabled'1': enabled(NOTE: UPR bit is set)nsets = <value>number of DTLB sets; must be power of twonways = <value>number of DTLB wayspagesize = <value>data page size; must be power of twoentrysize = <value>data entry size in bytesustates = <value>number of DTLB usage states (2, 3, 4 etc., max is 4)hitdelay = <value>number of cycles dmmu hit costsmissdelay = <value>number of cycles dmmu miss costs*/section dmmuenabled = 1nsets = 64nways = 1pagesize = 8192hitdelay = 0missdelay = 0end/* IC SECTIONThis section configures the Instruction Cacheenabled = 0/1'0': disabled'1': enabled(NOTE: UPR bit is set)nsets = <value>number of IC sets; must be power of twonways = <value>number of IC waysblocksize = <value>IC block size in bytes; must be power of twoustates = <value>number of IC usage states (2, 3, 4 etc., max is 4)hitdelay = <value>number of cycles ic hit costsmissdelay = <value>number of cycles ic miss costs*/section icenabled = 1nsets = 256nways = 1blocksize = 16hitdelay = 0missdelay = 0end/* DC SECTIONThis section configures the Data Cacheenabled = 0/1'0': disabled'1': enabled(NOTE: UPR bit is set)nsets = <value>number of DC sets; must be power of twonways = <value>number of DC waysblocksize = <value>DC block size in bytes; must be power of twoustates = <value>number of DC usage states (2, 3, 4 etc., max is 4)load_hitdelay = <value>number of cycles dc load hit costsload_missdelay = <value>number of cycles dc load miss costsstore_hitdelay = <value>number of cycles dc load hit costsstore_missdelay = <value>number of cycles dc load miss costs*/section dcenabled = 1nsets = 256nways = 1blocksize = 16load_hitdelay = 0load_missdelay = 0store_hitdelay = 0store_missdelay = 0end/* SIM SECTIONThis section specifies how or1ksim should behave.verbose = 0/1'0': don't print extra messages'1': print extra messagesdebug = 0-90 : no debug messages1-9: debug message level.higher numbers produce more messagesprofile = 0/1'0': don't generate profiling file 'sim.profile''1': don't generate profiling file 'sim.profile'prof_fn = "<filename>"optional filename for the profiling file.valid only if 'profile' is setmprofile = 0/1'0': don't generate memory profiling file 'sim.mprofile''1': generate memory profiling file 'sim.mprofile'mprof_fn = "<filename>"optional filename for the memory profiling file.valid only if 'mprofile' is sethistory = 0/1'0': don't track execution flow'1': track execution flowExecution flow can be tracked for the simulator's'hist' command. Useful for back-trace debugging.iprompt = 0/1'0': start in <not interactive prompt> (so what do we start in ???)'1': start in interactive prompt.exe_log = 0/1'0': don't generate execution log.'1': generate execution log.exe_log = default/hardware/simple/softwaretype of execution log, default is used when not specifiedexe_log_start = <value>index of first instruction to start logging, default = 0exe_log_end = <value>index of last instruction to end logging; not limited, if omittedexe_log_marker = <value><value> specifies number of instructions before horizontal marker isprinted; if zero, markers are disabled (default)exe_log_fn = "<filename>"filename for the exection log file.valid only if 'exe_log' is setspr_log = 0/1'0': log reads/writes to/from sprs'1': don't log reads/write to/from sprsspr_log_fn = "<filename>"filename for the sprs log file.valid only if 'spr_log' is setclkcycle = <value>[ps|ns|us|ms]specifies time measurement for one cycle*/section sim/* verbose = 1 */debug = 0profile = 0prof_fn = "sim.profile"history = 1/* iprompt = 0 */exe_log = 0exe_log_type = softwareexe_log_start = 0/* exe_log_end = 20000000*/exe_log_marker = 10000exe_log_fn = "executed.log"spr_log = 0spr_log_fn = "spr.log"clkcycle = 100nsend/* SECTION VAPIThis section configures the Verification API, used for AdvancedCore Verification.enabled = 0/1'0': disbable VAPI server'1': enable/start VAPI serverserver_port = <value>TCP/IP port to start VAPI server onlog_enabled = 0/1'0': disable VAPI requests logging'1': enable VAPI requests logginghide_device_id = 0/1'0': don't log device id (for compatability with old version)'1': log device idvapi_fn = <filename>filename for the log file.valid only if log_enabled is set*/section VAPIenabled = 0server_port = 9998log_enabled = 0vapi_log_fn = "vapi.log"end/* CPU SECTIONThis section specifies various CPU parameters.ver = <value>rev = <value>specifies version and revision of the CPU usedupr = <value>changes the upr registersr = <value>sets the initial Supervision Register valuesuperscalar = 0/1'0': CPU is scalar'1': CPU is superscalar(modify cpu/or32/execute.c to tune superscalar model)hazards = 0/1'0': don't track data hazards in superscalar CPU'1': track data hazards in superscalar CPUIf tracked, data hazards can be displayed using thesimulator's 'r' command.dependstats = 0/1'0': don't calculate inter-instruction dependencies.'1': calculate inter-instruction dependencies.If calculated, inter-instruction dependencies can bedisplayed using the simulator's 'stat' command.sbuf_len = <value>length of store buffer (<= 256), 0 = disabled*/section cpuver = 0x1200rev = 0x0001/* upr = */superscalar = 0hazards = 0dependstats = 0sbuf_len = 0end/* PM SECTIONThis section specifies Power Management parametersenabled = 0/1'0': disable power management'1': enable power management*/section pmenabled = 0end/* BPB SECTIONThis section specifies how branch prediction should behave.enabled = 0/1'0': disable branch prediction'1': enable branch predictionbtic = 0/1'0': disable branch target instruction cache model'1': enable branch target instruction cache modelsbp_bf_fwd = 0/1Static branch prediction for 'l.bf''0': don't use forward prediction'1': use forward predictionsbp_bnf_fwd = 0/1Static branch prediction for 'l.bnf''0': don't use forward prediction'1': use forward predictionhitdelay = <value>number of cycles bpb hit costsmissdelay = <value>number of cycles bpb miss costs*/section bpbenabled = 0btic = 0sbp_bf_fwd = 0sbp_bnf_fwd = 0hitdelay = 0missdelay = 0end/* DEBUG SECTIONThis sections specifies how the debug unit should behave.enabled = 0/1'0': disable debug unit'1': enable debug unitgdb_enabled = 0/1'0': don't start gdb server'1': start gdb server at port 'server_port'server_port = <value>TCP/IP port to start gdb server onvalid only if gdb_enabled is setvapi_id = <hex_value>Used to create "fake" vapi log file containing the JTAG proxy messages.*/section debugenabled = 0gdb_enabled = 0server_port = 9999end/* MC SECTIONThis section configures the memory controllerenabled = 0/1'0': disable memory controller'1': enable memory controllerbaseaddr = <hex_value>address of first MC registerPOC = <hex_value>Power On Configuration register*/section mcenabled = 0baseaddr = 0x93000000POC = 0x00000008 /* Power on configuration register */end/* UART SECTIONThis section configures the UARTsenabled = <0|1>Enable/disable the peripheral. By default if it is enabled.baseaddr = <hex_value>address of first UART register for this devicechannel = <channeltype>:<args>The channel parameter indicates the source of received UART charactersand the sink for transmitted UART characters.The <channeltype> can be either "file", "xterm", "tcp", "fd", or "tty"(without quotes).A) To send/receive characters from a pair of files, use a filechannel:channel=file:<rxfile>,<txfile>B) To create an interactive terminal window, use an xterm channel:channel=xterm:[<xterm_arg>]*C) To create a bidirectional tcp socket which one could, for example,access via telnet, use a tcp channel:channel=tcp:<port number>D) To cause the UART to read/write from existing numeric filedescriptors, use an fd channel:channel=fd:<rx file descriptor num>,<tx file descriptor num>E) To connect the UART to a physical serial port, create a ttychannel:channel=tty:device=/dev/ttyS0,baud=9600irq = <value>irq number for this device16550 = 0/1'0': this device is a UART16450'1': this device is a UART16550jitter = <value>in msecs... time to block, -1 to disable itvapi_id = <hex_value>VAPI id of this instance*/section uartenabled = 1baseaddr = 0x90000000irq = 2channel = "file:uart0.rx,uart0.tx"jitter = -1 /* async behaviour */16550 = 1end/* DMA SECTIONThis section configures the DMAsenabled = <0|1>Enable/disable the peripheral. By default if it is enabled.baseaddr = <hex_value>address of first DMA register for this deviceirq = <value>irq number for this devicevapi_id = <hex_value>VAPI id of this instance*/section dmaenabled = 1baseaddr = 0x9a000000irq = 11end/* ETHERNET SECTIONThis section configures the ETHERNETsenabled = <0|1>Enable/disable the peripheral. By default if it is enabled.baseaddr = <hex_value>address of first ethernet register for this devicedma = <value>which controller is this ethernet "connected" toirq = <value>ethernet mac IRQ levelrtx_type = <value>use 0 - file interface, 1 - socket interfacerx_channel = <value>DMA channel used for RXtx_channel = <value>DMA channel used for TXrxfile = "<filename>"filename, where to read data fromtxfile = "<filename>"filename, where to write data tosockif = "<ifacename>"interface name of ethernet socketvapi_id = <hex_value>VAPI id of this instance*/section ethernetbaseaddr = 0x92000000dma = 0irq = 4rtx_type = 0tx_channel = 0rx_channel = 1rxfile = "eth0.rx"txfile = "eth0.tx"sockif = "eth0"end/* GPIO SECTIONThis section configures the GPIOsenabled = <0|1>Enable/disable the peripheral. By default if it is enabled.baseaddr = <hex_value>address of first GPIO register for this deviceirq = <value>irq number for this devicebase_vapi_id = <hex_value>first VAPI id of this instanceGPIO uses 8 consecutive VAPI IDs*/section gpioenabled = 1baseaddr = 0x91000000irq = 3base_vapi_id = 0x0200end/* VGA SECTIONThis section configures the VGA/LCD controllerenabled = <0|1>Enable/disable the peripheral. By default if it is enabled.baseaddr = <hex_value>address of first VGA registerirq = <value>irq number for this devicerefresh_rate = <value>number of cycles between screen dumpsfilename = "<filename>"template name for generated names (e.g. "primary" produces "primary0023.bmp")*/section vgaenabled = 1baseaddr = 0x97100000irq = 8refresh_rate = 100000filename = "primary"end/* TICK TIMER SECTIONThis section configures tick timerenabled = 0/1whether tick timer is enabledirq = <value>irq number*//*section tickenabled = 1irq = 0end*//* FB SECTIONThis section configures the frame bufferenabled = <0|1>Enable/disable the peripheral. By default if it is enabled.baseaddr = <hex_value>base address of frame bufferpaladdr = <hex_value>base address of first palette entryrefresh_rate = <value>number of cycles between screen dumpsfilename = "<filename>"template name for generated names (e.g. "primary" produces "primary0023.bmp")*/section fbenabled = 1baseaddr = 0x97000000refresh_rate = 1000000filename = "primary"end/* KBD SECTIONThis section configures the PS/2 compatible keyboardbaseaddr = <hex_value>base address of the keyboard devicerxfile = "<filename>"filename, where to read data from*/section kbdenabled = 1irq = 5baseaddr = 0x94000000rxfile = "kbd.rx"end/* ATA SECTIONThis section configures the ATA/ATAPI host controllerbaseaddr = <hex_value>address of first ATA registerenabled = <0|1>Enable/disable the peripheral. By default if it is enabled.irq = <value>irq number for this devicedebug = <value>debug level for ata models.0: no debug messages1: verbose messages3: normal messages (more messages than verbose)5: debug messages (normal debug messages)7: flow control messages (debug statemachine flows)9: low priority message (display everything the code does)dev_type0/1 = <value>ata device 0 type0: NO_CONNeCT: none (not connected)1: FILE : simulated harddisk2: LOCAL : local system harddiskdev_file0/1 = "<filename>"filename for simulated ATA devicevalid only if dev_type0 == 1dev_size0/1 = <value>size of simulated hard-disk (in MBytes)valid only if dev_type0 == 1dev_packet0/1 = <value>0: simulated ATA device does NOT implement PACKET command feature set1: simulated ATA device does implement PACKET command feature setFIXME: irq number*/section ataenabled = 1baseaddr = 0x9e000000irq = 15dev_type0 = 1dev_file0 = "/tmp/sim_atadev0"dev_size0 = 1dev_packet0 = 0dev_type1 = 0dev_file1 = ""dev_size1 = 0dev_packet1 = 0end/* CUC SECTIONThis section configures the OpenRISC Custom Unit Compilermemory_order = none/weak/strong/exactnone different memory ordering, even if there are dependencies,burst can be made, width can changeweak different memory ordering, if there cannot be dependenciesburst can be made, width can changestrong same memory ordering, burst can be made, width can changeexact exacltly the same memory ordering and widthscalling_convention = 0/1whether programs follow OpenRISC calling conventionsenable_bursts = 0/1whether burst are detectedno_multicycle = 0/1if selected no multicycle logic paths will be generatedtimings_fn = "<filename>"*/section cucmemory_order = weakcalling_convention = 1enable_bursts = 1no_multicycle = 1timings_fn = "virtex.tim"end
Go to most recent revision | Compare with Previous | Blame | View Log
