Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
  • 2 commits
  • 3 files changed
  • 0 comments
  • 1 contributor
2  software/libcompiler-rt/Makefile
@@ -5,7 +5,7 @@ CFLAGS+=-D_YUGA_LITTLE_ENDIAN=0 -D_YUGA_BIG_ENDIAN=1 -Wno-missing-prototypes
5 5
 
6 6
 OBJECTS=divsi3.o modsi3.o comparedf2.o negsf2.o negdf2.o addsf3.o subsf3.o mulsf3.o divsf3.o lshrdi3.o muldi3.o divdi3.o ashldi3.o ashrdi3.o udivmoddi4.o \
7 7
   floatsisf.o floatunsisf.o fixsfsi.o fixunssfsi.o adddf3.o subdf3.o muldf3.o divdf3.o floatsidf.o floatunsidf.o floatdidf.o fixdfsi.o fixunsdfsi.o \
8  
-  clzsi2.o ctzsi2.o
  8
+  clzsi2.o ctzsi2.o udivdi3.o
9 9
 
10 10
 all: libcompiler-rt.a
11 11
 
38  software/memtest/main.c
@@ -26,6 +26,38 @@ static void membw_service(void)
26 26
 	}
27 27
 }
28 28
 
  29
+static void memtest_service(void)
  30
+{
  31
+	static unsigned int test_buffer[64*1024*1024/4] __attribute__((aligned(16)));
  32
+	static unsigned char reading;
  33
+	//int i;
  34
+
  35
+	if(reading) {
  36
+		if(!memtest_w_busy_read()) {
  37
+			//printf("starting read\n");
  38
+			/*for(i=0;i<64;i++) {
  39
+				printf("%08x", test_buffer[i]);
  40
+				if((i % 4) == 3)
  41
+					printf("\n");
  42
+			}*/
  43
+			memtest_r_reset_write(1);
  44
+			memtest_r_base_write((unsigned int)test_buffer);
  45
+			memtest_r_length_write(sizeof(test_buffer));
  46
+			memtest_r_shoot_write(1);
  47
+			reading = 0;
  48
+		}
  49
+	} else {
  50
+		if(!memtest_r_busy_read()) {
  51
+			printf("err=%d\n", memtest_r_error_count_read());
  52
+			memtest_w_reset_write(1);
  53
+			memtest_w_base_write((unsigned int)test_buffer);
  54
+			memtest_w_length_write(sizeof(test_buffer));
  55
+			memtest_w_shoot_write(1);
  56
+			reading = 1;
  57
+		}
  58
+	}
  59
+}
  60
+
29 61
 int main(void)
30 62
 {
31 63
 	irq_setmask(0);
@@ -33,10 +65,16 @@ int main(void)
33 65
 	uart_init();
34 66
 	
35 67
 	puts("Memory testing software built "__DATE__" "__TIME__"\n");
  68
+
  69
+	if((memtest_w_magic_read() != 0x361f) || (memtest_r_magic_read() != 0x361f)) {
  70
+		printf("Memory test cores not detected\n");
  71
+		while(1);
  72
+	}
36 73
 	
37 74
 	time_init();
38 75
 
39 76
 	while(1) {
  77
+		memtest_service();
40 78
 		membw_service();
41 79
 	}
42 80
 	
6  software/videomixer/main.c
@@ -102,9 +102,9 @@ static void membw_service(void)
102 102
 		nr = lasmicon_bandwidth_nreads_read();
103 103
 		nw = lasmicon_bandwidth_nwrites_read();
104 104
 		f = identifier_frequency_read();
105  
-		rdb = nr*f >> (24 - 7);
106  
-		wrb = nw*f >> (24 - 7);
107  
-		printf("read:%4dMbps  write:%4dMbps  all:%4dMbps\n", rdb/1000000, wrb/1000000, (rdb + wrb)/1000000);
  105
+		rdb = (nr*f >> (24 - 7))/1000000ULL;
  106
+		wrb = (nw*f >> (24 - 7))/1000000ULL;
  107
+		printf("read:%5dMbps  write:%5dMbps  all:%5dMbps\n", rdb, wrb, rdb + wrb);
108 108
 	}
109 109
 }
110 110
 

No commit comments for this range

Something went wrong with that request. Please try again.