OpenCores
URL https://opencores.org/ocsvn/xulalx25soc/xulalx25soc/trunk

Subversion Repositories xulalx25soc

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 34 to Rev 35
    Reverse comparison

Rev 34 → Rev 35

/xulalx25soc/trunk/bench/asm/memtest.s
1,47 → 1,51
////////////////////////////////////////////////////////////////////////////////
//
// Filename: memtest.S
//
// Project: XuLA2 board
//
// Purpose: To test whether or not we can interface with the SDRAM on the
// XuLA2 board.
//
//
// Creator: Dan Gisselquist, Ph.D.
// Gisselquist Technology, LLC
//
////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2015, Gisselquist Technology, LLC
//
// This program is free software (firmware): you can redistribute it and/or
// modify it 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) any later version.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTIBILITY or
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
// for more details.
//
// License: GPL, v3, as defined and found on www.gnu.org,
// http://www.gnu.org/licenses/gpl.html
//
//
////////////////////////////////////////////////////////////////////////////////
//
//
;///////////////////////////////////////////////////////////////////////////////
;/
;/ Filename: memtest.S
;/
;/ Project: XuLA2 board
;/
;/ Purpose: To test whether or not we can interface with the SDRAM on the
;/ XuLA2 board.
;/
;/
;/ Creator: Dan Gisselquist, Ph.D.
;/ Gisselquist Technology, LLC
;/
;///////////////////////////////////////////////////////////////////////////////
;/
;/ Copyright (C) 2015, Gisselquist Technology, LLC
;/
;/ This program is free software (firmware): you can redistribute it and/or
;/ modify it 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) any later version.
;/
;/ This program is distributed in the hope that it will be useful, but WITHOUT
;/ ANY WARRANTY; without even the implied warranty of MERCHANTIBILITY or
;/ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
;/ for more details.
;/
;/ License: GPL, v3, as defined and found on www.gnu.org,
;/ http://www.gnu.org/licenses/gpl.html
;/
;/
;///////////////////////////////////////////////////////////////////////////////
;/
;/
#define LFSRFILL 0x000001
// #define LFSRTAPS 0x004597f
;/ #define LFSRTAPS 0x004597f
#define LFSRTAPS 0x0408b85
#define SDRAMBASE 0x0800000
// #define SDRAMLEN 0x0800000
;/ #define SDRAMLEN 0x0800000
#define SDRAMLEN 0x0800000
#define RAMSCOPE 0x011c
#define ZIPSCOPE 0x011e
master_entry:
MOV user_entry(PC),uPC
.section .start
.global _start
.type _start,@function
_start:
LDI user_entry,R0
MOV R0,uPC
; LDI RAMSCOPE,R8
; LDI 0x04000000,R9
; STO R9,(R8)
52,9 → 56,9
; NOP
;
HALT
 
.section .text
user_entry:
// #define CLEAR_MEMORY
;/ #define CLEAR_MEMORY
#ifdef CLEAR_MEMORY
clear_memory:
LDI SDRAMBASE,R0
79,7 → 83,7
MOV R2,R7 ; Copy our initial fill
CMP 0,R2
HALT.Z
// #define WAIT_FOR_WRITE_SCOPE
;/ #define WAIT_FOR_WRITE_SCOPE
#ifdef WAIT_FOR_WRITE_SCOPE
LDI RAMSCOPE,R8
LDI 0x01ffc,R9
116,7 → 120,7
read_test:
LDI SDRAMBASE,R0
LDI SDRAMLEN,R1
// #define WAIT_FOR_READ_SCOPE
;/ #define WAIT_FOR_READ_SCOPE
#ifdef WAIT_FOR_READ_SCOPE
LDI RAMSCOPE,R8
LDI 0x01ffc,R9
129,9 → 133,9
TST R10,R9
BZ not_ready
#endif
//
// RAM[49072] = 0x02b39ba ... not RAM[0]. What's going on here?
//
;/
;/ RAM[49072] = 0x02b39ba ... not RAM[0]. What's going on here?
;/
read_test_loop:
LOD (R0),R4
LOD 1(R0),R5
/xulalx25soc/trunk/bench/asm/Makefile
36,6 → 36,12
ZASM := $(ZIPD)/sw/zasm/zasm
ZDUMP:= $(ZIPD)/sw/zasm/zdump
 
ZIPCPP:= $(CROSSD)zip-cpp
ZIPAS := $(CROSSD)zip-as
ZIPLD := $(CROSSD)zip-ld
OBDMP := $(CROSSD)zip-objdump
XULALNK:= xulalink.x
 
.PHONY: genlrs
genlrs: genlrs.z
genlrs.z: genlrs.S
52,10 → 58,12
 
.PHONY: memtest
memtest: memtest.z
memtest.z: memtest.s
$(ZASM) $< -o $@
memtest.zo: memtest.s
$(ZIPCPP) $< | $(ZIPAS) -o $@ --
memtest.z: memtest.zo
$(ZIPLD) -T $(XULALNK) $< -o $@
memtest.txt: memtest.z
$(ZDUMP) $< > $@
$(OBDMP) -d $< > $@
 
.PHONY: cfgtest
cfgtest: cfgtest.z
66,4 → 74,4
 
.PHONY:
clean:
@rm memtest.z memtest.txt
@rm -f memtest.z memtest.txt cfgtest.txt cfgtest.z *.zo a.out

powered by: WebSVN 2.1.0

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