LOGIN   :::   RECOVER PASS   :::   GET ACCOUNT    
Browse
  • Projects
  • Code (CVS)
  • Forums
  • News
  • Articles
  • Polls
  •  
    OpenCores
  • FAQ
  • CVS HowTo
  • Mission
  • Media
  • Tools
  • Advertise
  • Mirrors
  • Logos
  • Contact us
  • Find Resources
  • Job Opportunity
  •  
    Tools
  • Search
      
  • Download Cores (CVSGet)
  •  
    More
  • Wishbone
  • Perlilog
  • EDA tools
  • OpenTech CD
  •  
    Navigation: All forums > Openrisc > Message List > Message Post

    Message

    Reply | Reply all
    Date Prev | Date Next | Thread Prev | Thread Next Date Index | Thread Index

    From: =?unknown-8bit?Q?Gy=F6rgy?= 'nog' Jeney<nog@s...>
    Date: Thu Mar 24 21:10:45 CET 2005
    Subject: [openrisc] [or1ksim #61] Cosmetic fixes
    Top
    Hi,

    This contains some typo fixes, spelling mistake fixes, some very wrong grammer
    fixes, removes some uneeded casts, removes some uneeded declarations, fixes some
    weird indentation used for only 5 lines of a function and cleans up some
    whitespace. It also fixes some definitions like `do_scheduler()'. If the
    parameters are omitted in a function declaration it means that its arguments are
    unknown and not that it takes no parameters.

    This is just some stuff that I randomly found while reading the code, I have not
    (and won't) police the code for any sort of cosmetic deviances.

    ChangeLog:
    * Cosmetic fixes.

    nog.
    -------------- next part --------------
    diff -urp --unidirectional-new-file /home/nog/or1ksim-split/cpu/common/abstract.c ./cpu/common/abstract.c
    --- /home/nog/or1ksim-split/cpu/common/abstract.c 2005-03-23 18:17:18.000000000 +0100
    +++ ./cpu/common/abstract.c 2005-03-14 08:05:56.000000000 +0100
    @@ -47,6 +47,7 @@ only memory. */
    #include "sprs.h"
    #include "support/profile.h"
    #include "dmmu.h"
    +#include "immu.h"
    #include "dcache_model.h"
    #include "icache_model.h"
    #include "debug.h"
    @@ -757,7 +758,7 @@ void setsim_mem8_atomic(oraddr_t memaddr

    /* Set mem, 32-bit. Big endian version.
    *
    - * STATISTICS OK. (the only suspicious usage is in toplevel.c,
    + * STATISTICS OK. (the only suspicious usage is in sim-cmd.c,
    * where this instruction is used for patching memory,
    * wether this is cpu or architectual access is yet to
    * be decided)
    @@ -847,7 +848,7 @@ void set_mem16(oraddr_t memaddr, uint16_
    *breakpoint += CheckDebugUnit(DebugStoreData,value);
    }

    - dc_simulate_write(memaddr, (unsigned long)value, 2);
    + dc_simulate_write(memaddr, value, 2);

    if (cur_area && cur_area->log)
    fprintf (cur_area->log, "[%"PRIxADDR"] -> write %04"PRIx16"\n", memaddr,
    Only in /home/nog/or1ksim-split/cpu/common: abstract.c.rej
    diff -urp --unidirectional-new-file /home/nog/or1ksim-split/cpu/common/abstract.h ./cpu/common/abstract.h
    --- /home/nog/or1ksim-split/cpu/common/abstract.h 2005-03-22 17:12:16.000000000 +0100
    +++ ./cpu/common/abstract.h 2005-03-09 21:16:50.000000000 +0100
    @@ -66,12 +66,6 @@ struct dev_memarea {
    void *priv_dat;
    };

    -extern struct iqueue_entry iqueue[20];
    -extern struct iqueue_entry icomplet[20];
    -extern oraddr_t pc;
    -extern int mem_cycles; /* Number of memory cycles in during this instruction execution */
    -extern int cycles; /* Total number of cycles executed so far */
    -
    extern void dumpmemory(oraddr_t from, oraddr_t to, int disasm, int nl);
    extern uint32_t eval_mem32(oraddr_t memaddr,int*);
    extern uint16_t eval_mem16(oraddr_t memaddr,int*);
    diff -urp --unidirectional-new-file /home/nog/or1ksim-split/cpu/or1k/sprs.c ./cpu/or1k/sprs.c
    --- /home/nog/or1ksim-split/cpu/or1k/sprs.c 2005-03-23 18:17:18.000000000 +0100
    +++ ./cpu/or1k/sprs.c 2005-03-21 18:24:55.000000000 +0100
    @@ -140,13 +140,13 @@ mtspr(uint16_t regno, const sprword valu
    PRINTF("Audio closed.\n");
    runtime.sim.cont_run = 0;
    break;
    - case SPR_PMR:
    - /* PMR[SDF] and PMR[DCGE] are ignored completely. */
    - if (value & SPR_PMR_SUME) {
    - PRINTF ("SUSPEND: PMR[SUME] bit was set.\n");
    - runtime.sim.cont_run = 0;
    - }
    - break;
    + case SPR_PMR:
    + /* PMR[SDF] and PMR[DCGE] are ignored completely. */
    + if (value & SPR_PMR_SUME) {
    + PRINTF ("SUSPEND: PMR[SUME] bit was set.\n");
    + runtime.sim.cont_run = 0;
    + }
    + break;
    default:
    /* Mask reseved bits in DTLBMR and DTLBMR registers */
    if ( (regno >= SPR_DTLBMR_BASE(0)) && (regno < SPR_DTLBTR_LAST(3))) {
    diff -urp --unidirectional-new-file /home/nog/or1ksim-split/cpu/or32/execute.c ./cpu/or32/execute.c
    --- /home/nog/or1ksim-split/cpu/or32/execute.c 2005-03-23 19:38:39.000000000 +0100
    +++ ./cpu/or32/execute.c 2005-03-24 17:17:09.000000000 +0100
    @@ -125,7 +125,7 @@ void setsim_reg(unsigned int regno, uorr

    inline static void set_reg(int regno, uorreg_t value)
    {
    -#if 0
    +#if 0
    if (strcmp(regstr, FRAME_REG) == 0) {
    PRINTF("FP (%s) modified by insn at %x. ", FRAME_REG, cpu_state.pc);
    PRINTF("Old:%.8lx New:%.8lx\n", eval_reg(regno), value);
    diff -urp --unidirectional-new-file /home/nog/or1ksim-split/mmu/immu.c ./mmu/immu.c
    --- /home/nog/or1ksim-split/mmu/immu.c 2005-03-23 18:17:18.000000000 +0100
    +++ ./mmu/immu.c 2005-03-16 12:39:36.000000000 +0100
    @@ -124,7 +124,7 @@ static inline oraddr_t immu_simulate_tlb /* DESC: try to find EA -> PA transaltion without changing * any of precessor states. if this is not passible gives up - * (without triggering exceptions) + * (without triggering exceptions). * * PRMS: virtaddr - EA for which to find translation * diff -urp --unidirectional-new-file /home/nog/or1ksim-split/peripheral/fb.c ./peripheral/fb.c --- /home/nog/or1ksim-split/peripheral/fb.c 2005-03-22 16:57:30.000000000 +0100 +++ ./peripheral/fb.c 2005-02-11 11:42:51.000000000 +0100 @@ -294,7 +294,7 @@ void fb_job (void *dat) } } -/* Reset all VGAs */ +/* Reset all FBs */ void fb_reset (void *dat) { struct fb_state *fb = dat; diff -urp --unidirectional-new-file /home/nog/or1ksim-split/peripheral/ps2kbd.c ./peripheral/ps2kbd.c --- /home/nog/or1ksim-split/peripheral/ps2kbd.c 2005-03-22 16:57:30.000000000 +0100 +++ ./peripheral/ps2kbd.c 2005-02-11 09:54:28.000000000 +0100 @@ -275,7 +275,7 @@ void kbd_reset (void *dat) if (!(kbd->rxfs = fopen(kbd->rxfile, "r")) && !(kbd->rxfs = fopen(kbd->rxfile, "r+"))) { - fprintf (stderr, "WARNING: Keyboard has problems with RX file stream.\n"); + fprintf (stderr, "WARNING: Unable to open RX file stream.\n"); return; } kbd->slowdown = (long) ((config.sim.system_kfreq * 1000.) / KBD_BAUD_RATE); diff -urp --unidirectional-new-file /home/nog/or1ksim-split/pic/pic.c ./pic/pic.c --- /home/nog/or1ksim-split/pic/pic.c 2005-03-23 18:17:18.000000000 +0100 +++ ./pic/pic.c 2005-03-21 18:24:55.000000000 +0100 @@ -43,7 +43,6 @@ Foundation, Inc., 675 Mass Ave, Cambridg #include "sched.h" #include "debug.h" -extern int cont_run; DEFAULT_DEBUG_CHANNEL(pic); /* Reset. It initializes PIC registers. */ diff -urp --unidirectional-new-file /home/nog/or1ksim-split/sim-cmd.c ./sim-cmd.c --- /home/nog/or1ksim-split/sim-cmd.c 2005-03-23 18:17:18.000000000 +0100 +++ ./sim-cmd.c 2005-02-24 18:16:38.000000000 +0100 @@ -168,7 +168,7 @@ static int sim_cmd_dm(int argc, char **a return 0; } -static int sim_cmd_dv(int argc, char **argv) /* dump memory as verilog*/ +static int sim_cmd_dv(int argc, char **argv) /* dump memory as verilog */ { static oraddr_t from = 0, to = 0; @@ -191,7 +191,7 @@ static int sim_cmd_dv(int argc, char **a return 0; } -static int sim_cmd_dh(int argc, char **argv) /* dump memory as hex*/ +static int sim_cmd_dh(int argc, char **argv) /* dump memory as hex */ { static oraddr_t from = 0, to = 0; diff -urp --unidirectional-new-file /home/nog/or1ksim-split/sim-config.h ./sim-config.h --- /home/nog/or1ksim-split/sim-config.h 2005-02-25 16:55:54.000000000 +0100 +++ ./sim-config.h 2005-02-18 17:31:10.000000000 +0100 @@ -1,4 +1,4 @@ -/* config.h -- Simulator configuration header file +/* sim-config.h -- Simulator configuration header file Copyright (C) 1999 Damjan Lampret, lampret@o... This file is part of OpenRISC 1000 Architectural Simulator. @@ -25,7 +25,6 @@ /* Simulator configuration macros. Eventually this one will be a lot bigger. */ #define MAX_MEMORIES 16 /* Max. number of memory devices attached */ -#define MAX_ATAS 4 /* Max. number of ATAS */ #define MAX_SBUF_LEN 256 /* Max. length of store buffer */ #define EXE_LOG_HARDWARE 0 /* Print out RTL states */ @@ -218,12 +217,6 @@ struct runtime { } simcmd; struct { - unsigned long ifea; /* Instruction fetch effective address */ - unsigned long lea; /* Load effective address */ - unsigned long sea; /* Store effective address */ - unsigned long ld; /* Load data */ - unsigned long sd; /* Store data */ - unsigned long lsea; /* Load/Store effective address */ long long instructions; /* Instructions executed */ long long reset_instructions; @@ -321,12 +314,7 @@ struct config_section *reg_config_sec(co extern struct config_section *cur_section; #define CONFIG_ERROR(s) {fprintf (stderr, "ERROR: config.%s:%s\n", cur_section->name, s); if (runtime.sim.init) exit (1);} -/* FIXME: These will disapeer... */ -void change_device (); -void end_device (); -extern int current_device; - -/* FIXME: These will disapeer with the above... */ +/* FIXME: These will disapeer one day... */ void reg_mc_sec(void); void reg_uart_sec(void); void reg_dma_sec(void); diff -urp --unidirectional-new-file /home/nog/or1ksim-split/support/simprintf.c ./support/simprintf.c --- /home/nog/or1ksim-split/support/simprintf.c 2005-03-22 17:12:16.000000000 +0100 +++ ./support/simprintf.c 2005-03-05 14:32:27.000000000 +0100 @@ -1,4 +1,4 @@ -/* libc.c -- dummy C library simulation +/* simprintf.c -- Simulator printf implementation Copyright (C) 1999 Damjan Lampret, lampret@o... This file is part of OpenRISC 1000 Architectural Simulator. diff -urp --unidirectional-new-file /home/nog/or1ksim-split/testbench/mmu.c ./testbench/mmu.c --- /home/nog/or1ksim-split/testbench/mmu.c 2002-09-04 13:29:25.000000000 +0200 +++ ./testbench/mmu.c 2005-03-07 15:12:45.000000000 +0100 @@ -845,7 +845,7 @@ int itlb_translation_test (void) /* Disable IMMU */ immu_disable(); - /* Invalidate all entries in DTLB */ + /* Invalidate all entries in ITLB */ for (i = 0; i < ITLB_WAYS; i++) { for (j = 0; j < ITLB_SETS; j++) { mtspr (SPR_ITLBMR_BASE(i) + j, 0); @@ -861,7 +861,7 @@ int itlb_translation_test (void) mtspr (SPR_ITLBTR_BASE(0) + i, ta | ITLB_PR_NOLIMIT); } - /* Set dtlb permisions */ + /* Set itlb permisions */ itlb_val = ITLB_PR_NOLIMIT; /* Write test program */ @@ -1095,7 +1095,7 @@ int itlb_valid_bit_test (int set) /* Permission test Set various permissions, perform r/w access - in user and supervisor mode and chack triggering + in user and supervisor mode and check triggering of page fault exceptions */ int itlb_premission_test (int set) { diff -urp --unidirectional-new-file /home/nog/or1ksim-split/tick/tick.c ./tick/tick.c --- /home/nog/or1ksim-split/tick/tick.c 2005-03-23 18:17:18.000000000 +0100 +++ ./tick/tick.c 2005-03-16 17:24:23.000000000 +0100 @@ -57,7 +57,7 @@ unsigned long ttcr; unsigned long ttmr; /* Reset. It initializes TTCR register. */ -void tick_reset() +void tick_reset(void) { if (config.sim.verbose) PRINTF("Resetting Tick Timer.\n"); diff -urp --unidirectional-new-file /home/nog/or1ksim-split/toplevel.c ./toplevel.c --- /home/nog/or1ksim-split/toplevel.c 2005-03-23 18:17:18.000000000 +0100 +++ ./toplevel.c 2005-03-21 19:28:40.000000000 +0100 @@ -313,7 +313,7 @@ void sim_init () } /* Cleanup */ -void sim_done () +void sim_done (void) { if (config.sim.profile) { fprintf(runtime.sim.fprof,"-%08llX FFFFFFFF\n", runtime.sim.cycles); @@ -328,7 +328,7 @@ void sim_done () } /* Executes jobs in time queue */ -static inline void do_scheduler () +static inline void do_scheduler (void) { struct sched_entry *tmp;

     
    Copyright (c) 1999 OPENCORES.ORG. All rights reserved.