Commit 41d1d33d authored by Lauric Desauw's avatar Lauric Desauw
Browse files

Version 1 (successfull ? )

basic instruction except sqrt
normal float
parent 491a91fd
Pipeline #82154 passed with stages
in 28 minutes and 16 seconds
597 706 815 924
283 306 329 352
288 320 352 384
1858 2100 2342 2584
XLEN?=32
CCRV=/local/riscv/bin/riscv$(XLEN)-unknown-elf-gcc
CCRV=riscv$(XLEN)-unknown-elf-gcc
CCHOST=gcc
CFLAGS=-Wno-overflow
EXEC=matmul
......
......@@ -10,7 +10,7 @@ int main(void)
26,75,94,47
};
float B[16] = {1,2,3,4,
float B[16] = {1,2,3,4,
5,6,7,8,
9,10,11,12,
13,14,15,16
......@@ -18,10 +18,10 @@ int main(void)
float result[16];
int i;
int i=0;
int j;
int k;
int sum;
float sum;
for (i=0; i<4; i++)
{
......@@ -29,11 +29,11 @@ int main(void)
{
sum = 0;
for(k = 0; k<4; k++)
sum += A[(i<<2) + k] * B[(k<<2) + j];
sum += A[(i<<2) + k] * B[(k<<2) + j];
result[(i<<2) + j] = sum;
}
}
/*
for(i = 0; i < 4; ++i)
{
for(j = 0; j < 4; ++j)
......@@ -42,6 +42,6 @@ int main(void)
}
printf("\n");
}
*/
return 0;
}
25
40
89
266
323
462
568
602
907
893
2541
2669
3233
4267
4622
5681
6023
9073
XLEN?=32
CCRV=/local/riscv/bin/riscv$(XLEN)-unknown-elf-gcc
CCRV=riscv$(XLEN)-unknown-elf-gcc
CCHOST=gcc
CFLAGS=-Wno-overflow
EXEC=qsort
......
#include <stdio.h>
#include <string.h>
float A[10] = {89.53, 40.6, 323.63, 4267.65, 266.59, 25.451, 907.543, 602.543, 568.641, 462.2};
int A[10] = {893, 40, 3233, 4267, 2669, 2541, 9073, 6023, 5681, 4622};
int partition(int low, int hi)
{
float pivot = A[hi];
int pivot = A[hi];
int i = low-1,j;
float temp;
int temp;
for(j = low; j<hi; j++)
{
if(A[j] < pivot)
......@@ -43,7 +43,6 @@ int main()
qsort(0,10-1);
for(i = 0; i < 10; ++i)
{
printf("%f\n", A[i]);
printf("%d\n", A[i]);
}
return 0;
}
......@@ -2,7 +2,7 @@
SUBFOLDERS=$(ls -d */)
COMETSIM="../../build/bin/comet.sim"
TIMEOUT="300s"
TIMEOUT="30s"
for TEST in $SUBFOLDERS
do
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment