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

Subversion Repositories m1_core

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 38 to Rev 39
    Reverse comparison

Rev 38 → Rev 39

/trunk/tests/boot/boot.s
0,0 → 1,12
# Minimal SIMPLE boot code
 
.text
 
# Initialize Stack Pointer ($sp) to make the program fit into 4 KByte of memory space
addi $29,$0,0x1000
 
# Initialize Return Address ($ra) to jump to the "end-of-test" special address
lui $31,0xDEAD
ori $31,0xBEEF
 
# Continue to the main test
/trunk/tests/verif/nor.c
0,0 → 1,7
int main() {
int a = 1;
int b = 1;
int c = a+b;
asm("NOR $5, $2 , $3");
return 0;
}
/trunk/tests/verif/addi.c
0,0 → 1,7
int main() {
int a = 5; //r3
int b = 7;
int c = a+b; //r2
asm("ADDI $5 ,$3 , -5");
return 0;
}
/trunk/tests/verif/and.c
0,0 → 1,7
int main() {
int a = -5;
int b = 1;
int c = a+b;
asm("AND $5, $2 , $3");
return 0;
}
/trunk/tests/verif/sb.c
0,0 → 1,7
int main() {
int a = 5;
int b = 7;
int c = a+b;
asm("SB $3 , 7($30)");
return 0;
}
/trunk/tests/verif/bgezal.c
0,0 → 1,11
int main() {
int a = 7;
int b = -10; //r2
int c = a+b;
asm(" BGEZAL $3 , bravusi");
//asm("NOP \n NOP \n NOP \n BGEZAL $3 , ste");
asm("nop \n nop \n nop \n nop");
asm("bravusi:");
asm("andi $5 , $2 , 0");
return 0;
}
/trunk/tests/verif/bne.c
0,0 → 1,17
int main() {
int a = 7; //r3
int b =15;
int c = a+b; //r2
//asm("nop \n nop");
//asm("nop");
//asm("nop");
//asm("nop");
asm("BNE $6, $3 , gian");
// asm(".long 0x08000008");
asm("NOR $2, $2, $3");
asm("AND $7 , $2, $3");
asm("nop \n nop");
asm("gian:");
asm("ADDI $5 , $2 , 1");
return 0;
}
/trunk/tests/verif/bgtz.c
0,0 → 1,11
int main() {
int a = 7;
int b = 0;
int c = a+b;
asm(" BGTZ $3 , ste");
//asm("NOP \n NOP \n NOP \n BGTZ $3 , ste");
asm("nop \n nop ");
asm("ste:");
asm("andi $5 , $2 , 0");
return 0;
}
/trunk/tests/verif/divu.c
0,0 → 1,7
int main() {
int a = 7; //r3
int b = -42;
int c = a+b; //r2
asm("DIVU $2, $3");
return 0;
}
/trunk/tests/verif/xor.c
0,0 → 1,7
int main() {
int a = 1;
int b = 1;
int c = a+b;
asm("XOR $5, $2 , $3");
return 0;
}
/trunk/tests/verif/add.dump
0,0 → 1,32
 
add.bin: file format elf32-tradlittlemips
 
Disassembly of section .text:
 
00000000 <main-0x10>:
0: 23bd0400 addi sp,sp,1024
4: 3c1fdead lui ra,0xdead
8: 37ffbeef ori ra,ra,0xbeef
c: 00000000 nop
 
