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

Subversion Repositories zipcpu

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /zipcpu/trunk/bench/asm
    from Rev 42 to Rev 50
    Reverse comparison

Rev 42 → Rev 50

/testdiv.S
1,3 → 1,77
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; Filename: testdiv.S
;
; Project: Zip CPU -- a small, lightweight, RISC CPU soft core
;
; Purpose: Tests the libraries signed division algorithm.
;
; Creator: Dan Gisselquist, Ph.D.
; Gisselquist Tecnology, 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
;
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; Registers:
; R12 Peripheral base
; R11 Address of our one memory variable
;
#include "sys.i"
start:
LDI 0xc0000000,R12 ; Get the address of our peripheral base
MOV $1(PC),R11 ; Get a memory address for a variable
BRA skip_test_variable
test_variable:
.DAT 0
skip_test_variable:
LDI $-1,R0 ; Start the watchdog timer
STO R0,sys.bus.wdt(R12)
LSR $1,R0 ; R0 now = 0x7fffffff
STO R0,sys.bus.tma(R12)
LSR $1,R0 ; R0 now = 0x3fffffff
STO R0,sys.bus.tmb(R12)
LSR $1,R0
STO R0,sys.bus.tmc(R12)
;
CLR R0
wdt_test_loop:
ADD $1,R0
LOD (R11),R1
CMP R0,R1
STO.LT R0,(R11)
TST -1,R0
BLT wdt_test_program_is_broken
BRA wdt_test_loop
 
wdt_test_program_is_broken:
HALT
 
 
 
 
 
 
 
 
 
 
entry:
; Set up a test program
MOV test_div_program(PC),uPC
/zipdhry.S
1,3 → 1,35
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; Filename: zipdhry.S
;
; Project: Zip CPU -- a small, lightweight, RISC CPU soft core
;
; Purpose: Zip assembly file for running the Dhrystone benchmark in the
; Zip CPU.
;
; Creator: Dan Gisselquist, Ph.D.
; Gisselquist Tecnology, 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
;
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
// Under Verilator:
// DMIPS: 25.57 100 MHz 0.26
// For comparison:
/Makefile
1,3 → 1,35
################################################################################
#
# Filename: Makefile
#
# Project: Zip CPU -- a small, lightweight, RISC CPU soft core
#
# Purpose: This makefile builds the various assembler level test benches
# that exist.
#
# Creator: Dan Gisselquist, Ph.D.
# Gisselquist Tecnology, 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
#
#
################################################################################
#
all: zipdhry.z testdiv.z wdt.z
ZASM := ../../sw/zasm/zasm
ZDMP := ../../sw/zasm/zdump

powered by: WebSVN 2.1.0

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