URL
https://opencores.org/ocsvn/or1k/or1k/trunk
Subversion Repositories or1k
[/] [or1k/] [trunk/] [uclinux/] [uClinux-2.0.x/] [sim.cfg] - Rev 1765
Compare with Previous | Blame | View Log
/* sim.cfg -- Simulator configuration script fileCopyright (C) 2001, Marko Mlinar, markom@opencores.orgThis file includes a lot of help about configurations and default oneThis file is part of OpenRISC 1000 Architectural 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 or1ksim have various parameters, which can be set in configurationfiles. Multiple configurations may be used and switched between ator1ksim startup.By default, or1ksim loads condfiguration file from './sim.cfg' and if notfound it checks '~/.or1k/sim.cfg'. If even this file is not found orall parameters are not defined, default configuration is used.Users should not rely on default configuration, but rather redefine allcritical settings, since default configuration may differ in newerversions of the or1ksim.If multiple configurations are used, user can switch between them bysupplying -f <filename.cfg> option when starting simulator.This file may contain (standard C) only comments - no // support.Like normal configuration file, this file is divided in sections,where each section is described in detail also.Some section also have subsections. One example of such subsection isblock:device <index>instance specific parameters...enddevicewhich creates a device instance.*//* MEMORY SECTIONThis section specifies how is initial memory generated and which blocksit consist of.type = random/unknown/patternspecifies the initial memory values. 'random' parameter generaterandom memory using seed 'random_seed' parameter. 'pattern' parameterfills memory with 'pattern' parameter and 'unknown' does not specifyhow memory should be generated - the fastest option.random_seed = <value>random seed for randomizer, used if type = randompattern = <value>pattern to fill memory, used if type = patternnmemories = <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 writing16550 = 0/10, if this device is uart 16450 and 1, if it is 16550log = "<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 = -1/* log = "flash.log"*/enddevicedevice 1name = "RAM"ce = 1baseaddr = 0x00000000size = 0x01000000delayr = 1delayw = 2/* log = "ram.log"*/enddevicedevice 2name = "SRAM"ce = 2baseaddr = 0x08000000size = 0x00400000delayr = 1delayw = 2/* log = "ram.log"*/enddeviceend/* IMMU SECTIONThis section configures Instruction Memory Menangement Unitenabled = 0/1whether IMMU is 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)*/section immuenabled = 1nsets = 64nways = 1pagesize = 8192end/* DMMU SECTIONThis section configures Data Memory Menangement Unitenabled = 0/1whether DMMU is 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)*/section dmmuenabled = 1nsets = 64nways = 1pagesize = 8192end/* IC SECTIONThis section configures Instruction Cacheenabled = 0/1whether IC is 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)*/section icenabled = 1nsets = 256nways = 1blocksize = 16end/* DC SECTIONThis section configures Data Cacheenabled = 0/1whether DC is 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)*/section dcenabled = 1nsets = 256nways = 1blocksize = 16end/* SIM SECTIONThis section specifies how should sim behave.verbose = 0/1whether to print out extra messagesdebug = 0-9= 0 disabled debug messages1-9 level of sim debug information, greater the number more verbose isthe outputprofile = 0/1whether to generate profiling file 'sim.profile'prof_fn = "<filename>"filename, where to generate profiling info, usedonly if 'profile' is sethistory = 0/1whether instruction execution flow is tracked fordisplay by simulator hist command. Useful forback-trace debugging.iprompt = 0/1whether we strart in interactive promptexe_log = 0/1whether execution log should be generatedexe_log_fn = "<filename>"where to put execution log in, used only if 'exe_log'is setclkcycle = <value>[ps|ns|us|ms]specifies time measurement for one cycle*/section simverbose = 0debug = 0profile = 0prof_fn = "sim.profile"history = 0/* iprompt = 0 */exe_log = 0exe_log_type = softwareexe_log_start = 3800000/* exe_log_end = 20000000*/exe_log_marker = 1000exe_log_fn = "executed.log"end/* SECTION VAPIThis section configures Verification API, used for AdvancedCore Verification.enabled = 0/1whether to start VAPI serverserver_port = <value>TCP/IP port to start VAPI server onlog_enabled = 0/1whether logging of VAPI requests is enabledvapi_fn = <filename>specifies filename where to log into, if log_enabled is selected*/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 registersuperscalar = 0/1whether CPU is scalar or superscalar(modify cpu/or32/execute.c to tune superscalar model)hazards = 0/1whether data hazards are tracked in superscalar CPUand displayed by the simulator r commanddependstats = 0/1whether inter-instruction dependencies are calculatedand displayed by simulator stats command.slp = 0/1calculation of subroutine level parallelism. Displayedby simulator stats command.btic = 0/1enable branch target instruction cache modelbpb = 0/1enable branch prediction buffer modelparameters for CPU analysis*/section cpuver = 0x1200rev = 0x0001/* upr = */superscalar = 0hazards = 0dependstats = 0slp = 0btic = 0bpb = 0end/* DEBUG SECTIONThis sections specifies how debug unit should behave.enabled = 0/1whether debug unit is enabledgdb_enabled = 0/1whether to start gdb server at 'server_port' portserver_port = <value>TCP/IP port to start gdb server on, used only if gdb_enabledis setsection debugenabled = 0gdb_enabled = 0server_port = 9999end/* MC SECTIONThis section configures the memory controllerenabled = 0/1whether memory controller is enabledbaseaddr = <hex_value>address of first MC registerPOC = <hex_value>Power On Configuration register*/section mcenabled = 1baseaddr = 0x93000000POC = 0x00000008 /* Power on configuration register */end/* UART SECTIONThis section configures UARTsenabled = 0/1whether uarts are enablednuarts = <value>make specified number of instances, configure eachinstance within device - enddevice construct.instance specific:baseaddr = <hex_value>address of first UART register for this devicerx_file = "<filename>"filename, where to read data fromtx_file = "<filename>"filename, where to write data toirq = <value>irq number for this device16550 = 0/10, if this device is uart 16450 and 1, if it is 16550jitter = <value>in msecs... time to block, -1 to disable itvapi_id = <hex_value>VAPI id of this instance*/section uartenabled = 1nuarts = 1device 0baseaddr = 0x90000000irq = 2rxfile = "uart0.rx"txfile = "uart0.tx"jitter = -1 /* async behaviour */16550 = 1enddeviceend/* DMA SECTIONThis section configures DMAsenabled = 0/1whether DMAs are enabledndmas = <value>make specified number of instances, configure eachinstance within device - enddevice construct.instance specific: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 = 0ndmas = 1device 0baseaddr = 0x9a000000irq = 11enddeviceend/* ETHERNET SECTIONThis section configures ethernetsenabled = 0/1whether ethernets are enablednethernets = <value>make specified number of instances, configure eachinstance within device - enddevice construct.instance specific:baseaddr = <hex_value>address of first ethernet register for this devicedma = <value>which controller is this ethernet "connected" torx_channel = <value>DMA channel used for RXtx_channel = <value>DMA channel used for TXrx_file = "<filename>"filename, where to read data fromtx_file = "<filename>"filename, where to write data tovapi_id = <hex_value>VAPI id of this instance*/section ethernetnethernets = 1device 0baseaddr = 0x92000000dma = 0irq = 4rtx_type = 1tx_channel = 0rx_channel = 1rxfile = "eth0.rx"txfile = "eth0.tx"sockif = "eth0"enddeviceend/* TICK TIMER SECTIONThis section configures tick timerenabled = 0/1whether tick timer is enabledirq = <value>irq number*/section tickenabled = 1irq = 0endsection fbenabled = 1baseaddr = 0x97000000refresh_rate = 10000000filename = "primary"end/* KBD SECTIONThis section configures PS/2 compatible keyboardenabled = 0/1whether keyboard is enabledbaseaddr = <hex_value>base address of the keyboard devicerxfile = "<filename>"filename, where to read data from*/section kbdenabled = 1irq = 5baseaddr = 0x94000000rxfile = "kbd.rx"end
