URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [or1ksim/] [sim.cfg] - Rev 123
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'.baseaddr = <hex_value>memory start addresssize = <hex_value>memory sizename = "<string>"memory block namece = <value>chip enable index of the memory instancemc = <value>memory controller this memory is connected todelayr = <value>cycles, required for read access, -1 if instance does not support readingdelayw = <value>cycles, required for write access, -1 if instance does not supportwritinglog = "<filename>"filename, where to log memory accesses to. If log command is notspecified, accesses are not logged.*/section memoryname = "RAM"random_seed = 12345type = randomce = 0mc = 0baseaddr = 0x00000000size = 0x00400000delayr = 1delayw = 2end/* 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 store hit costsstore_missdelay = <value>number of cycles dc store miss costs*/section dcenabled = 1nsets = 256nways = 1blocksize = 16load_hitdelay = 0load_missdelay = 0store_hitdelay = 0store_missdelay = 0end/* PIC SECTIONThis section specifies how the pic should behaveenabled = 0/1'0': PIC is disabled'1': PIC is enablededge_trigger = 0/1'0': Level triggered PIC'1': Edge triggered PIC*/section picenabled = 1edge_trigger = 1end/* 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_file = "<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_file = "<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_type = 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_file = "<filename>"filename for the exection log file.valid only if 'exe_log' is setclkcycle = <value>[ps|ns|us|ms]specifies time measurement for one cycle*/section sim/* verbose = 1 */debug = 0profile = 0prof_file = "sim.profile"history = 0/* iprompt = 0 */exe_log = 0exe_log_type = softwareexe_log_start = 0/* exe_log_end = 20000000*/exe_log_marker = 10000exe_log_file = "executed.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'1': don't log device id (for compatability with old version)'0': log device idvapi_log_file = <filename>filename for the log file.valid only if log_enabled is set*/section VAPIenabled = 0server_port = 50000log_enabled = 0vapi_log_file = "vapi.log"end/* CPU SECTIONThis section specifies various CPU parameters.ver = <value>cfg = <value>rev = <value>specifies version, configuration and revision fields of the CPU versionregister.upr = <value>changes the upr registercfgr = <value>changes the CPU configuration 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 = 0x12cfg = 0x00rev = 0x0001superscalar = 0hazards = 0dependstats = 0sbuf_len = 0end/* PM SECTIONThis section specifies Power Management parametersenabled = 0/1'0': disable power management'1': enable power management*/section pmenabled = 1end/* 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 = 1btic = 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 = 51000end/* 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 registerindex = <value>Index of this memory controller amongst all the memory controllers*/section mcenabled = 1baseaddr = 0x93000000POC = 0x0000000a /* 32 bit SSRAM */index = 0end/* 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 interface. Note the socketinterface must be configured at build time.rx_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 ethernetenabled = 1baseaddr = 0x92000000irq = 4rtx_type = 0rxfile = "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/* 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 bufferrefresh_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 keyboardenabled = <0|1>Enable/disable the peripheral. By default if it is enabled.baseaddr = <hex_value>base address of the keyboard deviceirq = <value>irq number for this devicerxfile = "<filename>"filename, where to read data from*/section kbdenabled = 1baseaddr = 0x94000000irq = 5rxfile = "kbd.rx"end/* ATA SECTIONThis section configures the ATA/ATAPI host controllerenabled = <0|1>Enable/disable the peripheral. By default it is enabled.baseaddr = <hex_value>address of first ATA registerirq = <value>irq number for this devicedev_id = 1/2/3Which OCIDEC version to imitaterev = <value>Revision of OCIDECpio_mode0_t1 = <0-255>PIO T1 reset valuepio_mode0_t2 = <0-255>PIO T2 reset valuepio_mode0_t4 = <0-255>PIO T4 reset valuepio_mode0_teoc = <0-255>PIO Teoc reset valuedma_mode0_tm = <0-255>DMA Tm reset valuedma_mode0_td = <0-255>DMA Td reset valuedma_mode0_teoc = <0-255>DMA Teoc reset valueDevice specifictype = <value>ata device 0 type0: NO_CONNECT: none (not connected)1: FILE : simulated harddisk2: LOCAL : local system harddiskfile = "<filename>"filename for simulated ATA devicevalid only if dev_type0 == 1size = <value>size of simulated hard-disk (in MBytes)valid only if dev_type0 == 1packet = <value>0: simulated ATA device does NOT implement PACKET command feature set1: simulated ATA device does implement PACKET command feature setfirmware = <string>Firmware to report in `Identify device command'heads = <value>Number of default heads (-1)sectors = <value>Number of default sectors per trackmwdma = <value>The highest multiword DMA mode; 2, 1, 0, -1 (No DMA)pio = <value>The highest supported pio mode; 4, 3, 2, 1, 0FIXME: irq number*/section ataenabled = 1baseaddr = 0x9e000000irq = 15dev_id = 1rev = 0pio_mode0_t1 = 6pio_mode0_t2 = 28pio_mode0_t4 = 2pio_mode0_teoc = 23dma_mode0_tm = 4dma_mode0_td = 21dma_mode0_teoc = 21device 0type = 1file = "/tmp/sim_atadev0"size = 1packet = 0heads = 7sectors = 32firmware = "02207031"mwdma = 2pio = 4enddevicedevice 1type = 0file = ""size = 0packet = 0enddeviceend/* 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