00000010 <main>:
10: 27bdffe0 addiu sp,sp,-32
14: afbe0018 sw s8,24(sp)
18: 03a0f021 move s8,sp
1c: 24020005 li v0,5
20: afc20010 sw v0,16(s8)
24: 24020007 li v0,7
28: afc2000c sw v0,12(s8)
2c: 8fc30010 lw v1,16(s8)
30: 8fc2000c lw v0,12(s8)
34: 00000000 nop
38: 00621021 addu v0,v1,v0
3c: afc20008 sw v0,8(s8)
40: 00001021 move v0,zero
44: 03c0e821 move sp,s8
48: 8fbe0018 lw s8,24(sp)
4c: 27bd0020 addiu sp,sp,32
50: 03e00008 jr ra
54: 00000000 nop
58: 00000000 nop
5c: 00000000 nop
/trunk/tests/verif/andi.c
0,0 → 1,7
int main() {
int a = -5; //r3
int b = 7;
int c = a+b; //r2
asm("ANDI $5 , $3 , 5");
return 0;
}
/trunk/tests/verif/bltz.c
0,0 → 1,11
int main() {
int a = -7;
int b = -10; //r2
int c = a+b;
asm(" BLTZ $3 , ste");
//asm("NOP \n NOP \n NOP \n BLTZ $2 , ste");
asm("nop \n nop ");
asm("ste:");
asm("andi $5 , $2 , 0");
return 0;
}
/trunk/tests/verif/or.c
0,0 → 1,7
int main() {
int a = 11;
int b = 6;
int c = a+b;
asm("OR $5, $2 , $3");
return 0;
}
/trunk/tests/verif/xori.c
0,0 → 1,7
int main() {
int a = -5; //r3
int b = 7;
int c = a+b;
asm("XORI $7 , $3 , 6");
return 0;
}
/trunk/tests/verif/sra.c
0,0 → 1,8
int main() {
int a = 5 ; //r3
int b = 7;
int c = a+b; //r2
asm("li $3 , 0b10000000000000000000000000000011");
asm("SRA $9 ,$3 , 7 ");
return 0;
}
/trunk/tests/verif/bgez.c
0,0 → 1,11
int main() {
int a = 7;
int b = -10; //r2
int c = a+b;
asm(" BGEZ $3 , ste");
//asm("NOP \n NOP \n NOP \n BGEZ $3 , ste");
asm("nop \n nop ");
asm("ste:");
asm("andi $5 , $2 , 0");
return 0;
}
/trunk/tests/verif/sll.c
0,0 → 1,7
int main() {
int a = -5; //r3
int b = 7;
int c = a+b; //r2
 
return 0;
}
/trunk/tests/verif/blez.c
0,0 → 1,12
int main() {
int a = -7;
int b = 7;
int c = a+b;
//asm("nop \n nop \n BLEZ $3 , vari");
//asm("NOP \n NOP \n NOP \n NOP \n BLEZ $3 , vari "); //caso funzionante
asm("BLEZ $3 , vari ");
asm("nop \n nop ");
asm("vari:");
asm("andi $5 , $2 , 0");
return 0;
}
/trunk/tests/verif/srl.c
0,0 → 1,7
int main() {
int a = 21 ; //r3
int b = 7;
int c = a+b; //r2
asm("SRL $9 ,$3 , 2 ");
return 0;
}
/trunk/tests/verif/sltiu.c
0,0 → 1,7
int main() {
int a = -6; //r3
int b = 7;
int c = a+b; //r2
asm("SLTIU $5 ,$3 , -5");
return 0;
}
/trunk/tests/verif/mthi.c
0,0 → 1,9
 
