Skip to content

Issue #193 Move portable code in port out of superh for use in riscv #194

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
8938229
Merge pull request #1 from physical-computation/master
JamesTimothyMeech Dec 16, 2020
3ed2479
Moved port to same level as superh and riscv
JamesTimothyMeech Dec 18, 2020
22ddf61
Delete sleep instruction specific to SuperH from misc.c
JamesTimothyMeech Dec 18, 2020
0d465a6
Virtual sensor example tested and working for superH
JamesTimothyMeech Dec 18, 2020
e7304bc
twoVirtualSensorExample working for SuperH
JamesTimothyMeech Dec 18, 2020
4cbc21f
Fixed Makefiles in swradio
JamesTimothyMeech Dec 18, 2020
93389cf
Fixed references to .h files in swradiolpf
JamesTimothyMeech Dec 18, 2020
0cb88d2
Fixed references to .h files in swradio-demod
JamesTimothyMeech Dec 18, 2020
11e52de
Fixed .h references in swradio-eq
JamesTimothyMeech Dec 18, 2020
ab2b439
Migrated swradio
JamesTimothyMeech Dec 18, 2020
c8db3f6
Fixed Schlieren after breaking by moving port
JamesTimothyMeech Dec 18, 2020
e5af37b
Fixed bubblesort after moving port
JamesTimothyMeech Dec 18, 2020
1b54b8a
Fixed ConvolutionFourierTransform after moving port
JamesTimothyMeech Dec 18, 2020
715ccff
Fixed fftw after moving port
JamesTimothyMeech Dec 18, 2020
e149a6c
Fixed findTheBugExample after moving port
JamesTimothyMeech Dec 18, 2020
9573721
Fixed FourierTransform after moving port
JamesTimothyMeech Dec 18, 2020
31c7d3b
Fixed interruptExample after moving port
JamesTimothyMeech Dec 18, 2020
7ae9418
Fixed pedometerExample after moving port
JamesTimothyMeech Dec 18, 2020
dc3b306
Fixed lowPassFilter after moving port
JamesTimothyMeech Dec 18, 2020
317c550
DAM+S-MAC+EAR working
JamesTimothyMeech Dec 21, 2020
7b102bc
DAM+S-MAC working
JamesTimothyMeech Dec 21, 2020
78ef52b
Fixed DAM+idealHWMAC+EAR
JamesTimothyMeech Dec 21, 2020
da71cc4
Fixed S-MAC
JamesTimothyMeech Dec 21, 2020
3d0578c
Edited some things in PARC-damv2.c
JamesTimothyMeech Dec 21, 2020
cf18b84
Fixed PARC-damv2
JamesTimothyMeech Dec 22, 2020
7a2f4f1
DAM+Sift working after moving port
JamesTimothyMeech Dec 22, 2020
c7b868c
DAM+Sift+EAR fixed after moving port
JamesTimothyMeech Dec 22, 2020
9194490
Last few fixes for superH after moving port
JamesTimothyMeech Dec 22, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -40,17 +40,6 @@ xudelay(ulong usecs)
}
}

void
xusleep(ulong usecs)
{
ulong time = devrtc_getusecs();

while ((devrtc_getusecs() - time) < usecs)
{
sleep();
}
}

