1# Check that DRAM memory access works. 2# mach: pru 3 4# Copyright (C) 2016-2024 Free Software Foundation, Inc. 5# Contributed by Dimitar Dimitrov <dimitar@dinux.eu> 6# 7# This file is part of the GNU simulators. 8# 9# This program is free software; you can redistribute it and/or modify 10# it under the terms of the GNU General Public License as published by 11# the Free Software Foundation; either version 3 of the License, or 12# (at your option) any later version. 13# 14# This program is distributed in the hope that it will be useful, 15# but WITHOUT ANY WARRANTY; without even the implied warranty of 16# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17# GNU General Public License for more details. 18# 19# You should have received a copy of the GNU General Public License 20# along with this program. If not, see <http://www.gnu.org/licenses/>. 21 22.include "testutils.inc" 23 24 start 25 26 fill r20, 16 27 ldi r10, 0 28 not r10, r10 29 qbne F, r20, r10 30 qbne F, r21, r10 31 qbne F, r22, r10 32 qbne F, r23, r10 33 34 zero r20, 16 35 qbne F, r20, 0 36 qbne F, r21, 0 37 qbne F, r22, 0 38 qbne F, r23, 0 39 40 ldi r0, testarray 41 lbbo &r20, r0, 0, 7 42 qbne F, r20.b0, 0x01 43 qbne F, r20.b1, 0x23 44 qbne F, r20.b2, 0x45 45 qbne F, r20.b3, 0x67 46 qbne F, r21.b0, 0x89 47 qbne F, r21.b1, 0xab 48 qbne F, r21.b2, 0xcd 49 qbne F, r21.b3, 0x00 ; Should not have been loaded! 50 qbne F, r22, 0 51 qbne F, r23, 0 52 53 ldi r1, 0x11 54 sbbo &r1, r0, 9, 1 55 ldi r1, 0x11 56 sbbo &r1, r0, 12, 4 57 58 lbbo &r20, r0, 0, 16 59 qbne F, r21.b3, 0xef 60 qbne F, r22.b0, 0xff 61 qbne F, r22.b1, 0x11 62 qbne F, r22.b2, 0xff 63 qbne F, r22.b3, 0xff 64 qbne F, r23, 0x11 65 66 pass 67F: fail 68 69 .data 70testarray: 71 .byte 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef 72 .byte 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff 73