URL
https://opencores.org/ocsvn/zipcpu/zipcpu/trunk
Subversion Repositories zipcpu
[/] [zipcpu/] [trunk/] [sw/] [zasm/] [test.S] - Rev 165
Compare with Previous | Blame | View Log
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Filename: test.S;; Project: Zip CPU -- a small, lightweight, RISC CPU soft core;; Purpose: A disorganized test, just showing some initial operation of; the CPU. As a disorganized test, it doesn't prove anything; beyond the generic operation of the CPU.;; Status: As of August, 2015, this file assembles, builds, and passes; all of its tests in the Verilator simulator.;; Okay, as of 15 August, there are now some tests that don't pass.; In particular, the #include test used to pass but didn't pass today.; Likewise the PUSH() macro test hasn't passed yet. Finally, be aware; that this implementation is specific to where it loads on a board.; I tried loading it on my Basys development board, where I had placed; RAM in a different location and ... things didn't work out so well.; So grep the __here__ line and adjust it for where you intend to load; this file.;; In general, as I'm building the CPU, I'm modifying this file to place; more and more capability tests within the file. If the Lord is; willing, this will become the proof that the CPU completely works.;;; 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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;#include "sys.i"sys.bus equ 0xc0000000sys.breaken equ 0x080sys.step equ 0x040sys.gie equ 0x020sys.sleep equ 0x010sys.ccv equ 0x008sys.ccn equ 0x004sys.ccc equ 0x002sys.ccz equ 0x001sys.cctrap equ 0x200sys.bu.pic equ 0x000sys.bus.wdt equ 0x001sys.bus.cache equ 0x002sys.bus.ctrpic equ 0x003sys.bus.tma equ 0x004sys.bus.tmb equ 0x005sys.bus.tmc equ 0x006sys.bus.jiffies equ 0x007sys.bus.mtask equ 0x008sys.bus.mpstl equ 0x009sys.bus.mastl equ 0x00asys.bus.mstl equ 0x00bsys.bus.utask equ 0x00csys.bus.upstl equ 0x00dsys.bus.uastl equ 0x00esys.bus.ustl equ 0x00f#define DO_TEST_ASSEMBLER#define LJMP_TEST#define EARLY_BRANCH_TEST#define BREAK_TEST#define OVERFLOW_TEST#define CARRY_TEST#define LOOP_TEST#define SHIFT_TEST#define TRAP_TEST;; Since updating our multiplies, the old MPY_TEST doesn't work anymore. It; really needs to be rebuilt. For now, we just disable it. I know, this is the; wrong approach. Test first and don't get surprised later. Yes. I need to; come back to this--hopefully before getting surprised.;; #define MPY_TEST#define PUSH_TEST#define PIPELINE_STACK_TEST#define MEM_PIPELINE_TEST#define CONDITIONAL_EXECUTION_TEST#define NOWAIT_PIPELINE_TEST // Were wait states btwn regs removed properly?#define BCMEM_TEST // Do memory and conditions work well together?#define PIPELINE_MEMORY_RACE_CONDITIONStest:#ifdef DO_TEST_ASSEMBLER; We start out by testing our assembler. We give it some instructions, which; are then manually checked by disassembling/dumping the result and making; certain they match. This is not an automated test, but it is an important; one.noopbra continue_test_with_testable_instructionsbreakwaitbreakbusyrtucontinue_test_with_testable_instructions:; Now, let's place the assembler into a known stateclr r0clr r1clr r2clr r3clr r4clr r5clr r6clr r7clr r8clr r9clr r10clr r11clr r12clr r13; Don't clear the CC register; Don't clear the SP register; And repeat for the user registersmov R0,uR0mov R0,uR1mov R0,uR2mov R0,uR3mov R0,uR4mov R0,uR5mov R0,uR6mov R0,uR7mov R0,uR8mov R0,uR9mov R0,uR10mov R0,uR11mov R0,uR12mov R0,uR13mov R0,uCC; Don't clear the user PC register; Now, let's try loading some constants into registers; Specifically, we're testing the LDI, LDIHI, and LDILO instructionsdead_beef equ 0xdeadbeefldi 0x0dead,r5ldi 0x0beef,r6ldi 0xdeadbeef,r7brev 0xb57b, r8ldilo 0xbeef, r8ldi dead_beef,r9cmp r5,r6bz test_failurecmp r7,r8bnz test_failureldi $deadbeefh,r7 ; Try loading with the $[HEX]h mneumoniccmp r7,r8bnz test_failurecmp r7,r9bnz test_failurebra skip_dead_beefdead_beef.base:word 0fill 5,dead_beefword 0dead_beef.zero equ 0dead_beef.values equ 1skip_dead_beef:lod dead_beef.base(pc),r10 ; Should load a zero herecmp r10,r11 ; r11 should still be zero from init abvbnz test_failuremov dead_beef.base(pc),r10 ; Now, let's get the addresslod dead_beef.values(r10),r10 ; r10 now equals 0xdeadbeefcmp r10,r9bnz test_failure; Test whether or not our operator precedence rules workldi 5+3*8,r0ldi 3*8+5,r1cmp r0,r1bnz test_failureldi (5+3)*8,r0ldi 8*(3+5),r1cmp r0,r1bnz test_failure; Test whether or not we can properly decode OCTAL valuesclr r0 ; Re-clear our register set firstclr r1clr r2clr r3clr r4clr r5clr r6clr r7clr r8clr r9clr r10clr r11clr r12clr r13;ldi $024o,r0ldi $20,r1cmp r0,r1bnz test_failureldi $024,r0cmp r0,r1bnz test_failureclr r0clr r1mov $1+r0,r2mov $2+r0,r3mov $22h+r0,r4mov $377h+r0,ur5noopnopadd r2,r0add $32,r0add $-33,r0bnz test_failurenot r0bge test_failurejunk_address:clrf r0bnz test_failureldi $5,r1cmp $0+r0,r1not.lt r0not.ge r1mov junk_address(pc),r2 ; Test pc-relative addressingmov junk_address(pc),r3cmp r2,r3bnz test_failurelod junk_address(pc),r5 ; Test loads with pc-relative addressinglod junk_address(pc),r6cmp r5,r6bnz test_failure#endif#ifdef NOONE // Testing comments after ifdef#else ; After else#endif /* and after endif */#ifdef LJMP_TEST// A long jump is a 32-bit instruction followed by a 32-bit address.// The CPU is supposed to jump to this address. At issue in this test,// which can only really be verified by watching it in person currently,// is how fast this branch can take place. Currently, it takes four// clocks--not that bad.//// Although really long jumps, we also test some of our early branching// forms here as well:// 1. Add to PC// 2. LOD (PC),PC (the long jump itself)// 3. LDI x,PC // An early branch target not tested elsewhere//CLR R0CLR R1LJMP.dat __here__+0x0100000+4ADD 1,R0ADD 1,R0ADD 1,R0ADD 1,R0ADD 1,R0ADD 1,R0CMP 3,R0BNZ test_failureLOD.Z __here__+2(PC),PCBRA test_failure.dat __here__+0x0100000+2ADD 1,R0ADD 1,R0ADD 1,R0CMP 5,R0BNZ test_failure// And our last early branching testLDI 0x0100000+__here__+4,PCADD 1,R0ADD 1,R0ADD 1,R0SUB 1,R0CMP 4,R0BNZ test_failure#endif#ifdef EARLY_BRANCH_TEST// Unlike the previous test, this test is going to see whether or not// early branching messes with the pipeline.BRA eb_aBUSYeb_a:BRA eb_bNOPBUSYeb_b:BRA eb_cNOPNOPBUSYeb_c:BRA eb_dNOPNOPNOPBUSYeb_d:BRA eb_eNOPNOPNOPNOPBUSYeb_e:NOOP// Only problem is, I don't expect it to mess with the pipeline unless// the pipeline is full. Therefore we are interested in something which// is not an early branch, conflicting with early branches. So let's// try loading our pipeline in all kinds of different configurations,// just to see which if the conditional branch always annihilates the// early branch as desired.//CLR R0BZ ebz_aBUSYebz_a:BZ ebz_bNOPBUSYebz_b:BZ ebz_cNOPNOPBUSY// Let's repeat that last test, just in case the cache reloaded itself// in the middle and we didn't get our proper test.ebz_c:BZ ebz_dNOPNOPBUSYebz_d:BZ ebz_eNOPNOPNOPBUSYebz_e:BZ ebz_fNOPNOPNOPNOPBUSYebz_f:NOOP#endif#ifdef BREAK_TESTbreaktest:bra breaksupervisorbreakuser:clr r0mov 1+r0,r1mov 1+r1,r2mov 1+r2,r3break ; At address 0x0100097mov 1+r4,r5mov 1+r5,r6clr ccbusybreaksupervisor:ldi -1,r0mov breakuser(pc),upcrtu ; Should just keep returning immediatelymov upc,r0rturtumov upc,r1cmp r0,r1bnz test_failure#endif#ifdef TRAP_TESTtraptest:bra traptest_supervisorbusytraptest_user:trap 0busytraptest_supervisor:mov traptest_user(pc),upcrtumov ucc,r0tst sys.cctrap,r0tst.nz sys.gie,r0bz test_failure#endiftestbench:// Let's build a software test bench.ldi $c0000000h,r12 ; Set R12 to point to our peripheral addressmov r12,ur12mov test_start(pc),upcmov stack(pc),uspldi 0x8000ffff,r0 ; Clear interrupts, turn all vectors offsto r0,(r12)rtumov ucc,r0and 0x0ffff,r0CMP sys.cctrap+sys.gie,r0bnz test_failurehalt// Go into an infinite loop if the trap fails// Permanent loop instruction -- a busy halt if you willtest_failure:busy; Now for a series of tests. If the test fails, call the trap; interrupt with the test number that failed. Upon completion,; call the trap with #0.; Test LDI to PC; Some data registerstest_data:.dat __here__+0x0100000+5test_start:ldi $0x01000,r11ldi -1,r10lod test_data+pc,pcclr r10noopcmp $0,r10trap.z r11add $1,r0add $1,r0#ifdef OVERFLOW_TEST// Let's test whether overflow worksldi $0x02000,r11ldi $-1,r0lsr $1,r0add $1,r0bv first_overflow_passestrap r11first_overflow_passes:// Overflow set from subtractionldi $0x03000,r11ldi $1,r0rol $31,r0 ; rol $31,r0sub $1,r0bv subtraction_overflow_passestrap r11subtraction_overflow_passes:// Overflow set from LSRldi $0x04000,r11ldi $1,r0rol $31,r0 ; rol $31,r0lsr $1,r0bv lsr_overflow_passestrap r11lsr_overflow_passes:// Overflow set from LSLldi $0x05000,r11ldi $1,r0rol $30,r0lsl $1,r0bv lsl_overflow_passestrap r11lsl_overflow_passes:// Overflow set from LSL, negative to positiveldi $0x06000,r11ldi $1,r0rol $31,r0lsl $1,r0bv second_lsl_overflow_passestrap r11#endif // OVERFLOW_TEST#ifdef CARRY_TESTsecond_lsl_overflow_passes:// Test carryldi $0x07000,r11ldi $-1,r0add $1,r0tst sys.ccc,cctrap.z r11// and carry from subtractionldi $0x08000,r11clr r0sub $1,r0tst sys.ccc,cctrap.z r11// Carry from right shiftclr r0 ; r0 = 0lsr 1,r0 ; r0 = 0, c = 0add.c 1,r0 ; r0 = 0cmp 1,r0 ; r0 ?= 1trap.z r11LDI 1,r0 ; r0 = 1lsr 1,r0 ; r0 = 0, c = 1add.c 1,r0 ; r0 = 1cmp 1,r0trap.nz r11ldi 0x070eca6,r0ldi 0x0408b85,r1ldi 0x0387653,r2lsr 1,r0xor.c r1,r0cmp r2,r0trap.nz r11#endif#ifdef LOOP_TEST// Let's try a loop: for i=0; i<5; i++)// We'll use R0=i, Immediates for 5ldi $0x09000,r11clr r0for_loop:noopadd $1,r0cmp $5,r0blt for_loop//// Let's try a reverse loop. Such loops are usually cheaper to// implement, and this one is no different: 2 loop instructions// (minus setup instructions) vs 3 from before.// R0 = 5; (from before)// do {// } while (R0 > 0);ldi $0x0a000,r11bgt_loop:noopsub $1,r0bgt bgt_loop// How about the same thing with a >= comparison?// R1 = 5; // Need to do this explicitly// do {// } while(R1 >= 0);ldi $20,r0ldi $5,r1bge_loop:noopsub $1,r1bge bge_loop// Let's try the reverse loop again, only this time we'll store our// loop variable in memory.// R0 = 5; (from before)// do {// } while (R0 > 0);ldi $0x0b000,r11bra mem_loop_testloop_var:.dat 0mem_loop_test:mov loop_var(pc),r1ldi $5,r0clr r2sto r0,(r1)mem_loop:add $1,r2add $14,r0lod (r1),r0sub $1,r0sto r0,(r1)bgt mem_loopcmp $5,r2trap.ne r11#endif#ifdef SHIFT_TEST; Now, let's test whether or not our LSR and carry flags workldi $0x0c000,r11ldi -1,r0 ; First test: shifting all the way should yield zerolsr 32,r0cmp 0,r0bnz test_failureldi -1,r0 ; Second test: anything greater than zero should setlsr 0,r0 ; the carry flagbc test_failurelsr 1,r0tst sys.ccc,ccbz test_failurelsr 31,r0tst sys.ccc,ccbz test_failurelsr 1,r0bc test_failure; Now repeat the above tests, looking to see whether or not ASR worksldi -1,r0asr 32,r0cmp -1,r0bnz test_failureldi -1,r0asr 0,r0bc test_failurecmp -1,r0bnz test_failureasr 1,r0tst sys.ccc,r14bz test_failureasr 30,r0tst sys.ccc,r14bz test_failureldi -1,r0asr 1,r0cmp -1,r0bnz test_failure// Let's test whether LSL worksldi 0x035,r2lsl 8,r2ldi 0x03500,r1cmp r2,r1trap.ne r11ldi 0x074,r0and 0x0ff,r0or r0,r2cmp 0x03574,r2trap.ne r11#endif#ifdef MPY_TEST// We have two multiply instructions. Let's see if those workldi $0x0d000,r11 // Mark our testldi 23171,r0 // = sqrt(2)/2 * 32768mpyu r0,r0 // Should = 2/4 * 2^30 = 2^29 or thereaboutsldi 536895241,r2cmp r0,r2trap.ne r11ldi 0x0ffff,r0mpyu r0,r0ldi 0xfffe0001,r1cmp r1,r0trap.ne r11ldi 0x08001,r0ldi 0x07fff,r1mpys r0,r1 // FAILS: result is 0x008001 ??? (pipeline prob)ldi 0x3fff0001,r2neg r2cmp r2,r1 // @0x010011ctrap.ne r11 //TRAP FAILS TO TRIGGER ????? (R2=0x0c000ffff,R1=0x0008001 -- did mpy even happen?)mpys r0,r0 // FAILS: result is 0x40010001ldi 0x3fff0001,r2cmp r2,r0trap.ne r11 // TRAP FAILS TO TRIGGER AGAINldi 0x08000,r0mpys r0,r0 // R0 now equals 0x40000000ldi 0x40000000,r1cmp r0,r1trap.ne r11//// And from our eyeball test ...LDI 0x01ff01ff,R0MOV R0,R7MOV 8(SP),R6LSR 7,R0AND 7,R0LDI 7,R1SUB R0,R1MOV R1,R0MPYU 5,R0CMP 20,R0TRAP.NE R11#endif#ifdef PUSH_TESTldi $0x0e000,r11 // Mark our testldi 0x01248cab,r0ldi 0xd5312480,r1 // Let's see if we can preserve this as wellmov r1,r7FJSR(reverse_bit_order,R4); // *SP = 0x010013dcmp r0,r1trap.ne r11cmp r0,r7trap.ne r11#endif#ifdef PIPELINE_STACK_TESTldi $0x0f000,r11 // Mark our testLDI 1,R0MOV 1(R0),R1MOV 1(R1),R2MOV 1(R2),R3MOV 1(R3),R4MOV 1(R4),R5MOV 1(R5),R6FJSR(pipeline_stack_test,R7)CMP 1,R0trap.ne R11CMP 2,R1trap.ne R11CMP 3,R2trap.ne R11CMP 4,R3trap.ne R11CMP 5,R4trap.ne R11CMP 6,R5trap.ne R11CMP 7,R6trap.ne R11#endif#ifdef MEM_PIPELINE_TESTLDI 0x10000,R11FJSR(mem_pipeline_test,R0)#endif // MEM_PIPELINE_TEST#ifdef CONDITIONAL_EXECUTION_TESTLDI 0x11000,R11FJSR(conditional_execution_test,R0)#endif // CONDITIONAL_EXECUTION_TEST#ifdef NOWAIT_PIPELINE_TESTLDI 0x12000,R11FJSR(nowait_pipeline_test,R0)#endif // NOWAIT_PIPELINE_TEST#ifdef BCMEM_TESTLDI 0x13000,R11CLR R0LDI -1,R1STO R0,bcmemtestloc(PC)LOD bcmemtestloc(PC),R1CMP R0,R1TRAP.NZ R11CMP 0x13000,R11BZ bcmemtest_cmploc_1STO R11,bcmemtestloc(PC)bcmemtest_cmploc_1:LOD bcmemtestloc(PC),R0CMP R0,R11TRAP.Z R11CLR R0CMP R0,R11BZ bcmemtest_cmploc_2STO.NZ R11,bcmemtestloc(PC)bcmemtest_cmploc_2:NOOPLOD bcmemtestloc(PC),R0CMP R0,R11TRAP.NZ R11BRA end_bcmemtestbcmemtestloc:WORD 0end_bcmemtest:#endif#ifdef PIPELINE_MEMORY_RACE_CONDITIONSLDI 0x14000,R11FJSR(pipeline_memory_race_test,R0)#endif // PIPELINE_MEMORY_RACE_CONDITIONS// Return success / Test the trap interruptclr r11trap r11 // FAILS HERE FAILS FAILS FAILS !!!!!!!!!!!noopnoopbusy// And, in case we miss a halt ...halt// Now, let's test whether or not we can handle a subroutine#ifdef PUSH_TESTreverse_bit_order:SUB 3,SPSTO R1,(SP) ; R1 will be our loop counterSTO R2,1(SP) ; R2 will be our accumulator and eventual resultSTO R4,2(SP)LDI 32,R1CLR R2reverse_bit_order_loop:LSL 1,R2LSR 1,R0OR.C 1,R2SUB 1,R1BNZ reverse_bit_order_loopMOV R2,R0LOD (SP),R1LOD 1(SP),R2LOD 2(SP),R4ADD 3,SPJMP R4#endif; The pipeline stack test examines whether or not a series of memory commands; can be evaluated right after the other without problems. This depends upon; the calling routine to properly set up registers to be tested.;; This is also an incomplete test, as nothing is done to test how these; pipeline reads/writes are affected by condition codes.;#ifdef PIPELINE_STACK_TESTpipeline_stack_test:SUB 13,SPSTO R0,(SP)STO R1,1(SP)STO R2,2(SP)STO R3,3(SP)STO R4,4(SP)STO R5,5(SP)STO R6,6(SP)STO R7,7(SP)STO R8,8(SP)STO R9,9(SP)STO R10,10(SP)STO R11,11(SP)STO R12,12(SP)XOR -1,R0XOR -1,R1XOR -1,R2XOR -1,R3XOR -1,R4XOR -1,R5XOR -1,R6XOR -1,R7XOR -1,R8XOR -1,R9XOR -1,R10XOR -1,R11XOR -1,R12LOD (SP),R0LOD 1(SP),R1LOD 2(SP),R2LOD 3(SP),R3LOD 4(SP),R4LOD 5(SP),R5LOD 6(SP),R6LOD 7(SP),R7LOD 8(SP),R8LOD 9(SP),R9LOD 10(SP),R10LOD 11(SP),R11LOD 12(SP),R12ADD 13,SPJMP R7#endif // PIPELINE_STACK_TEST#ifdef MEM_PIPELINE_TESTmem_pipeline_test:SUB 4,SPSTO R0,(SP)STO R1,1(SP)LDI 0x10000,R11;; Test #1 ... Let's start by writing a value to memoryLDI -1,R0CLR R1STO R0,2(SP)LOD 2(SP),R1CMP R1,R0MOV.NZ R11,CC; Test #2, reading and then writing a value from memoryNOPNOPCLR R0CLR R1LOD 2(SP),R0 ; This should load back up our -1 valueSTO R0,3(SP); Insist that the pipeline clearLOD 2(SP),R0; Now let's try loading into R1NOPNOPNOPNOPLOD 3(SP),R1CMP R1,R0MOV.NZ R11,CCLOD (SP),R0LOD 1(SP),R1ADD 4,SPJMP R0#endif#ifdef CONDITIONAL_EXECUTION_TESTconditional_execution_test:SUB 1,SPSTO R0,(SP);CLRF R0ADD.Z 1,R0TRAP.NZ R11CMP.Z 0,R0TRAP.Z R11LOD (SP),R0ADD 1,SPJMP R0#endif;; Pipeline stalls have been hideous problems for me. The CPU has been modified; with special logic to keep stages from stalling. For the most part, this; means that ALU and memory results may be accessed either before or as they; are written to the register file. This set of code is designed to test; whether this bypass logic works.#ifdef NOWAIT_PIPELINE_TESTnowait_pipeline_test:; Allocate for us some number of registers;SUB 6,SP; Leave a spot open on the stack for a local variable,; kept in memory.STO R0,(SP)STO R1,1(SP)STO R2,2(SP)STO R3,3(SP)STO R4,4(SP);; Let's start with ALU-ALU testing; AA: result->input ACLR R0ADD 1,R0CMP 1,R0TRAP.NZ R11; AA: result->input BCLR R0CLR R1ADD 1,R0CMP R0,R1TRAP.Z R11; AA: result->input A on conditionCLRF R0ADD.Z 5,R0CMP 5,R0TRAP.NZ R11; AA: result->input B on conditionCLR R0CLRF R1ADD.Z 5,R0CMP R0,R1TRAP.Z R11; AA: result->input B plus offsetCLR R0CLRF R1ADD 5,R0CMP -5(R0),R1TRAP.NZ R11; AA: result->input B plus offset on conditionCLR R0CLRF R1ADD.Z 5,R0CMP -5(R0),R1TRAP.NZ R11;; Then we need to do ALU-Mem input testing;CLR R0STO R0,5(SP)LDI 8352,R0LOD 5(SP),R0TST -1,R0TRAP.NZ R11LDI 937,R0 ; Let's try again, this time something that'sSTO R0,5(SP) ; not zeroNOOPLOD 5(SP),R0CMP 938,R0 ; Let's not compare with self, let's thatTRAP.GE R11 ; masks a problem--compare with a differentCMP 936,R0 ; number instead.TRAP.LT R11; Mem output->ALU input testing; We just did that as partof our last test; Mem output->MEM input testing;LDI 5328,R2LOD 5(SP),R2STO R2,5(SP)LOD 5(SP),R1CMP 937,R1TRAP.NZ R11;LOD (SP),R0LOD 1(SP),R1LOD 2(SP),R2LOD 3(SP),R3LOD 4(SP),R4ADD 6,SPJMP R0#endif // NOWAIT_PIPELINE_TEST#ifdef PIPELINE_MEMORY_RACE_CONDITIONSpipeline_memory_race_test:SUB 3,SPSTO R0,(SP)STO R1,1(SP)STO R2,2(SP)MOV pipeline_memory_test_data(PC),R0LOD (R0),R0LOD (R0),R0CMP 275,R0MOV.NZ R11,CCMOV pipeline_memory_test_data(PC),R0; Here's the test sequenceLOD (R0),R1LOD 1(R0),R2STO R2,1(R1); Make sure we clear the load pipelineLOD (R0),R1; Load our written valueLOD 2(R0),R2CMP 275,R2MOV.NZ R11,CC;; Next failing sequence:; LOD -x(R12),R0; LOD y(R0),R0MOV pipeline_memory_test_data(PC),R0MOV 1(R0),R1STO R1,1(R0)LDI 3588,R2 ; Just some random valueSTO R2,2(R0)MOV R0,R1; Here's the test sequenceLOD (R0),R1LOD 1(R1),R1CMP R2,R1MOV.NZ R11,CCLOD (SP),R0LOD 1(SP),R1LOD 2(SP),R2ADD 3,SPJMP R0pipeline_memory_test_data:.dat __here__+0x0100000+1.dat 275.dat 0#endiffill 512,0stack: // Must point to a valid word initiallyword 0
