Ignore:
Timestamp:
Oct 17, 2012, 12:03:39 PM (12 years ago)
Author:
bouyer
Message:

Update/add 2 new tests, from tests_mips32_vcache:
test_llsc: check basic functionnality of ll/sc
test_sc_no_ll: check that a sc without prior ll fails as expected

Location:
trunk/softs/tests_ccvcache_v4
Files:
4 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/softs/tests_ccvcache_v4/run_tests

    r232 r265  
    1515   test_dtlb_ptprinval test_itlb_ptprinval test_idtlb_ptprinval \
    1616   test_sync \
    17    test_sc_update_cache test_pte_llsc \
     17   test_llsc test_sc_no_ll test_sc_update_cache test_pte_llsc \
    1818   test_interrupt \
    1919   test_interrupt_epc_modify \
  • trunk/softs/tests_ccvcache_v4/test_llsc/run

    r232 r265  
    11#!/bin/sh
     2
     3. ../common/common.sh
    24
    35check_output()
    46{
    5         egrep "^0x00000000 0xAC4000FF 0xAC4000FF 0x00000000$" run.out > /dev/null
     7        egrep "^0x0000DEAD 0x0000DEAD 0x0000BEEF 0x0000DEAD$" run.out > /dev/null
    68        if [ $? -eq 0 ]; then
    79                return 0;
     
    1214
    1315make --quiet || exit 1
    14 ../platform/simulation.x > run.out 2>&1
     16${SIMUL} > run.out 2>&1
    1517if [ $? -eq 0 ]; then
    1618        if check_output; then
  • trunk/softs/tests_ccvcache_v4/test_llsc/test.S

    r232 r265  
    3131        PUTCHAR(' ')
    3232
    33         /* now write to myvar via ll/sc
     33        /* now write to myvar via ll/sc */
    3434        la      s1, myvar
    35351:
     
    3737        li      a1, MAGIC2
    3838        sc      a1, 0(s1)
    39         beqz    a1, 2b
     39        beqz    a1, 1b
    4040        nop
    4141
     42        PRINTX /* print what we read with ll */
     43        PUTCHAR(' ')
     44
     45        la      s1, myvar
     46        lw      a0, 0(s1) /* print the new value */
     47        PRINTX
     48        PUTCHAR(' ')
     49
    4250        /* restore myvar value via normal write */
     51        la      s1, myvar
    4352        li      a1, MAGIC1
    4453        sw      a1, 0(s1)
     
    93102pte1:
    94103        .align 13
    95         .word PTE1_V | PTE1_C | PTE1_W | 0x0 /* map PA 0 at VA 0 */
     104        .word PTE1_V | PTE1_W | 0x0 /* map PA 0 at VA 0 */
    96105        .org pte1 + (BOOT_ADDRESS >> 21) * 4
    97106        .word PTE1_V | PTE1_C | PTE1_X | (BOOT_ADDRESS >> 21) /* map PA 0xbfc00000 at VA 0xbfc00000 */
  • trunk/softs/tests_ccvcache_v4/test_sync/run.out

    r232 r265  
    11
    2              SystemC 2.2.0 --- Apr 14 2011 18:52:40
     2             SystemC 2.2.0 --- Jun  8 2009 14:24:30
    33        Copyright (c) 1996-2006 by all Contributors
    44                    ALL RIGHTS RESERVED
     
    1111 <Segment "mdma_d": base = 0xe8000000 / size = 0x14 / tgtid = (5) / uncached>
    1212
    13 Mapping table: ad:(6) id:(6) cacheability mask: 0xf0000000
    14  <Segment "proc_c": base = 0x10000000 / size = 0x10 / tgtid = (0) / uncached / init = (0)>
    15  <Segment "memc_c": base = 0 / size = 0x2000010 / tgtid = (1) / uncached>
    16  <Segment "brom_c": base = 0xbfc00000 / size = 0x40000 / tgtid = (1) / uncached>
     13Mapping table: ad:(14) id:(14) cacheability mask: 0xf0000000
     14 <Segment "proc_c": base = 0 / size = 0x10 / tgtid = (0) / uncached>
     15 <Segment "memc_c": base = 0x40000 / size = 0x10 / tgtid = (1) / uncached>
    1716
    1817Loading at 0xbfc00000 size 262144: .text
Note: See TracChangeset for help on using the changeset viewer.