int
pow10(int y)
{
Original file line number Diff line number Diff line change
@@ -3,5 +3,4 @@

void xudelay(ulong);
int pow10(int y);
extern void sleep(void);
void xusleep(ulong);

15 changes: 15 additions & 0 deletions benchmarks/source/port/superHspecific.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#include "e-types.h"
#include "sh7708.h"
#include "devrtc.h"
#include "misc.h"

void
xusleep(ulong usecs)
{
ulong time = devrtc_getusecs();

while ((devrtc_getusecs() - time) < usecs)
{
sleep();
}
}
2 changes: 2 additions & 0 deletions benchmarks/source/port/superHspecific.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
extern void sleep(void);
void xusleep(ulong);
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ TARGET-ARCH = sh-elf

PROGRAM = virtualSensorExample

PORT = ../port
PORT = ../../port
LIBOS = mOS
TOOLSLIB = $(TREEROOT)/tools/tools-lib
INCLUDES = -I../port/ -I$(TREEROOT)/sys/include -I$(TREEROOT)/sys/kern/superH -I$(TREEROOT)/benchmarks/include -I$(TREEROOT)/sys/libOS/port
Original file line number Diff line number Diff line change
@@ -8,12 +8,12 @@
#include "devsim7708.h"
#include "sh7708.h"
#include "devscc.h"
#include "devrtc.h"
#include "devexcp.h"
#include "devlog.h"
#include "devloc.h"
#include "devsensor.h"
#include "misc.h"
#include "../../port/devrtc.h"
#include "../../port/devexcp.h"
#include "../../port/devlog.h"
#include "../../port/devloc.h"
#include "../../port/devsensor.h"
#include "../../port/misc.h"
#include "print.h"
#include <math.h>
#include <complex.h>
2 changes: 1 addition & 1 deletion benchmarks/source/superh/FourierTransform/Makefile
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ TARGET-ARCH = sh-elf

PROGRAM = virtualSensorExample

PORT = ../port
PORT = ../../port
LIBOS = mOS
TOOLSLIB = $(TREEROOT)/tools/tools-lib
INCLUDES = -I../port/ -I$(TREEROOT)/sys/include -I$(TREEROOT)/sys/kern/superH -I$(TREEROOT)/benchmarks/include -I$(TREEROOT)/sys/libOS/port
12 changes: 6 additions & 6 deletions benchmarks/source/superh/FourierTransform/virtualSensorExample.c
Original file line number Diff line number Diff line change
@@ -8,12 +8,12 @@
#include "devsim7708.h"
#include "sh7708.h"
#include "devscc.h"
#include "devrtc.h"
#include "devexcp.h"
#include "devlog.h"
#include "devloc.h"
#include "devsensor.h"
#include "misc.h"
#include "../../port/devrtc.h"
#include "../../port/devexcp.h"
#include "../../port/devlog.h"
#include "../../port/devloc.h"
#include "../../port/devsensor.h"
#include "../../port/misc.h"
#include "print.h"
#include <math.h>
#include <complex.h>
2 changes: 1 addition & 1 deletion benchmarks/source/superh/Schlieren/Makefile
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ TARGET-ARCH = sh-elf

PROGRAM = virtualSensorExample

PORT = ../port
PORT = ../../port
LIBOS = mOS
TOOLSLIB = $(TREEROOT)/tools/tools-lib
INCLUDES = -I../port/ -I$(TREEROOT)/sys/include -I$(TREEROOT)/sys/kern/superH -I$(TREEROOT)/benchmarks/include -I$(TREEROOT)/sys/libOS/port
12 changes: 6 additions & 6 deletions benchmarks/source/superh/Schlieren/virtualSensorExample.c
Original file line number Diff line number Diff line change
@@ -8,12 +8,12 @@
#include "devsim7708.h"
#include "sh7708.h"
#include "devscc.h"
#include "devrtc.h"
#include "devexcp.h"
#include "devlog.h"
#include "devloc.h"
#include "devsensor.h"
#include "misc.h"
#include "../../port/devrtc.h"
#include "../../port/devexcp.h"
#include "../../port/devlog.h"
#include "../../port/devloc.h"
#include "../../port/devsensor.h"
#include "../../port/misc.h"
#include "print.h"

float
10 changes: 5 additions & 5 deletions benchmarks/source/superh/bubblesort/Makefile
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ TARGET-ARCH = sh-elf
PROGRAM = bsort
LIBOS = eOS

PORT = ../port
PORT = ../../port
LIBOS = eOS
TOOLSLIB = $(TREEROOT)/tools/tools-lib
INCLUDES = -I../port/ -I$(TREEROOT)/sys/include -I$(TREEROOT)/sys/kern/superH -I$(TREEROOT)/benchmarks/include -I$(TREEROOT)/sys/libOS/port
@@ -36,11 +36,11 @@ $(PROGRAM).sr:$(PROGRAM)
$(PROGRAM).o: $(PROGRAM).c $(PROGRAM)-input.h Makefile
$(CC) $(CFLAGS) $(OPTFLAGS) $(INCLUDES) -c $(PROGRAM).c

misc.o: ../port/misc.c Makefile
$(CC) $(CFLAGS) $(OPTFLAGS) $(INCLUDES) -c ../port/misc.c
misc.o: ../../port/misc.c Makefile
$(CC) $(CFLAGS) $(OPTFLAGS) $(INCLUDES) -c ../../port/misc.c

devrtc.o: ../port/devrtc.c Makefile
$(CC) $(CFLAGS) $(WFLAGS) $(INCLUDES) -c ../port/devrtc.c
devrtc.o: ../../port/devrtc.c Makefile
$(CC) $(CFLAGS) $(WFLAGS) $(INCLUDES) -c ../../port/devrtc.c

init.o: init.S
$(CPP) init.S > init.i; $(AS) init.i -o $@
2 changes: 1 addition & 1 deletion benchmarks/source/superh/fftw-3.3alpha1/tests/Makefile
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ INCLUDEDIR = $(TREEROOT)/sys/include
INCLUDES = -I$(INCLUDEDIR) -I. -I../ -I../api -I../dft -I../rdft -I../libbench2 -I../kernel -I../../port -I$(TREEROOT)/sys/libOS/port -I$(TREEROOT)/sys/kern/superH -I$(TREEROOT)/sim
CFLAGS = -nostdlib -fno-builtin $(TARGET-ARCH-FLAGS) -Wall
LDFLAGS = -Ttext $(LOADADDR) -TsuperH.ld -L$(TREEROOT)/tools/tools-lib/superH -L$(TREEROOT)/sys/libOS/eOS -L$(TREEROOT)/benchmarks/source/libsfpthread -L../ -Map $(PROGRAM).map
PORT = ../../port
PORT = ../../../port
OPTFLAGS = -gstabs3 -O0
LOADADDR = 0x08004000

2 changes: 1 addition & 1 deletion benchmarks/source/superh/findTheBugExample/Makefile
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ TARGET-ARCH = sh-elf
PROGRAM = findTheBugExample
LIBOS = mOS

PORT = ../port
PORT = ../../port
SIMDIR = $(TREEROOT)/sim
TOOLSLIB = $(TREEROOT)/tools/tools-lib
INCLUDES = -I$(MACPATH) -I$(PORT) -I$(TREEROOT)/sys/include -I$(TREEROOT)/sys/kern/superH -I$(SIMDIR) -I$(TREEROOT)/sys/libOS/port
2 changes: 1 addition & 1 deletion benchmarks/source/superh/interruptExample/Makefile
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ TARGET-ARCH = sh-elf
PROGRAM = interruptExample
LIBOS = eOS

PORT = ../port
PORT = ../../port
SIMDIR = $(TREEROOT)/sim
TOOLSLIB = $(TREEROOT)/tools/tools-lib
INCLUDES = -I$(MACPATH) -I$(PORT) -I$(TREEROOT)/sys/include -I$(TREEROOT)/sys/kern/superH -I$(SIMDIR) -I$(TREEROOT)/sys/libOS/port
2 changes: 1 addition & 1 deletion benchmarks/source/superh/lowPassFilter/Makefile
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ TARGET-ARCH = sh-elf

PROGRAM = virtualSensorExample

PORT = ../port
PORT = ../../port
LIBOS = mOS
TOOLSLIB = $(TREEROOT)/tools/tools-lib
INCLUDES = -I../port/ -I$(TREEROOT)/sys/include -I$(TREEROOT)/sys/kern/superH -I$(TREEROOT)/benchmarks/include -I$(TREEROOT)/sys/libOS/port
12 changes: 6 additions & 6 deletions benchmarks/source/superh/lowPassFilter/virtualSensorExample.c
Original file line number Diff line number Diff line change
@@ -8,12 +8,12 @@
#include "devsim7708.h"
#include "sh7708.h"
#include "devscc.h"
#include "devrtc.h"
#include "devexcp.h"
#include "devlog.h"
#include "devloc.h"
#include "devsensor.h"
#include "misc.h"
#include "../../port/devrtc.h"
#include "../../port/devexcp.h"
#include "../../port/devlog.h"
#include "../../port/devloc.h"
#include "../../port/devsensor.h"
#include "../../port/misc.h"
#include "print.h"

/*
2 changes: 1 addition & 1 deletion benchmarks/source/superh/pedometerExample/Makefile
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ TARGET-ARCH = sh-elf

PROGRAM = virtualSensorExample

PORT = ../port
PORT = ../../port
LIBOS = mOS
TOOLSLIB = $(TREEROOT)/tools/tools-lib
INCLUDES = -I../port/ -I$(TREEROOT)/sys/include -I$(TREEROOT)/sys/kern/superH -I$(TREEROOT)/benchmarks/include -I$(TREEROOT)/sys/libOS/port
12 changes: 6 additions & 6 deletions benchmarks/source/superh/pedometerExample/virtualSensorExample.c
Original file line number Diff line number Diff line change
@@ -12,12 +12,12 @@
#include "devsim7708.h"
#include "sh7708.h"
#include "devscc.h"
#include "devrtc.h"
#include "devexcp.h"
#include "devlog.h"
#include "devloc.h"
#include "devsensor.h"
#include "misc.h"
#include "../../port/devrtc.h"
#include "../../port/devexcp.h"
#include "../../port/devlog.h"
#include "../../port/devloc.h"
#include "../../port/devsensor.h"
#include "../../port/misc.h"
#include "print.h"

enum samples {numberOfSamples = 400};
7 changes: 6 additions & 1 deletion benchmarks/source/superh/sbench/DAM+S-MAC+EAR/Makefile
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@ MACPATH = ../S-MAC

LIBOS = eOS

PORT = ../../port
PORT = ../../../port
LIBOS = eOS
SIMDIR = $(TREEROOT)/sim
TOOLSLIB = $(TREEROOT)/tools/tools-lib
@@ -36,6 +36,7 @@ NODEOBJS =\
devloc.o\
devnet.o\
devmac.o\
superHspecific.o\
$(MAC).o\
$(ROUTE).o\
$(PROGRAM).o\
@@ -50,6 +51,7 @@ SINKOBJS =\
devloc.o\
devnet.o\
devmac.o\
superHspecific.o\
$(MAC).o\
$(ROUTE).o\
$(SINK).o\
@@ -111,6 +113,9 @@ devloc.o: $(PORT)/devloc.c Makefile
misc.o: $(PORT)/misc.c Makefile
$(CC) $(CFLAGS) $(OPTFLAGS) $(INCLUDES) -c $(PORT)/misc.c

superHspecific.o: $(PORT)/superHspecific.c Makefile
$(CC) $(CFLAGS) $(OPTFLAGS) $(INCLUDES) -c $(PORT)/superHspecific.c

init.o: init.S
$(CPP) init.S > init.i; $(AS) init.i -o $@

19 changes: 10 additions & 9 deletions benchmarks/source/superh/sbench/DAM+S-MAC+EAR/sink.c
Original file line number Diff line number Diff line change
@@ -11,15 +11,16 @@
#include "devsim7708.h"
#include "sh7708.h"
#include "devscc.h"
#include "devnet.h"
#include "devmac.h"
#include "devrtc.h"
#include "devexcp.h"
#include "devlog.h"
#include "devloc.h"
#include "devrand.h"
#include "devsensor.h"
#include "misc.h"
#include "../../../port/devnet.h"
#include "../../../port/devmac.h"
#include "../../../port/devrtc.h"
#include "../../../port/devexcp.h"
#include "../../../port/devlog.h"
#include "../../../port/devloc.h"
#include "../../../port/devrand.h"
#include "../../../port/devsensor.h"
#include "../../../port/misc.h"
#include "../../../port/superHspecific.h"
#include "fault.h"
#include "physics.h"
#include "interrupts-hitachi-sh.h"
6 changes: 5 additions & 1 deletion benchmarks/source/superh/sbench/DAM+S-MAC/Makefile
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ PROGRAM = damv2
MAC = s-mac
MACPATH = ../S-MAC

PORT = ../../port
PORT = ../../../port
LIBOS = eOS
SIMDIR = $(TREEROOT)/sim
TOOLSLIB = $(TREEROOT)/tools/tools-lib
@@ -28,6 +28,7 @@ OBJS =\
devsensor.o\
devloc.o\
devmac.o\
superHspecific.o\
$(MAC).o\
$(PROGRAM).o\

@@ -73,6 +74,9 @@ devloc.o: $(PORT)/devloc.c Makefile
misc.o: $(PORT)/misc.c Makefile
$(CC) $(CFLAGS) $(OPTFLAGS) $(INCLUDES) -c $(PORT)/misc.c

superHspecific.o: $(PORT)/superHspecific.c Makefile
$(CC) $(CFLAGS) $(OPTFLAGS) $(INCLUDES) -c $(PORT)/superHspecific.c

init.o: init.S
$(CPP) init.S > init.i; $(AS) init.i -o $@

17 changes: 9 additions & 8 deletions benchmarks/source/superh/sbench/DAM+S-MAC/damv2.c
Original file line number Diff line number Diff line change
@@ -23,14 +23,15 @@
#include "devsim7708.h"
#include "sh7708.h"
#include "devscc.h"
#include "devnet.h"
#include "devmac.h"
#include "devrtc.h"
#include "devexcp.h"
#include "devlog.h"
#include "devloc.h"
#include "devsensor.h"
#include "misc.h"
#include "../../../port/devnet.h"
#include "../../../port/devmac.h"
#include "../../../port/devrtc.h"
#include "../../../port/devexcp.h"
#include "../../../port/devlog.h"
#include "../../../port/devloc.h"
#include "../../../port/devsensor.h"
#include "../../../port/misc.h"
#include "../../../port/superHspecific.h"
#include "fault.h"
#include "physics.h"
#include "interrupts-hitachi-sh.h"
6 changes: 5 additions & 1 deletion benchmarks/source/superh/sbench/DAM+Sift+EAR/Makefile
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@ MACPATH = ../Sift-MAC

LIBOS = eOS

PORT = ../../port
PORT = ../../../port
LIBOS = eOS
SIMDIR = $(TREEROOT)/sim
TOOLSLIB = $(TREEROOT)/tools/tools-lib
@@ -36,6 +36,7 @@ NODEOBJS =\
devloc.o\
devnet.o\
devmac.o\
superHspecific.o\
$(MAC).o\
$(ROUTE).o\
$(PROGRAM).o\
@@ -111,6 +112,9 @@ devloc.o: $(PORT)/devloc.c Makefile
misc.o: $(PORT)/misc.c Makefile
$(CC) $(CFLAGS) $(OPTFLAGS) $(INCLUDES) -c $(PORT)/misc.c

superHspecific.o: $(PORT)/superHspecific.c Makefile
$(CC) $(CFLAGS) $(OPTFLAGS) $(INCLUDES) -c $(PORT)/superHspecific.c

init.o: init.S
$(CPP) init.S > init.i; $(AS) init.i -o $@

Loading