OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [or1ksim/] [or1ksim-0.4.0rc1/] [testsuite/] [test-code-or1k/] [cfg/] [cfg.S] - Diff between revs 90 and 105

Only display areas with differences | Details | Blame | View Log

Rev 90 Rev 105
/* cfg.s. CPU configuration test of Or1ksim
/* cfg.s. CPU configuration test of Or1ksim
   Copyright (C) 1999-2006 OpenCores
   Copyright (C) 1999-2006 OpenCores
   Copyright (C) 2010 Embecosm Limited
   Copyright (C) 2010 Embecosm Limited
   Contributors various OpenCores participants
   Contributors various OpenCores participants
   Contributor Jeremy Bennett 
   Contributor Jeremy Bennett 
   This file is part of OpenRISC 1000 Architectural Simulator.
   This file is part of OpenRISC 1000 Architectural Simulator.
   This program is free software; you can redistribute it and/or modify it
   This program is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published by the Free
   under the terms of the GNU General Public License as published by the Free
   Software Foundation; either version 3 of the License, or (at your option)
   Software Foundation; either version 3 of the License, or (at your option)
   any later version.
   any later version.
   This program is distributed in the hope that it will be useful, but WITHOUT
   This program is distributed in the hope that it will be useful, but WITHOUT
   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
   more details.
   more details.
   You should have received a copy of the GNU General Public License along
   You should have received a copy of the GNU General Public License along
   with this program.  If not, see .  */
   with this program.  If not, see .  */
/* ----------------------------------------------------------------------------
/* ----------------------------------------------------------------------------
   This code is commented throughout for use with Doxygen.
   This code is commented throughout for use with Doxygen.
   --------------------------------------------------------------------------*/
   --------------------------------------------------------------------------*/
#include "spr-defs.h"
#include "spr-defs.h"
        .section .except, "ax"
        .section .except, "ax"
        l.addi  r2,r0,0
        l.addi  r2,r0,0
        .section .text
        .section .text
        .org 0x100
        .org 0x100
_reset:
_reset:
        l.addi  r1,r0,0x7f00
        l.addi  r1,r0,0x7f00
        l.movhi r2,hi(_main)
        l.movhi r2,hi(_main)
        l.ori   r2,r2,lo(_main)
        l.ori   r2,r2,lo(_main)
        l.jr    r2
        l.jr    r2
        l.nop
        l.nop
_main:
_main:
        l.addi  r2,r0,0
        l.addi  r2,r0,0
        l.mfspr r3,r0,SPR_VR            /* Version */
        l.mfspr r3,r0,SPR_VR            /* Version */
  l.nop NOP_REPORT
  l.nop NOP_REPORT
        l.add   r2,r2,r3
        l.add   r2,r2,r3
        l.mfspr r3,r0,SPR_UPR           /* Unit Present */
        l.mfspr r3,r0,SPR_UPR           /* Unit Present */
  l.nop NOP_REPORT
  l.nop NOP_REPORT
        l.add   r2,r2,r3
        l.add   r2,r2,r3
        l.mfspr r4,r0,SPR_PMR           /* Power Management */
        l.mfspr r4,r0,SPR_PMR           /* Power Management */
        l.addi  r3,r0,0
        l.addi  r3,r0,0
        l.mtspr r0,r3,SPR_PMR
        l.mtspr r0,r3,SPR_PMR
        l.mfspr r3,r0,SPR_PMR
        l.mfspr r3,r0,SPR_PMR
        l.andi  r3,r3,0xff
        l.andi  r3,r3,0xff
        l.nop NOP_REPORT
        l.nop NOP_REPORT
        l.add   r2,r2,r3
        l.add   r2,r2,r3
        l.addi  r3,r0,5
        l.addi  r3,r0,5
        l.mtspr r0,r3,SPR_PMR
        l.mtspr r0,r3,SPR_PMR
        l.mfspr r3,r0,SPR_PMR
        l.mfspr r3,r0,SPR_PMR
        l.andi  r3,r3,0xff
        l.andi  r3,r3,0xff
        l.nop NOP_REPORT
        l.nop NOP_REPORT
        l.add   r2,r2,r3
        l.add   r2,r2,r3
        l.mtspr r0,r4,SPR_PMR
        l.mtspr r0,r4,SPR_PMR
        l.mfspr r3,r0,SPR_CPUCFGR
        l.mfspr r3,r0,SPR_CPUCFGR
        l.nop NOP_REPORT
        l.nop NOP_REPORT
        l.add   r2,r2,r3
        l.add   r2,r2,r3
        l.mfspr r3,r0,SPR_DMMUCFGR
        l.mfspr r3,r0,SPR_DMMUCFGR
        l.nop NOP_REPORT
        l.nop NOP_REPORT
        l.add   r2,r2,r3
        l.add   r2,r2,r3
        l.mfspr r3,r0,SPR_IMMUCFGR
        l.mfspr r3,r0,SPR_IMMUCFGR
        l.nop NOP_REPORT
        l.nop NOP_REPORT
        l.add   r2,r2,r3
        l.add   r2,r2,r3
        l.mfspr r3,r0,SPR_DCCFGR
        l.mfspr r3,r0,SPR_DCCFGR
        l.nop NOP_REPORT
        l.nop NOP_REPORT
        l.add   r2,r2,r3
        l.add   r2,r2,r3
        l.mfspr r3,r0,SPR_ICCFGR
        l.mfspr r3,r0,SPR_ICCFGR
        l.nop NOP_REPORT
        l.nop NOP_REPORT
        l.add   r2,r2,r3
        l.add   r2,r2,r3
        l.mfspr r3,r0,SPR_DCFGR
        l.mfspr r3,r0,SPR_DCFGR
        l.nop NOP_REPORT
        l.nop NOP_REPORT
        l.add   r2,r2,r3
        l.add   r2,r2,r3
        l.mfspr r3,r0,SPR_PCCFGR
        l.mfspr r3,r0,SPR_PCCFGR
        l.nop NOP_REPORT
        l.nop NOP_REPORT
        l.add   r2,r2,r3
        l.add   r2,r2,r3
        /* Configurations may differ, so we will insert another report*/
        /* Configurations may differ, so we will insert another report*/
        l.movhi r3,hi(0xdeacf5cc)
        l.movhi r3,hi(0xdeacf5cc)
        l.ori   r3,r3,lo(0xdeacf5cc)
        l.ori   r3,r3,lo(0xdeacf5cc)
        l.add   r3,r2,r3
        l.add   r3,r2,r3
  l.nop NOP_REPORT
  l.nop NOP_REPORT
        l.movhi r3,hi(0xdeaddead)
        l.movhi r3,hi(0xdeaddead)
        l.ori   r3,r3,lo(0xdeaddead)
        l.ori   r3,r3,lo(0xdeaddead)
  l.nop NOP_REPORT
  l.nop NOP_REPORT
        l.addi  r3,r0,0
        l.addi  r3,r0,0
        l.nop NOP_EXIT
        l.nop NOP_EXIT
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.