Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: m-labs/misoc
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 9ab22fe3b179
Choose a base ref
...
head repository: m-labs/misoc
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 2f662bf8ab64
Choose a head ref
  • 2 commits
  • 3 files changed
  • 1 contributor

Commits on Jul 13, 2013

  1. software/memtest: basic test

    Sebastien Bourdeauducq committed Jul 13, 2013
    Copy the full SHA
    f3e07db View commit details

Commits on Jul 14, 2013

  1. software/videomixer: fix overflow in memory bandwidth computation

    Sebastien Bourdeauducq committed Jul 14, 2013
    Copy the full SHA
    2f662bf View commit details
Showing with 42 additions and 4 deletions.
  1. +1 −1 software/libcompiler-rt/Makefile
  2. +38 −0 software/memtest/main.c
  3. +3 −3 software/videomixer/main.c
2 changes: 1 addition & 1 deletion software/libcompiler-rt/Makefile
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ CFLAGS+=-D_YUGA_LITTLE_ENDIAN=0 -D_YUGA_BIG_ENDIAN=1 -Wno-missing-prototypes

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 \
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 \
clzsi2.o ctzsi2.o
clzsi2.o ctzsi2.o udivdi3.o

all: libcompiler-rt.a

38 changes: 38 additions & 0 deletions software/memtest/main.c
Original file line number Diff line number Diff line change
@@ -26,17 +26,55 @@ static void membw_service(void)
}
}

static void memtest_service(void)
{
static unsigned int test_buffer[64*1024*1024/4] __attribute__((aligned(16)));
static unsigned char reading;
//int i;

if(reading) {
if(!memtest_w_busy_read()) {
//printf("starting read\n");
/*for(i=0;i<64;i++) {
printf("%08x", test_buffer[i]);
if((i % 4) == 3)
printf("\n");
}*/
memtest_r_reset_write(1);
memtest_r_base_write((unsigned int)test_buffer);
memtest_r_length_write(sizeof(test_buffer));
memtest_r_shoot_write(1);
reading = 0;
}
} else {
if(!memtest_r_busy_read()) {
printf("err=%d\n", memtest_r_error_count_read());
memtest_w_reset_write(1);
memtest_w_base_write((unsigned int)test_buffer);
memtest_w_length_write(sizeof(test_buffer));
memtest_w_shoot_write(1);
reading = 1;
}
}
}

int main(void)
{
irq_setmask(0);
irq_setie(1);
uart_init();

puts("Memory testing software built "__DATE__" "__TIME__"\n");

if((memtest_w_magic_read() != 0x361f) || (memtest_r_magic_read() != 0x361f)) {
printf("Memory test cores not detected\n");
while(1);
}

time_init();

while(1) {
memtest_service();
membw_service();
}

6 changes: 3 additions & 3 deletions software/videomixer/main.c
Original file line number Diff line number Diff line change
@@ -102,9 +102,9 @@ static void membw_service(void)
nr = lasmicon_bandwidth_nreads_read();
nw = lasmicon_bandwidth_nwrites_read();
f = identifier_frequency_read();
rdb = nr*f >> (24 - 7);
wrb = nw*f >> (24 - 7);
printf("read:%4dMbps write:%4dMbps all:%4dMbps\n", rdb/1000000, wrb/1000000, (rdb + wrb)/1000000);
rdb = (nr*f >> (24 - 7))/1000000ULL;
wrb = (nw*f >> (24 - 7))/1000000ULL;
printf("read:%5dMbps write:%5dMbps all:%5dMbps\n", rdb, wrb, rdb + wrb);
}
}