int main() {
int a = 5;
int b = 7;
int c = a+b;
asm("MTHI $2");
 
return 0;
}
/trunk/tests/verif/slt.c
0,0 → 1,7
int main() {
int a = -2; //r3
int b = 6;
int c = a+b; //r2
asm("SLT $5, $3 , $2");
return 0;
}
/trunk/tests/verif/jal.c
0,0 → 1,14
int main() {
int a = 5;
int b = 7;
int c = a+b;
asm(".long 0x0C000015");
asm("ANDI $5 , $3 , 1");
asm("NOP \n NOP \n NOP");
asm("pesciolino:");
asm("nop");
asm("addi $6 , $3 , 2");
asm("nop ");
asm("jr $31");
return 0;
}
/trunk/tests/verif/multu.c
0,0 → 1,7
int main() {
int a = 7;//r3
int b = -12;
int c= a+b;// r2
asm("MULTU $3,$2 \n ADD $7,$2,$3 ");
return 0;
}
/trunk/tests/verif/beq.c
0,0 → 1,11
int main() {
int a = 0; //r3
int b = 0;
int c = a+b; //r2
asm(" BEQ $3, $2, gravagno");
//asm(" BEQ $5, $6, gravagno");
asm("nop \n nop ");
asm("gravagno:");
asm("andi $5 , $2 , 0");
return 0;
}
/trunk/tests/verif/slti.c
0,0 → 1,7
int main() {
int a = -5; //r3
int b = 7;
int c = a+b; //r2
asm("SLTI $5 ,$3 , -6");
return 0;
}
/trunk/tests/verif/mtlo.c
0,0 → 1,7
int main() {
int a = 5;
int b = 7;
int c = a+b;
asm("MTLO $2");
return 0;
}
/trunk/tests/verif/subu.c
0,0 → 1,6
int main() {
int a = 5;
int b = 6;
int c = a-b;
return 0;
}
/trunk/tests/verif/mfHILO.c
0,0 → 1,10
int main() {
int a = 5;
int b = 7;
int c = a+b;
asm("MTLO $2");
asm("MTHI $3");
asm("MFHI $7");
asm("MFLO $6");
return 0;
}
/trunk/tests/verif/sllv.c
0,0 → 1,7
int main() {
int a = 1; //r3
int b = 32;
int c = a+b; //r2
asm("SLLV $5 ,$3 , $2");
return 0;
}
/trunk/tests/verif/mult.c
0,0 → 1,7
int main() {
int a = -5;
int b = 7;
int c = a+b;
asm("MULT $2 , $3 ");
return 0;
}
/trunk/tests/verif/div.c
0,0 → 1,7
int main() {
int a = 7; //r3
int b =-42;
int c = a+b; //r2
asm("DIV $2, $3");
return 0;
}
/trunk/tests/verif/andiprova.c
0,0 → 1,12
int main() {
int a = -5; //r3
int b = 7;
int d=0;
int c = a+b; //r2= 2
if(c<a)
d=0;
else
d=1;
//asm("ANDI $5 , $3 , 5");
return 0;
}
/trunk/tests/verif/addiu.c
0,0 → 1,7
int main() {
int a = -5; //r3
int b = 7;
int c = a+b; //r2
asm("ADDIU $5 ,$3 , -5");
return 0;
}
/trunk/tests/verif/sltu.c
0,0 → 1,7
int main() {
int a = -4; //r3
int b = 6;
int c = a+b; //r2
asm("SLTU $5, $3 , $2");
return 0;
}
/trunk/tests/verif/jalr.c
0,0 → 1,8
int main() {
int a = 10; //r3
int b = 10;
int c = a+b; //r2
//asm("jalr $6 , $2 ");
asm("jalr $2 ");
return 0;
}
/trunk/tests/verif/add.c
0,0 → 1,6
int main() {
int a = 5;
int b = 7;
int c = a+b;
return 0;
}
/trunk/tests/verif/j.c
0,0 → 1,11
int main() {
int a = 5; //r3
int b = 7;
int c = a+b;
asm(".long 0x08000013 "); // = j 4c ; 13 va shiftato a sinistra di 2 posizioni per ottenere 4c ; 0x08000013 = 0000_1000_0000_0000_0000_0000_0001_0011
asm("nop");
asm("MTHI $3");
asm("NOR $5, $2 ,$3");
asm("sotto:");
return 0;
}
/trunk/tests/verif/sub.c
0,0 → 1,7
int main() {
int a = 5;
int b = 6;
int c= a - b ;
asm("SUB $5, $2,$3");
return 0;
}
/trunk/tests/verif/add.hex
0,0 → 1,25
23bd0400
3c1fdead
37ffbeef
00000000
27bdffe0
afbe0018
03a0f021
24020005
afc20010
24020007
afc2000c
8fc30010
8fc2000c
00000000
00621021
afc20008
00001021
03c0e821
8fbe0018
27bd0020
03e00008
00000000
00000000
00000000
/trunk/tests/verif/mtHILO.c
0,0 → 1,8
int main() {
int a = 5;
int b = 7;
int c = a+b;
asm("MTLO $2");
asm("MTHI $3");
return 0;
}

powered by: WebSVN 2.1.0

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