From 3ed247900e6b0ece94cad4673d218b1f496b90dc Mon Sep 17 00:00:00 2001 From: JamesTimothyMeech Date: Fri, 18 Dec 2020 16:21:50 +0000 Subject: [PATCH 01/27] Moved port to same level as superh and riscv --- benchmarks/source/port/devexcp.c | 9 + benchmarks/source/port/devexcp.h | 1 + benchmarks/source/port/devloc.c | 82 ++++++++ benchmarks/source/port/devloc.h | 5 + benchmarks/source/port/devlog.c | 30 +++ benchmarks/source/port/devlog.h | 1 + benchmarks/source/port/devmac.c | 268 ++++++++++++++++++++++++ benchmarks/source/port/devmac.h | 13 ++ benchmarks/source/port/devnet.c | 250 ++++++++++++++++++++++ benchmarks/source/port/devnet.h | 11 + benchmarks/source/port/devrand.c | 23 ++ benchmarks/source/port/devrand.h | 2 + benchmarks/source/port/devrtc.c | 16 ++ benchmarks/source/port/devrtc.h | 1 + benchmarks/source/port/devsensor.c | 18 ++ benchmarks/source/port/devsensor.h | 2 + benchmarks/source/port/logmarkers.h | 4 + benchmarks/source/port/misc.c | 65 ++++++ benchmarks/source/port/misc.h | 6 + benchmarks/source/port/superHspecific.c | 17 ++ benchmarks/source/port/superHspecific.h | 2 + 21 files changed, 826 insertions(+) create mode 100644 benchmarks/source/port/devexcp.c create mode 100644 benchmarks/source/port/devexcp.h create mode 100644 benchmarks/source/port/devloc.c create mode 100644 benchmarks/source/port/devloc.h create mode 100755 benchmarks/source/port/devlog.c create mode 100755 benchmarks/source/port/devlog.h create mode 100644 benchmarks/source/port/devmac.c create mode 100644 benchmarks/source/port/devmac.h create mode 100644 benchmarks/source/port/devnet.c create mode 100644 benchmarks/source/port/devnet.h create mode 100644 benchmarks/source/port/devrand.c create mode 100644 benchmarks/source/port/devrand.h create mode 100644 benchmarks/source/port/devrtc.c create mode 100644 benchmarks/source/port/devrtc.h create mode 100644 benchmarks/source/port/devsensor.c create mode 100644 benchmarks/source/port/devsensor.h create mode 100644 benchmarks/source/port/logmarkers.h create mode 100644 benchmarks/source/port/misc.c create mode 100644 benchmarks/source/port/misc.h create mode 100644 benchmarks/source/port/superHspecific.c create mode 100644 benchmarks/source/port/superHspecific.h diff --git a/benchmarks/source/port/devexcp.c b/benchmarks/source/port/devexcp.c new file mode 100644 index 00000000..4f03eb95 --- /dev/null +++ b/benchmarks/source/port/devexcp.c @@ -0,0 +1,9 @@ +#include +#include "sf-types.h" +#include "sh7708.h" + +ulong +devexcp_getintevt(void) +{ + return *(EXCP_INTEVT); +} diff --git a/benchmarks/source/port/devexcp.h b/benchmarks/source/port/devexcp.h new file mode 100644 index 00000000..545fe84c --- /dev/null +++ b/benchmarks/source/port/devexcp.h @@ -0,0 +1 @@ +ulong devexcp_getintevt(void); diff --git a/benchmarks/source/port/devloc.c b/benchmarks/source/port/devloc.c new file mode 100644 index 00000000..e162856e --- /dev/null +++ b/benchmarks/source/port/devloc.c @@ -0,0 +1,82 @@ +#include +#include "sf-types.h" +#include "tag.h" +#include "devsim7708.h" +#include "sh7708.h" + +int +devloc_getorbit(void) +{ + int orbit = 0; + + ((uchar *)&orbit)[3] = *(ORBIT+0); + ((uchar *)&orbit)[2] = *(ORBIT+1); + ((uchar *)&orbit)[1] = *(ORBIT+2); + ((uchar *)&orbit)[0] = *(ORBIT+3); + + return orbit; +} + +int +devloc_getvelocity(void) +{ + int velocity = 0; + + ((uchar *)&velocity)[3] = *(VELOCITY+0); + ((uchar *)&velocity)[2] = *(VELOCITY+1); + ((uchar *)&velocity)[1] = *(VELOCITY+2); + ((uchar *)&velocity)[0] = *(VELOCITY+3); + + return velocity; +} + +double +devloc_getxloc(void) +{ + double xloc = 0.0; + + ((uchar *)&xloc)[7] = *(XLOC+0); + ((uchar *)&xloc)[6] = *(XLOC+1); + ((uchar *)&xloc)[5] = *(XLOC+2); + ((uchar *)&xloc)[4] = *(XLOC+3); + ((uchar *)&xloc)[3] = *(XLOC+4); + ((uchar *)&xloc)[2] = *(XLOC+5); + ((uchar *)&xloc)[1] = *(XLOC+6); + ((uchar *)&xloc)[0] = *(XLOC+7); + + return xloc; +} + +double +devloc_getyloc(void) +{ + double yloc = 0.0; + + ((uchar *)&yloc)[7] = *(YLOC+0); + ((uchar *)&yloc)[6] = *(YLOC+1); + ((uchar *)&yloc)[5] = *(YLOC+2); + ((uchar *)&yloc)[4] = *(YLOC+3); + ((uchar *)&yloc)[3] = *(YLOC+4); + ((uchar *)&yloc)[2] = *(YLOC+5); + ((uchar *)&yloc)[1] = *(YLOC+6); + ((uchar *)&yloc)[0] = *(YLOC+7); + + return yloc; +} + +double +devloc_getzloc(void) +{ + double zloc = 0.0; + + ((uchar *)&zloc)[7] = *(ZLOC+0); + ((uchar *)&zloc)[6] = *(ZLOC+1); + ((uchar *)&zloc)[5] = *(ZLOC+2); + ((uchar *)&zloc)[4] = *(ZLOC+3); + ((uchar *)&zloc)[3] = *(ZLOC+4); + ((uchar *)&zloc)[2] = *(ZLOC+5); + ((uchar *)&zloc)[1] = *(ZLOC+6); + ((uchar *)&zloc)[0] = *(ZLOC+7); + + return zloc; +} diff --git a/benchmarks/source/port/devloc.h b/benchmarks/source/port/devloc.h new file mode 100644 index 00000000..e49ef9a7 --- /dev/null +++ b/benchmarks/source/port/devloc.h @@ -0,0 +1,5 @@ +int devloc_getorbit(void); +int devloc_getvelocity(void); +double devloc_getxloc(void); +double devloc_getyloc(void); +double devloc_getzloc(void); diff --git a/benchmarks/source/port/devlog.c b/benchmarks/source/port/devlog.c new file mode 100755 index 00000000..dd126609 --- /dev/null +++ b/benchmarks/source/port/devlog.c @@ -0,0 +1,30 @@ +#include "e-types.h" +#include "tag.h" +#include "devsim7708.h" +#include "sh7708.h" + +/* */ +/* Simulator control */ +/* */ +#define SIMCMD_DATA ((volatile unsigned char *) SUPERH_SIMCMD_DATA) +#define SIMCMD_CTL ((volatile unsigned char *) SUPERH_SIMCMD_CTL) + +void +devlog_ctl(uchar *cmd) +{ + int i, cmdlen; + + cmdlen = strlen(cmd); + for (i = 0; i < cmdlen; i++) + { + *SIMCMD_DATA = *(cmd + i); + + if (*(cmd + i) == '\n') + { + break; + } + } + *SIMCMD_CTL = 0; + + return; +} diff --git a/benchmarks/source/port/devlog.h b/benchmarks/source/port/devlog.h new file mode 100755 index 00000000..b6cdf509 --- /dev/null +++ b/benchmarks/source/port/devlog.h @@ -0,0 +1 @@ +void devlog_ctl(uchar *cmd); diff --git a/benchmarks/source/port/devmac.c b/benchmarks/source/port/devmac.c new file mode 100644 index 00000000..dda7306d --- /dev/null +++ b/benchmarks/source/port/devmac.c @@ -0,0 +1,268 @@ +#include "e-types.h" +#include "devsim7708.h" +#include "sh7708.h" +#include "fault.h" +#include "physics.h" +#include "network-hitachi-sh.h" +#include "devlog.h" +#include "print.h" +#include "devmac.h" +#include "misc.h" + + +extern void splhi(void); +extern void spldone(ulong); +extern ulong getpsr(void); + + +void +devmac_cksum(uchar *header, uchar *data, int hdrlen, int datalen, uchar *frame_cksum) +{ + int i; + + frame_cksum[0] = 0; + frame_cksum[1] = 1; + +//print("devmac_cksum: hdrlen = %d, datalen = %d\n\t", hdrlen, datalen); + for (i = 0; i < hdrlen; i++) + { + frame_cksum[i & 1] ^= header[i]; +//print("%d ", header[i]); + } + + for (i = 0; i < datalen; i++) + { + frame_cksum[i & 1] ^= data[i]; +//print("%d ", data[i]); + } +//print("\n\ndone devmac_cksum, cksum = [%d][%d].\n", frame_cksum[0], frame_cksum[1]); + + return; +} + + +int +devmac_getcurifc(void) +{ + /* TODO: need to add either a mmap reg, or include this in NSR */ + return 0; +} + +ulong +devmac_getncr(int whichifc) +{ + ulong ncr = 0; + ulong ifc_shift_offset = (whichifc & 0xFFF) << 4; + + + ((uchar *)&ncr)[3] = *(NIC_NCR+ifc_shift_offset+0); + ((uchar *)&ncr)[2] = *(NIC_NCR+ifc_shift_offset+1); + ((uchar *)&ncr)[1] = *(NIC_NCR+ifc_shift_offset+2); + ((uchar *)&ncr)[0] = *(NIC_NCR+ifc_shift_offset+3); + + return ncr; +} + +void +devmac_framedelay(int nframes, int whichifc) +{ + int frame_usecs = (1E6*nframes*devmac_getmaxfsz(whichifc)*8) / (devmac_getspeed(whichifc)*1024); + + xudelay(frame_usecs); +} + +ulong +devmac_getmaxfsz(int whichifc) +{ + ulong fsz = 0; + ulong ifc_shift_offset = (whichifc & 0xFFF) << 4; + + + ((uchar *)&fsz)[3] = *(NIC_MAXFSZ+ifc_shift_offset+0); + ((uchar *)&fsz)[2] = *(NIC_MAXFSZ+ifc_shift_offset+1); + ((uchar *)&fsz)[1] = *(NIC_MAXFSZ+ifc_shift_offset+2); + ((uchar *)&fsz)[0] = *(NIC_MAXFSZ+ifc_shift_offset+3); + + return fsz; +} + +ulong +devmac_getrxfsz(int whichifc) +{ + ulong fsz = 0; + ulong ifc_shift_offset = (whichifc & 0xFFF) << 4; + + + ((uchar *)&fsz)[3] = *(NIC_RXFSZ+ifc_shift_offset+0); + ((uchar *)&fsz)[2] = *(NIC_RXFSZ+ifc_shift_offset+1); + ((uchar *)&fsz)[1] = *(NIC_RXFSZ+ifc_shift_offset+2); + ((uchar *)&fsz)[0] = *(NIC_RXFSZ+ifc_shift_offset+3); + + return fsz; +} + +ulong +devmac_getncolls(int whichifc) +{ + ulong ncolls = 0; + ulong ifc_shift_offset = (whichifc & 0xFFF) << 4; + + + ((uchar *)&ncolls)[3] = *(NIC_NCOLLS+ifc_shift_offset+0); + ((uchar *)&ncolls)[2] = *(NIC_NCOLLS+ifc_shift_offset+1); + ((uchar *)&ncolls)[1] = *(NIC_NCOLLS+ifc_shift_offset+2); + ((uchar *)&ncolls)[0] = *(NIC_NCOLLS+ifc_shift_offset+3); + + + return ncolls; +} + +ulong +devmac_getncsense(int whichifc) +{ + ulong ncsense = 0; + ulong ifc_shift_offset = (whichifc & 0xFFF) << 4; + + + ((uchar *)&ncsense)[3] = *(NIC_NCSENSE+ifc_shift_offset+0); + ((uchar *)&ncsense)[2] = *(NIC_NCSENSE+ifc_shift_offset+1); + ((uchar *)&ncsense)[1] = *(NIC_NCSENSE+ifc_shift_offset+2); + ((uchar *)&ncsense)[0] = *(NIC_NCSENSE+ifc_shift_offset+3); + + + return ncsense; +} + +ulong +devmac_getspeed(int whichifc) +{ + ulong speed = 0; + ulong ifc_shift_offset = (whichifc & 0xFFF) << 4; + + + ((uchar *)&speed)[3] = *(NIC_BRR+ifc_shift_offset+0); + ((uchar *)&speed)[2] = *(NIC_BRR+ifc_shift_offset+1); + ((uchar *)&speed)[1] = *(NIC_BRR+ifc_shift_offset+2); + ((uchar *)&speed)[0] = *(NIC_BRR+ifc_shift_offset+3); + + return speed; +} + +//BUG: we curretnly make the mac layer pass in the length of the destination address, so we can support multiple +// mac layers with different address sizes. Currently, the simulator maintains a 16+1 (NIC_ADDR_LEN) character +// string format address. When the MAC layer probes the NIC_OUI, it currently gets a string, which is +// fine for now, but we neeed to clean this implementation up +int +devmac_xmit(uchar *dst, int dstaddrlen, uchar *header, uchar *data, int headerlen, int nbytes, int whichifc) +{ + int max_framesize; + int n = 0, i; + uchar frame_cksum[2]; + ulong ifc_shift_offset = (whichifc & 0xFFF) << 4; + ulong savedSR; + + +//print("in devmac_xmit, sending [%d] bytes to [%s], proto [%d], via ifc [%d]\n", nbytes, dst, proto, whichifc); + + /* Save SR, then disable intrs: */ + savedSR = getpsr(); + splhi(); + + + /* */ + /* The 32 bit cksum added by hw */ + /* is not counted as part of fsz */ + /* */ + max_framesize = devmac_getmaxfsz(whichifc); + + /* Save the dst for future use */ + for (i = 0; i < min(16, dstaddrlen); i++) + { + *(NIC_DST+ifc_shift_offset+i) = dst[i]; + } + *(NIC_DST+ifc_shift_offset+i) = '\0'; + + /* Write MAC layer header */ + for (i = 0; i < headerlen && (n < max_framesize); i++) + { + *(NIC_TDR+ifc_shift_offset) = header[i]; + n++; + } + + /* Write data */ + for (i = 0; (i < nbytes) && (n < max_framesize); i++) + { + *(NIC_TDR+ifc_shift_offset) = data[i]; + n++; + } + + /* Write checksum */ + devmac_cksum(header, data, headerlen, nbytes, &frame_cksum[0]); + for (i = 0; i < 2; i++) + { + *(NIC_TDR+ifc_shift_offset) = frame_cksum[i]; + n++; + } + + + /* */ + /* The current frame size is calculated from */ + /* number of bytes in the TDR at this point */ + /* */ + devmac_ctl(NIC_NCR_WRITE, NIC_CMD_TRANSMIT, whichifc); + + + /* Restore SR */ + spldone(savedSR); + + + /* */ + /* If frame could'nt be sent, LSB */ + /* of NIC_NSR will be 1, return -1 */ + /* */ + return -((*(NIC_NSR+ifc_shift_offset)) & 0x1); +} + +void +devmac_recv(uchar *recvbuf, int nbytes, int whichifc) +{ + int i; + ulong ifc_shift_offset = (whichifc & 0xFFF) << 4; + + + for (i = 0; i < nbytes; i++) + { + recvbuf[i] = *(NIC_RDR+ifc_shift_offset); + } + + return; +} + +int +devmac_ctl(int cmd, int val, int whichifc) +{ + ulong ifc_shift_offset = (whichifc & 0xFFF) << 4; + + + if (cmd == NIC_NCR_WRITE) + { + *(NIC_NCR+ifc_shift_offset) = val; + } + else if (cmd == NIC_NCR_READ) + { + return *(NIC_NCR+ifc_shift_offset); + } + + + return -1; +} + +char +devmac_csense(int whichifc) +{ + ulong ifc_shift_offset = (whichifc & 0xFFF) << 4; + +//print("--- devmac_csense() returning [%d]\n", *(NIC_CSENSE+ifc_shift_offset)); + + return *(NIC_CSENSE+ifc_shift_offset); +} diff --git a/benchmarks/source/port/devmac.h b/benchmarks/source/port/devmac.h new file mode 100644 index 00000000..30743bf8 --- /dev/null +++ b/benchmarks/source/port/devmac.h @@ -0,0 +1,13 @@ +int devmac_xmit(uchar *dst, int dstaddrlen, uchar *header, uchar *data, int headerlen, int nbytes, int whichifc); +void devmac_recv(uchar *recvbuf, int nbytes, int whichifc); +ulong devmac_getmaxfsz(int whichifc); +ulong devmac_getrxfsz(int whichifc); +ulong devmac_getncr(int whichifc); +ulong devmac_getspeed(int whichifc); +int devmac_ctl(int cmd, int val, int whichifc); +void devmac_framedelay(int nframes, int whichifc); +ulong devmac_getncolls(int whichifc); +ulong devmac_getncsense(int whichifc); +int devmac_getcurifc(void); +void devmac_cksum(uchar *header, uchar *data, int hdrlen, int datalen, uchar *frame_cksum); +char devmac_csense(int whichifc); diff --git a/benchmarks/source/port/devnet.c b/benchmarks/source/port/devnet.c new file mode 100644 index 00000000..79dc6dc0 --- /dev/null +++ b/benchmarks/source/port/devnet.c @@ -0,0 +1,250 @@ +#include "e-types.h" +#include "devsim7708.h" +#include "sh7708.h" +#include "fault.h" +#include "physics.h" +#include "network-hitachi-sh.h" +#include "devlog.h" +#include "print.h" +#include "devnet.h" +#include "misc.h" + + +extern void splhi(void); +extern void spldone(ulong); +extern ulong getpsr(void); + + +int +devnet_getcurifc(void) +{ + /* TODO: need to add either a mmap reg, or include this in NSR */ + return 0; +} + +ulong +devnet_getncr(int whichifc) +{ + ulong ncr = 0; + ulong ifc_shift_offset = (whichifc & 0xFFF) << 4; + + + ((uchar *)&ncr)[3] = *(NIC_NCR+ifc_shift_offset+0); + ((uchar *)&ncr)[2] = *(NIC_NCR+ifc_shift_offset+1); + ((uchar *)&ncr)[1] = *(NIC_NCR+ifc_shift_offset+2); + ((uchar *)&ncr)[0] = *(NIC_NCR+ifc_shift_offset+3); + + return ncr; +} + +void +devnet_framedelay(int nframes, int whichifc) +{ + int frame_usecs = (1E6*nframes*devnet_getmaxfsz(whichifc)*8) / (devnet_getspeed(whichifc)*1024); + + xudelay(frame_usecs); +} + +ulong +devnet_getmaxfsz(int whichifc) +{ + ulong fsz = 0; + ulong ifc_shift_offset = (whichifc & 0xFFF) << 4; + + + ((uchar *)&fsz)[3] = *(NIC_MAXFSZ+ifc_shift_offset+0); + ((uchar *)&fsz)[2] = *(NIC_MAXFSZ+ifc_shift_offset+1); + ((uchar *)&fsz)[1] = *(NIC_MAXFSZ+ifc_shift_offset+2); + ((uchar *)&fsz)[0] = *(NIC_MAXFSZ+ifc_shift_offset+3); + + + return fsz; +} + +ulong +devnet_getrxfsz(int whichifc) +{ + ulong fsz = 0; + ulong ifc_shift_offset = (whichifc & 0xFFF) << 4; + + + ((uchar *)&fsz)[3] = *(NIC_RXFSZ+ifc_shift_offset+0); + ((uchar *)&fsz)[2] = *(NIC_RXFSZ+ifc_shift_offset+1); + ((uchar *)&fsz)[1] = *(NIC_RXFSZ+ifc_shift_offset+2); + ((uchar *)&fsz)[0] = *(NIC_RXFSZ+ifc_shift_offset+3); + + + return fsz; +} + +ulong +devnet_getncolls(int whichifc) +{ + ulong ncolls = 0; + ulong ifc_shift_offset = (whichifc & 0xFFF) << 4; + + + ((uchar *)&ncolls)[3] = *(NIC_NCOLLS+ifc_shift_offset+0); + ((uchar *)&ncolls)[2] = *(NIC_NCOLLS+ifc_shift_offset+1); + ((uchar *)&ncolls)[1] = *(NIC_NCOLLS+ifc_shift_offset+2); + ((uchar *)&ncolls)[0] = *(NIC_NCOLLS+ifc_shift_offset+3); + + + return ncolls; +} + +ulong +devnet_getncsense(int whichifc) +{ + ulong ncsense = 0; + ulong ifc_shift_offset = (whichifc & 0xFFF) << 4; + + + ((uchar *)&ncsense)[3] = *(NIC_NCSENSE+ifc_shift_offset+0); + ((uchar *)&ncsense)[2] = *(NIC_NCSENSE+ifc_shift_offset+1); + ((uchar *)&ncsense)[1] = *(NIC_NCSENSE+ifc_shift_offset+2); + ((uchar *)&ncsense)[0] = *(NIC_NCSENSE+ifc_shift_offset+3); + + + return ncsense; +} + +ulong +devnet_getspeed(int whichifc) +{ + ulong speed = 0; + ulong ifc_shift_offset = (whichifc & 0xFFF) << 4; + + + ((uchar *)&speed)[3] = *(NIC_BRR+ifc_shift_offset+0); + ((uchar *)&speed)[2] = *(NIC_BRR+ifc_shift_offset+1); + ((uchar *)&speed)[1] = *(NIC_BRR+ifc_shift_offset+2); + ((uchar *)&speed)[0] = *(NIC_BRR+ifc_shift_offset+3); + + return speed; +} + +int +devnet_xmit(uchar *dst, uchar proto, uchar *data, int nbytes, int whichifc) +{ + int framesize; + int n = 0, i; + uchar *tptr; + ulong ifc_shift_offset = (whichifc & 0xFFF) << 4; + ulong savedSR; + + +//@@printf("in devnet_xmit, sending [%d] bytes to [%s], proto [%d], via ifc [%d]\n", nbytes, dst, proto, whichifc); + + /* Save SR, then disable intrs: */ + savedSR = getpsr(); + splhi(); + + + /* Save the dst for future use */ + for (i = 0; i < 16; i++) + { + *(NIC_DST+ifc_shift_offset+i) = *(dst+i); + } + + /* Write 16 byte src_addr */ + for (i = 0; i < 16; i++) + { + *(NIC_TDR+ifc_shift_offset) = *(NIC_OUI+i); + } + n += 16; + + /* Write 16 byte dst_addr */ + for (i = 0; i < 16; i++) + { + *(NIC_TDR+ifc_shift_offset) = *(dst+i); +//printf("devnet_xmit(), *(dst+i) = [%d]\n", *(dst+i)); + } + n += 16; + + /* Write 4 byte payloadlen */ + *(NIC_TDR+ifc_shift_offset) = (nbytes>>24)&0xFF; + *(NIC_TDR+ifc_shift_offset) = (nbytes>>16)&0xFF; + *(NIC_TDR+ifc_shift_offset) = (nbytes>>8)&0xFF; + *(NIC_TDR+ifc_shift_offset) = (nbytes>>0)&0xFF; + n += 4; + + /* Write 1 byte nexthdr */ + *(NIC_TDR+ifc_shift_offset) = proto; + n += 1; + + + /* */ + /* The 32 bit cksum added by hw */ + /* is not counted as part of fsz */ + /* */ + framesize = devnet_getmaxfsz(whichifc); + + + /* Write data */ + tptr = data; + for (i = 0; (i < nbytes) && (n < framesize); i++) + { + *(NIC_TDR+ifc_shift_offset) = *tptr++; + n++; + } + + /* if nbytes+header size was more than a frame, recurse */ + if (nbytes+16+16+4+1 > framesize) + { + print("Warning!!! devnet_xmit recursing: nbytes+header = %d, framesize = %d\n", nbytes+16+16+4+1, framesize); + devnet_xmit(dst, proto, tptr, nbytes - i, whichifc); + } + else while (n < framesize) + { + /* Send padding */ + *(NIC_TDR+ifc_shift_offset) = 0; + n++; + } + + + + /* Restore SR */ + spldone(savedSR); + + + /* */ + /* If frame could'nt be sent, LSB */ + /* of NIC_NSR will be 1, return -1 */ + /* */ + return -((*(NIC_NSR+ifc_shift_offset)) & 0x1); +} + +void +devnet_recv(uchar *recvbuf, int nbytes, int whichifc) +{ + int i; + ulong ifc_shift_offset = (whichifc & 0xFFF) << 4; + + + for (i = 0; i < nbytes; i++) + { + *recvbuf++ = *(NIC_RDR+ifc_shift_offset); + } + + return; +} + +int +devnet_ctl(int cmd, int val, int whichifc) +{ + ulong ifc_shift_offset = (whichifc & 0xFFF) << 4; + + + if (cmd == NIC_NCR_WRITE) + { + *(NIC_NCR+ifc_shift_offset) = val; + } + else if (cmd == NIC_NCR_READ) + { + return *(NIC_NCR+ifc_shift_offset); + } + + + return -1; +} diff --git a/benchmarks/source/port/devnet.h b/benchmarks/source/port/devnet.h new file mode 100644 index 00000000..48f1e320 --- /dev/null +++ b/benchmarks/source/port/devnet.h @@ -0,0 +1,11 @@ +int devnet_xmit(uchar *dst, uchar proto, uchar *data, int nbytes, int whichifc); +void devnet_recv(uchar *recvbuf, int nbytes, int whichifc); +ulong devnet_getrxfsz(int whichifc); +ulong devnet_getmaxfsz(int whichifc); +ulong devnet_getncr(int whichifc); +ulong devnet_getspeed(int whichifc); +int devnet_ctl(int cmd, int val, int whichifc); +void devnet_framedelay(int nframes, int whichifc); +ulong devnet_getncolls(int whichifc); +ulong devnet_getncsense(int whichifc); +int devnet_getcurifc(void); diff --git a/benchmarks/source/port/devrand.c b/benchmarks/source/port/devrand.c new file mode 100644 index 00000000..8eb64188 --- /dev/null +++ b/benchmarks/source/port/devrand.c @@ -0,0 +1,23 @@ +#include "e-types.h" +#include "tag.h" +#include "devsim7708.h" +#include "sh7708.h" + +ulong +devrand_getrand(void) +{ + ulong rand = 0; + + ((uchar *)&rand)[3] = *(RANDDR+0); + ((uchar *)&rand)[2] = *(RANDDR+1); + ((uchar *)&rand)[1] = *(RANDDR+2); + ((uchar *)&rand)[0] = *(RANDDR+3); + + return rand; +} + +void +devrand_seed(ulong seed) +{ + return; +} diff --git a/benchmarks/source/port/devrand.h b/benchmarks/source/port/devrand.h new file mode 100644 index 00000000..b9194d44 --- /dev/null +++ b/benchmarks/source/port/devrand.h @@ -0,0 +1,2 @@ +ulong devrand_getrand(void); +void devrand_seed(ulong seed); diff --git a/benchmarks/source/port/devrtc.c b/benchmarks/source/port/devrtc.c new file mode 100644 index 00000000..52f87bd5 --- /dev/null +++ b/benchmarks/source/port/devrtc.c @@ -0,0 +1,16 @@ +#include "e-types.h" +#include "devsim7708.h" +#include "sh7708.h" + +ulong +devrtc_getusecs(void) +{ + ulong usecs = 0; + + ((uchar *)&usecs)[3] = *(SF_SECS+0); + ((uchar *)&usecs)[2] = *(SF_SECS+1); + ((uchar *)&usecs)[1] = *(SF_SECS+2); + ((uchar *)&usecs)[0] = *(SF_SECS+3); + + return usecs; +} diff --git a/benchmarks/source/port/devrtc.h b/benchmarks/source/port/devrtc.h new file mode 100644 index 00000000..7814b174 --- /dev/null +++ b/benchmarks/source/port/devrtc.h @@ -0,0 +1 @@ +ulong devrtc_getusecs(void); diff --git a/benchmarks/source/port/devsensor.c b/benchmarks/source/port/devsensor.c new file mode 100644 index 00000000..b12b3e74 --- /dev/null +++ b/benchmarks/source/port/devsensor.c @@ -0,0 +1,18 @@ +#include "e-types.h" +#include "tag.h" +#include "devsim7708.h" +#include "sh7708.h" +#include + +double +devsignal_read(int which) +{ + ulong sensor_shift_offset = (which & 0xFFF) << 2; + return *(SENSOR_READ + sensor_shift_offset); +} + +void +devsignal_write(double value) +{ + return; +} diff --git a/benchmarks/source/port/devsensor.h b/benchmarks/source/port/devsensor.h new file mode 100644 index 00000000..78d0535c --- /dev/null +++ b/benchmarks/source/port/devsensor.h @@ -0,0 +1,2 @@ +double devsignal_read(int which); +void devsignal_write(double value); diff --git a/benchmarks/source/port/logmarkers.h b/benchmarks/source/port/logmarkers.h new file mode 100644 index 00000000..62e0dc2b --- /dev/null +++ b/benchmarks/source/port/logmarkers.h @@ -0,0 +1,4 @@ +/* For 32 log markers, make sure the marker is <= 1<<5 */ +#define LOGMARK(n) (*((volatile unsigned char *)0xefeeffa5 + (n & 0x1F)) = 0) + +#define NETTRACEMARK(n) (*((volatile unsigned char *)0xefeeff85 + (n & 0x1F)) = 0) diff --git a/benchmarks/source/port/misc.c b/benchmarks/source/port/misc.c new file mode 100644 index 00000000..55c5090c --- /dev/null +++ b/benchmarks/source/port/misc.c @@ -0,0 +1,65 @@ +#include "e-types.h" +#include "tag.h" +#include "devsim7708.h" +#include "devscc.h" +#include "sh7708.h" +#include "devrtc.h" +#include "misc.h" + +#define CALIBRATE 8 /* Calibrated to give you ~correct delay @ 60MHz */ + +/* Needed by print */ +void +sccputc(int device, uchar ch) +{ + while (!(*SCC_SCSSR & TX_RDY)); + + *SCC_SCTDR = ch; + *SCC_SCSSR &= TX_CLR; + + return; +} + +/* Needed by lprint */ +void +devlogprintputc(int device, uchar ch) +{ + *DEVLOGPRINT = ch; + + return; +} + +void +xudelay(ulong usecs) +{ + volatile int max, i; + + max = CALIBRATE*usecs; + for (i = 0; i < max; i++) + { + } +} + +void +xusleep(ulong usecs) +{ + ulong time = devrtc_getusecs(); + + while ((devrtc_getusecs() - time) < usecs) + { + sleep(); + } +} + +int +pow10(int y) +{ + int i, ret = 1; + + for (i = 0; i < y; i++) + { + ret *= 10; + } + + return ret; +} diff --git a/benchmarks/source/port/misc.h b/benchmarks/source/port/misc.h new file mode 100644 index 00000000..23fcdd96 --- /dev/null +++ b/benchmarks/source/port/misc.h @@ -0,0 +1,6 @@ +#define min(a, b) ((a) < (b) ? (a) : (b)) +#define max(a, b) ((a) > (b) ? (a) : (b)) + +void xudelay(ulong); +int pow10(int y); + diff --git a/benchmarks/source/port/superHspecific.c b/benchmarks/source/port/superHspecific.c new file mode 100644 index 00000000..da694aa4 --- /dev/null +++ b/benchmarks/source/port/superHspecific.c @@ -0,0 +1,17 @@ +#include "e-types.h" +#include "tag.h" +#include "devsim7708.h" +#include "devscc.h" +#include "sh7708.h" +#include "devrtc.h" + +void +xusleep(ulong usecs) +{ + ulong time = devrtc_getusecs(); + + while ((devrtc_getusecs() - time) < usecs) + { + sleep(); + } +} diff --git a/benchmarks/source/port/superHspecific.h b/benchmarks/source/port/superHspecific.h new file mode 100644 index 00000000..bc9992f3 --- /dev/null +++ b/benchmarks/source/port/superHspecific.h @@ -0,0 +1,2 @@ +extern void sleep(void); +void xusleep(ulong); From 22ddf61c3777b091dd26729f908bfcc54ade7670 Mon Sep 17 00:00:00 2001 From: JamesTimothyMeech Date: Fri, 18 Dec 2020 16:28:12 +0000 Subject: [PATCH 02/27] Delete sleep instruction specific to SuperH from misc.c --- benchmarks/source/port/misc.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/benchmarks/source/port/misc.c b/benchmarks/source/port/misc.c index 55c5090c..66bee4be 100644 --- a/benchmarks/source/port/misc.c +++ b/benchmarks/source/port/misc.c @@ -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) { From 0d465a6e7f4ac5b461231890afde46f14963958e Mon Sep 17 00:00:00 2001 From: JamesTimothyMeech Date: Fri, 18 Dec 2020 16:30:15 +0000 Subject: [PATCH 03/27] Virtual sensor example tested and working for superH --- .../source/superh/virtualSensorExample/Makefile | 2 +- .../virtualSensorExample/virtualSensorExample.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/benchmarks/source/superh/virtualSensorExample/Makefile b/benchmarks/source/superh/virtualSensorExample/Makefile index cf90d77c..1294ad86 100644 --- a/benchmarks/source/superh/virtualSensorExample/Makefile +++ b/benchmarks/source/superh/virtualSensorExample/Makefile @@ -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 diff --git a/benchmarks/source/superh/virtualSensorExample/virtualSensorExample.c b/benchmarks/source/superh/virtualSensorExample/virtualSensorExample.c index f30f48de..4a786a98 100644 --- a/benchmarks/source/superh/virtualSensorExample/virtualSensorExample.c +++ b/benchmarks/source/superh/virtualSensorExample/virtualSensorExample.c @@ -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" volatile float dam_myPr = 0.0; From e7304bcc41cb72944e7e99c63ec6a93a9b7f4656 Mon Sep 17 00:00:00 2001 From: JamesTimothyMeech Date: Fri, 18 Dec 2020 17:30:13 +0000 Subject: [PATCH 04/27] twoVirtualSensorExample working for SuperH --- .../source/superh/twoVirtualSensorsExample/Makefile | 2 +- .../twoVirtualSensorsExample/virtualSensorExample.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/benchmarks/source/superh/twoVirtualSensorsExample/Makefile b/benchmarks/source/superh/twoVirtualSensorsExample/Makefile index 9b59cb9f..e9afcc0d 100644 --- a/benchmarks/source/superh/twoVirtualSensorsExample/Makefile +++ b/benchmarks/source/superh/twoVirtualSensorsExample/Makefile @@ -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 diff --git a/benchmarks/source/superh/twoVirtualSensorsExample/virtualSensorExample.c b/benchmarks/source/superh/twoVirtualSensorsExample/virtualSensorExample.c index 8709d95d..cfa2c4f8 100644 --- a/benchmarks/source/superh/twoVirtualSensorsExample/virtualSensorExample.c +++ b/benchmarks/source/superh/twoVirtualSensorsExample/virtualSensorExample.c @@ -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 findMean(float samples[], int size); From 4cbc21ff57cf4ee6999ab00d207a9ac209c36c6d Mon Sep 17 00:00:00 2001 From: JamesTimothyMeech Date: Fri, 18 Dec 2020 17:39:12 +0000 Subject: [PATCH 05/27] Fixed Makefiles in swradio --- benchmarks/source/superh/port/devexcp.c | 9 - benchmarks/source/superh/port/devexcp.h | 1 - benchmarks/source/superh/port/devloc.c | 82 ------ benchmarks/source/superh/port/devloc.h | 5 - benchmarks/source/superh/port/devlog.c | 30 -- benchmarks/source/superh/port/devlog.h | 1 - benchmarks/source/superh/port/devmac.c | 268 ------------------ benchmarks/source/superh/port/devmac.h | 13 - benchmarks/source/superh/port/devnet.c | 250 ---------------- benchmarks/source/superh/port/devnet.h | 11 - benchmarks/source/superh/port/devrand.c | 23 -- benchmarks/source/superh/port/devrand.h | 2 - benchmarks/source/superh/port/devrtc.c | 16 -- benchmarks/source/superh/port/devrtc.h | 1 - benchmarks/source/superh/port/devsensor.c | 18 -- benchmarks/source/superh/port/devsensor.h | 2 - benchmarks/source/superh/port/logmarkers.h | 4 - benchmarks/source/superh/port/misc.c | 65 ----- benchmarks/source/superh/port/misc.h | 7 - .../superh/swradio/swradio-demod/Makefile | 2 +- .../source/superh/swradio/swradio-eq/Makefile | 2 +- .../superh/swradio/swradio-lpf/Makefile | 2 +- .../superh/swradio/swradio-sink/Makefile | 2 +- .../superh/swradio/swradio-source/Makefile | 2 +- 24 files changed, 5 insertions(+), 813 deletions(-) delete mode 100644 benchmarks/source/superh/port/devexcp.c delete mode 100644 benchmarks/source/superh/port/devexcp.h delete mode 100644 benchmarks/source/superh/port/devloc.c delete mode 100644 benchmarks/source/superh/port/devloc.h delete mode 100755 benchmarks/source/superh/port/devlog.c delete mode 100755 benchmarks/source/superh/port/devlog.h delete mode 100644 benchmarks/source/superh/port/devmac.c delete mode 100644 benchmarks/source/superh/port/devmac.h delete mode 100644 benchmarks/source/superh/port/devnet.c delete mode 100644 benchmarks/source/superh/port/devnet.h delete mode 100644 benchmarks/source/superh/port/devrand.c delete mode 100644 benchmarks/source/superh/port/devrand.h delete mode 100644 benchmarks/source/superh/port/devrtc.c delete mode 100644 benchmarks/source/superh/port/devrtc.h delete mode 100644 benchmarks/source/superh/port/devsensor.c delete mode 100644 benchmarks/source/superh/port/devsensor.h delete mode 100644 benchmarks/source/superh/port/logmarkers.h delete mode 100644 benchmarks/source/superh/port/misc.c delete mode 100644 benchmarks/source/superh/port/misc.h diff --git a/benchmarks/source/superh/port/devexcp.c b/benchmarks/source/superh/port/devexcp.c deleted file mode 100644 index 4f03eb95..00000000 --- a/benchmarks/source/superh/port/devexcp.c +++ /dev/null @@ -1,9 +0,0 @@ -#include -#include "sf-types.h" -#include "sh7708.h" - -ulong -devexcp_getintevt(void) -{ - return *(EXCP_INTEVT); -} diff --git a/benchmarks/source/superh/port/devexcp.h b/benchmarks/source/superh/port/devexcp.h deleted file mode 100644 index 545fe84c..00000000 --- a/benchmarks/source/superh/port/devexcp.h +++ /dev/null @@ -1 +0,0 @@ -ulong devexcp_getintevt(void); diff --git a/benchmarks/source/superh/port/devloc.c b/benchmarks/source/superh/port/devloc.c deleted file mode 100644 index e162856e..00000000 --- a/benchmarks/source/superh/port/devloc.c +++ /dev/null @@ -1,82 +0,0 @@ -#include -#include "sf-types.h" -#include "tag.h" -#include "devsim7708.h" -#include "sh7708.h" - -int -devloc_getorbit(void) -{ - int orbit = 0; - - ((uchar *)&orbit)[3] = *(ORBIT+0); - ((uchar *)&orbit)[2] = *(ORBIT+1); - ((uchar *)&orbit)[1] = *(ORBIT+2); - ((uchar *)&orbit)[0] = *(ORBIT+3); - - return orbit; -} - -int -devloc_getvelocity(void) -{ - int velocity = 0; - - ((uchar *)&velocity)[3] = *(VELOCITY+0); - ((uchar *)&velocity)[2] = *(VELOCITY+1); - ((uchar *)&velocity)[1] = *(VELOCITY+2); - ((uchar *)&velocity)[0] = *(VELOCITY+3); - - return velocity; -} - -double -devloc_getxloc(void) -{ - double xloc = 0.0; - - ((uchar *)&xloc)[7] = *(XLOC+0); - ((uchar *)&xloc)[6] = *(XLOC+1); - ((uchar *)&xloc)[5] = *(XLOC+2); - ((uchar *)&xloc)[4] = *(XLOC+3); - ((uchar *)&xloc)[3] = *(XLOC+4); - ((uchar *)&xloc)[2] = *(XLOC+5); - ((uchar *)&xloc)[1] = *(XLOC+6); - ((uchar *)&xloc)[0] = *(XLOC+7); - - return xloc; -} - -double -devloc_getyloc(void) -{ - double yloc = 0.0; - - ((uchar *)&yloc)[7] = *(YLOC+0); - ((uchar *)&yloc)[6] = *(YLOC+1); - ((uchar *)&yloc)[5] = *(YLOC+2); - ((uchar *)&yloc)[4] = *(YLOC+3); - ((uchar *)&yloc)[3] = *(YLOC+4); - ((uchar *)&yloc)[2] = *(YLOC+5); - ((uchar *)&yloc)[1] = *(YLOC+6); - ((uchar *)&yloc)[0] = *(YLOC+7); - - return yloc; -} - -double -devloc_getzloc(void) -{ - double zloc = 0.0; - - ((uchar *)&zloc)[7] = *(ZLOC+0); - ((uchar *)&zloc)[6] = *(ZLOC+1); - ((uchar *)&zloc)[5] = *(ZLOC+2); - ((uchar *)&zloc)[4] = *(ZLOC+3); - ((uchar *)&zloc)[3] = *(ZLOC+4); - ((uchar *)&zloc)[2] = *(ZLOC+5); - ((uchar *)&zloc)[1] = *(ZLOC+6); - ((uchar *)&zloc)[0] = *(ZLOC+7); - - return zloc; -} diff --git a/benchmarks/source/superh/port/devloc.h b/benchmarks/source/superh/port/devloc.h deleted file mode 100644 index e49ef9a7..00000000 --- a/benchmarks/source/superh/port/devloc.h +++ /dev/null @@ -1,5 +0,0 @@ -int devloc_getorbit(void); -int devloc_getvelocity(void); -double devloc_getxloc(void); -double devloc_getyloc(void); -double devloc_getzloc(void); diff --git a/benchmarks/source/superh/port/devlog.c b/benchmarks/source/superh/port/devlog.c deleted file mode 100755 index dd126609..00000000 --- a/benchmarks/source/superh/port/devlog.c +++ /dev/null @@ -1,30 +0,0 @@ -#include "e-types.h" -#include "tag.h" -#include "devsim7708.h" -#include "sh7708.h" - -/* */ -/* Simulator control */ -/* */ -#define SIMCMD_DATA ((volatile unsigned char *) SUPERH_SIMCMD_DATA) -#define SIMCMD_CTL ((volatile unsigned char *) SUPERH_SIMCMD_CTL) - -void -devlog_ctl(uchar *cmd) -{ - int i, cmdlen; - - cmdlen = strlen(cmd); - for (i = 0; i < cmdlen; i++) - { - *SIMCMD_DATA = *(cmd + i); - - if (*(cmd + i) == '\n') - { - break; - } - } - *SIMCMD_CTL = 0; - - return; -} diff --git a/benchmarks/source/superh/port/devlog.h b/benchmarks/source/superh/port/devlog.h deleted file mode 100755 index b6cdf509..00000000 --- a/benchmarks/source/superh/port/devlog.h +++ /dev/null @@ -1 +0,0 @@ -void devlog_ctl(uchar *cmd); diff --git a/benchmarks/source/superh/port/devmac.c b/benchmarks/source/superh/port/devmac.c deleted file mode 100644 index dda7306d..00000000 --- a/benchmarks/source/superh/port/devmac.c +++ /dev/null @@ -1,268 +0,0 @@ -#include "e-types.h" -#include "devsim7708.h" -#include "sh7708.h" -#include "fault.h" -#include "physics.h" -#include "network-hitachi-sh.h" -#include "devlog.h" -#include "print.h" -#include "devmac.h" -#include "misc.h" - - -extern void splhi(void); -extern void spldone(ulong); -extern ulong getpsr(void); - - -void -devmac_cksum(uchar *header, uchar *data, int hdrlen, int datalen, uchar *frame_cksum) -{ - int i; - - frame_cksum[0] = 0; - frame_cksum[1] = 1; - -//print("devmac_cksum: hdrlen = %d, datalen = %d\n\t", hdrlen, datalen); - for (i = 0; i < hdrlen; i++) - { - frame_cksum[i & 1] ^= header[i]; -//print("%d ", header[i]); - } - - for (i = 0; i < datalen; i++) - { - frame_cksum[i & 1] ^= data[i]; -//print("%d ", data[i]); - } -//print("\n\ndone devmac_cksum, cksum = [%d][%d].\n", frame_cksum[0], frame_cksum[1]); - - return; -} - - -int -devmac_getcurifc(void) -{ - /* TODO: need to add either a mmap reg, or include this in NSR */ - return 0; -} - -ulong -devmac_getncr(int whichifc) -{ - ulong ncr = 0; - ulong ifc_shift_offset = (whichifc & 0xFFF) << 4; - - - ((uchar *)&ncr)[3] = *(NIC_NCR+ifc_shift_offset+0); - ((uchar *)&ncr)[2] = *(NIC_NCR+ifc_shift_offset+1); - ((uchar *)&ncr)[1] = *(NIC_NCR+ifc_shift_offset+2); - ((uchar *)&ncr)[0] = *(NIC_NCR+ifc_shift_offset+3); - - return ncr; -} - -void -devmac_framedelay(int nframes, int whichifc) -{ - int frame_usecs = (1E6*nframes*devmac_getmaxfsz(whichifc)*8) / (devmac_getspeed(whichifc)*1024); - - xudelay(frame_usecs); -} - -ulong -devmac_getmaxfsz(int whichifc) -{ - ulong fsz = 0; - ulong ifc_shift_offset = (whichifc & 0xFFF) << 4; - - - ((uchar *)&fsz)[3] = *(NIC_MAXFSZ+ifc_shift_offset+0); - ((uchar *)&fsz)[2] = *(NIC_MAXFSZ+ifc_shift_offset+1); - ((uchar *)&fsz)[1] = *(NIC_MAXFSZ+ifc_shift_offset+2); - ((uchar *)&fsz)[0] = *(NIC_MAXFSZ+ifc_shift_offset+3); - - return fsz; -} - -ulong -devmac_getrxfsz(int whichifc) -{ - ulong fsz = 0; - ulong ifc_shift_offset = (whichifc & 0xFFF) << 4; - - - ((uchar *)&fsz)[3] = *(NIC_RXFSZ+ifc_shift_offset+0); - ((uchar *)&fsz)[2] = *(NIC_RXFSZ+ifc_shift_offset+1); - ((uchar *)&fsz)[1] = *(NIC_RXFSZ+ifc_shift_offset+2); - ((uchar *)&fsz)[0] = *(NIC_RXFSZ+ifc_shift_offset+3); - - return fsz; -} - -ulong -devmac_getncolls(int whichifc) -{ - ulong ncolls = 0; - ulong ifc_shift_offset = (whichifc & 0xFFF) << 4; - - - ((uchar *)&ncolls)[3] = *(NIC_NCOLLS+ifc_shift_offset+0); - ((uchar *)&ncolls)[2] = *(NIC_NCOLLS+ifc_shift_offset+1); - ((uchar *)&ncolls)[1] = *(NIC_NCOLLS+ifc_shift_offset+2); - ((uchar *)&ncolls)[0] = *(NIC_NCOLLS+ifc_shift_offset+3); - - - return ncolls; -} - -ulong -devmac_getncsense(int whichifc) -{ - ulong ncsense = 0; - ulong ifc_shift_offset = (whichifc & 0xFFF) << 4; - - - ((uchar *)&ncsense)[3] = *(NIC_NCSENSE+ifc_shift_offset+0); - ((uchar *)&ncsense)[2] = *(NIC_NCSENSE+ifc_shift_offset+1); - ((uchar *)&ncsense)[1] = *(NIC_NCSENSE+ifc_shift_offset+2); - ((uchar *)&ncsense)[0] = *(NIC_NCSENSE+ifc_shift_offset+3); - - - return ncsense; -} - -ulong -devmac_getspeed(int whichifc) -{ - ulong speed = 0; - ulong ifc_shift_offset = (whichifc & 0xFFF) << 4; - - - ((uchar *)&speed)[3] = *(NIC_BRR+ifc_shift_offset+0); - ((uchar *)&speed)[2] = *(NIC_BRR+ifc_shift_offset+1); - ((uchar *)&speed)[1] = *(NIC_BRR+ifc_shift_offset+2); - ((uchar *)&speed)[0] = *(NIC_BRR+ifc_shift_offset+3); - - return speed; -} - -//BUG: we curretnly make the mac layer pass in the length of the destination address, so we can support multiple -// mac layers with different address sizes. Currently, the simulator maintains a 16+1 (NIC_ADDR_LEN) character -// string format address. When the MAC layer probes the NIC_OUI, it currently gets a string, which is -// fine for now, but we neeed to clean this implementation up -int -devmac_xmit(uchar *dst, int dstaddrlen, uchar *header, uchar *data, int headerlen, int nbytes, int whichifc) -{ - int max_framesize; - int n = 0, i; - uchar frame_cksum[2]; - ulong ifc_shift_offset = (whichifc & 0xFFF) << 4; - ulong savedSR; - - -//print("in devmac_xmit, sending [%d] bytes to [%s], proto [%d], via ifc [%d]\n", nbytes, dst, proto, whichifc); - - /* Save SR, then disable intrs: */ - savedSR = getpsr(); - splhi(); - - - /* */ - /* The 32 bit cksum added by hw */ - /* is not counted as part of fsz */ - /* */ - max_framesize = devmac_getmaxfsz(whichifc); - - /* Save the dst for future use */ - for (i = 0; i < min(16, dstaddrlen); i++) - { - *(NIC_DST+ifc_shift_offset+i) = dst[i]; - } - *(NIC_DST+ifc_shift_offset+i) = '\0'; - - /* Write MAC layer header */ - for (i = 0; i < headerlen && (n < max_framesize); i++) - { - *(NIC_TDR+ifc_shift_offset) = header[i]; - n++; - } - - /* Write data */ - for (i = 0; (i < nbytes) && (n < max_framesize); i++) - { - *(NIC_TDR+ifc_shift_offset) = data[i]; - n++; - } - - /* Write checksum */ - devmac_cksum(header, data, headerlen, nbytes, &frame_cksum[0]); - for (i = 0; i < 2; i++) - { - *(NIC_TDR+ifc_shift_offset) = frame_cksum[i]; - n++; - } - - - /* */ - /* The current frame size is calculated from */ - /* number of bytes in the TDR at this point */ - /* */ - devmac_ctl(NIC_NCR_WRITE, NIC_CMD_TRANSMIT, whichifc); - - - /* Restore SR */ - spldone(savedSR); - - - /* */ - /* If frame could'nt be sent, LSB */ - /* of NIC_NSR will be 1, return -1 */ - /* */ - return -((*(NIC_NSR+ifc_shift_offset)) & 0x1); -} - -void -devmac_recv(uchar *recvbuf, int nbytes, int whichifc) -{ - int i; - ulong ifc_shift_offset = (whichifc & 0xFFF) << 4; - - - for (i = 0; i < nbytes; i++) - { - recvbuf[i] = *(NIC_RDR+ifc_shift_offset); - } - - return; -} - -int -devmac_ctl(int cmd, int val, int whichifc) -{ - ulong ifc_shift_offset = (whichifc & 0xFFF) << 4; - - - if (cmd == NIC_NCR_WRITE) - { - *(NIC_NCR+ifc_shift_offset) = val; - } - else if (cmd == NIC_NCR_READ) - { - return *(NIC_NCR+ifc_shift_offset); - } - - - return -1; -} - -char -devmac_csense(int whichifc) -{ - ulong ifc_shift_offset = (whichifc & 0xFFF) << 4; - -//print("--- devmac_csense() returning [%d]\n", *(NIC_CSENSE+ifc_shift_offset)); - - return *(NIC_CSENSE+ifc_shift_offset); -} diff --git a/benchmarks/source/superh/port/devmac.h b/benchmarks/source/superh/port/devmac.h deleted file mode 100644 index 30743bf8..00000000 --- a/benchmarks/source/superh/port/devmac.h +++ /dev/null @@ -1,13 +0,0 @@ -int devmac_xmit(uchar *dst, int dstaddrlen, uchar *header, uchar *data, int headerlen, int nbytes, int whichifc); -void devmac_recv(uchar *recvbuf, int nbytes, int whichifc); -ulong devmac_getmaxfsz(int whichifc); -ulong devmac_getrxfsz(int whichifc); -ulong devmac_getncr(int whichifc); -ulong devmac_getspeed(int whichifc); -int devmac_ctl(int cmd, int val, int whichifc); -void devmac_framedelay(int nframes, int whichifc); -ulong devmac_getncolls(int whichifc); -ulong devmac_getncsense(int whichifc); -int devmac_getcurifc(void); -void devmac_cksum(uchar *header, uchar *data, int hdrlen, int datalen, uchar *frame_cksum); -char devmac_csense(int whichifc); diff --git a/benchmarks/source/superh/port/devnet.c b/benchmarks/source/superh/port/devnet.c deleted file mode 100644 index 79dc6dc0..00000000 --- a/benchmarks/source/superh/port/devnet.c +++ /dev/null @@ -1,250 +0,0 @@ -#include "e-types.h" -#include "devsim7708.h" -#include "sh7708.h" -#include "fault.h" -#include "physics.h" -#include "network-hitachi-sh.h" -#include "devlog.h" -#include "print.h" -#include "devnet.h" -#include "misc.h" - - -extern void splhi(void); -extern void spldone(ulong); -extern ulong getpsr(void); - - -int -devnet_getcurifc(void) -{ - /* TODO: need to add either a mmap reg, or include this in NSR */ - return 0; -} - -ulong -devnet_getncr(int whichifc) -{ - ulong ncr = 0; - ulong ifc_shift_offset = (whichifc & 0xFFF) << 4; - - - ((uchar *)&ncr)[3] = *(NIC_NCR+ifc_shift_offset+0); - ((uchar *)&ncr)[2] = *(NIC_NCR+ifc_shift_offset+1); - ((uchar *)&ncr)[1] = *(NIC_NCR+ifc_shift_offset+2); - ((uchar *)&ncr)[0] = *(NIC_NCR+ifc_shift_offset+3); - - return ncr; -} - -void -devnet_framedelay(int nframes, int whichifc) -{ - int frame_usecs = (1E6*nframes*devnet_getmaxfsz(whichifc)*8) / (devnet_getspeed(whichifc)*1024); - - xudelay(frame_usecs); -} - -ulong -devnet_getmaxfsz(int whichifc) -{ - ulong fsz = 0; - ulong ifc_shift_offset = (whichifc & 0xFFF) << 4; - - - ((uchar *)&fsz)[3] = *(NIC_MAXFSZ+ifc_shift_offset+0); - ((uchar *)&fsz)[2] = *(NIC_MAXFSZ+ifc_shift_offset+1); - ((uchar *)&fsz)[1] = *(NIC_MAXFSZ+ifc_shift_offset+2); - ((uchar *)&fsz)[0] = *(NIC_MAXFSZ+ifc_shift_offset+3); - - - return fsz; -} - -ulong -devnet_getrxfsz(int whichifc) -{ - ulong fsz = 0; - ulong ifc_shift_offset = (whichifc & 0xFFF) << 4; - - - ((uchar *)&fsz)[3] = *(NIC_RXFSZ+ifc_shift_offset+0); - ((uchar *)&fsz)[2] = *(NIC_RXFSZ+ifc_shift_offset+1); - ((uchar *)&fsz)[1] = *(NIC_RXFSZ+ifc_shift_offset+2); - ((uchar *)&fsz)[0] = *(NIC_RXFSZ+ifc_shift_offset+3); - - - return fsz; -} - -ulong -devnet_getncolls(int whichifc) -{ - ulong ncolls = 0; - ulong ifc_shift_offset = (whichifc & 0xFFF) << 4; - - - ((uchar *)&ncolls)[3] = *(NIC_NCOLLS+ifc_shift_offset+0); - ((uchar *)&ncolls)[2] = *(NIC_NCOLLS+ifc_shift_offset+1); - ((uchar *)&ncolls)[1] = *(NIC_NCOLLS+ifc_shift_offset+2); - ((uchar *)&ncolls)[0] = *(NIC_NCOLLS+ifc_shift_offset+3); - - - return ncolls; -} - -ulong -devnet_getncsense(int whichifc) -{ - ulong ncsense = 0; - ulong ifc_shift_offset = (whichifc & 0xFFF) << 4; - - - ((uchar *)&ncsense)[3] = *(NIC_NCSENSE+ifc_shift_offset+0); - ((uchar *)&ncsense)[2] = *(NIC_NCSENSE+ifc_shift_offset+1); - ((uchar *)&ncsense)[1] = *(NIC_NCSENSE+ifc_shift_offset+2); - ((uchar *)&ncsense)[0] = *(NIC_NCSENSE+ifc_shift_offset+3); - - - return ncsense; -} - -ulong -devnet_getspeed(int whichifc) -{ - ulong speed = 0; - ulong ifc_shift_offset = (whichifc & 0xFFF) << 4; - - - ((uchar *)&speed)[3] = *(NIC_BRR+ifc_shift_offset+0); - ((uchar *)&speed)[2] = *(NIC_BRR+ifc_shift_offset+1); - ((uchar *)&speed)[1] = *(NIC_BRR+ifc_shift_offset+2); - ((uchar *)&speed)[0] = *(NIC_BRR+ifc_shift_offset+3); - - return speed; -} - -int -devnet_xmit(uchar *dst, uchar proto, uchar *data, int nbytes, int whichifc) -{ - int framesize; - int n = 0, i; - uchar *tptr; - ulong ifc_shift_offset = (whichifc & 0xFFF) << 4; - ulong savedSR; - - -//@@printf("in devnet_xmit, sending [%d] bytes to [%s], proto [%d], via ifc [%d]\n", nbytes, dst, proto, whichifc); - - /* Save SR, then disable intrs: */ - savedSR = getpsr(); - splhi(); - - - /* Save the dst for future use */ - for (i = 0; i < 16; i++) - { - *(NIC_DST+ifc_shift_offset+i) = *(dst+i); - } - - /* Write 16 byte src_addr */ - for (i = 0; i < 16; i++) - { - *(NIC_TDR+ifc_shift_offset) = *(NIC_OUI+i); - } - n += 16; - - /* Write 16 byte dst_addr */ - for (i = 0; i < 16; i++) - { - *(NIC_TDR+ifc_shift_offset) = *(dst+i); -//printf("devnet_xmit(), *(dst+i) = [%d]\n", *(dst+i)); - } - n += 16; - - /* Write 4 byte payloadlen */ - *(NIC_TDR+ifc_shift_offset) = (nbytes>>24)&0xFF; - *(NIC_TDR+ifc_shift_offset) = (nbytes>>16)&0xFF; - *(NIC_TDR+ifc_shift_offset) = (nbytes>>8)&0xFF; - *(NIC_TDR+ifc_shift_offset) = (nbytes>>0)&0xFF; - n += 4; - - /* Write 1 byte nexthdr */ - *(NIC_TDR+ifc_shift_offset) = proto; - n += 1; - - - /* */ - /* The 32 bit cksum added by hw */ - /* is not counted as part of fsz */ - /* */ - framesize = devnet_getmaxfsz(whichifc); - - - /* Write data */ - tptr = data; - for (i = 0; (i < nbytes) && (n < framesize); i++) - { - *(NIC_TDR+ifc_shift_offset) = *tptr++; - n++; - } - - /* if nbytes+header size was more than a frame, recurse */ - if (nbytes+16+16+4+1 > framesize) - { - print("Warning!!! devnet_xmit recursing: nbytes+header = %d, framesize = %d\n", nbytes+16+16+4+1, framesize); - devnet_xmit(dst, proto, tptr, nbytes - i, whichifc); - } - else while (n < framesize) - { - /* Send padding */ - *(NIC_TDR+ifc_shift_offset) = 0; - n++; - } - - - - /* Restore SR */ - spldone(savedSR); - - - /* */ - /* If frame could'nt be sent, LSB */ - /* of NIC_NSR will be 1, return -1 */ - /* */ - return -((*(NIC_NSR+ifc_shift_offset)) & 0x1); -} - -void -devnet_recv(uchar *recvbuf, int nbytes, int whichifc) -{ - int i; - ulong ifc_shift_offset = (whichifc & 0xFFF) << 4; - - - for (i = 0; i < nbytes; i++) - { - *recvbuf++ = *(NIC_RDR+ifc_shift_offset); - } - - return; -} - -int -devnet_ctl(int cmd, int val, int whichifc) -{ - ulong ifc_shift_offset = (whichifc & 0xFFF) << 4; - - - if (cmd == NIC_NCR_WRITE) - { - *(NIC_NCR+ifc_shift_offset) = val; - } - else if (cmd == NIC_NCR_READ) - { - return *(NIC_NCR+ifc_shift_offset); - } - - - return -1; -} diff --git a/benchmarks/source/superh/port/devnet.h b/benchmarks/source/superh/port/devnet.h deleted file mode 100644 index 48f1e320..00000000 --- a/benchmarks/source/superh/port/devnet.h +++ /dev/null @@ -1,11 +0,0 @@ -int devnet_xmit(uchar *dst, uchar proto, uchar *data, int nbytes, int whichifc); -void devnet_recv(uchar *recvbuf, int nbytes, int whichifc); -ulong devnet_getrxfsz(int whichifc); -ulong devnet_getmaxfsz(int whichifc); -ulong devnet_getncr(int whichifc); -ulong devnet_getspeed(int whichifc); -int devnet_ctl(int cmd, int val, int whichifc); -void devnet_framedelay(int nframes, int whichifc); -ulong devnet_getncolls(int whichifc); -ulong devnet_getncsense(int whichifc); -int devnet_getcurifc(void); diff --git a/benchmarks/source/superh/port/devrand.c b/benchmarks/source/superh/port/devrand.c deleted file mode 100644 index 8eb64188..00000000 --- a/benchmarks/source/superh/port/devrand.c +++ /dev/null @@ -1,23 +0,0 @@ -#include "e-types.h" -#include "tag.h" -#include "devsim7708.h" -#include "sh7708.h" - -ulong -devrand_getrand(void) -{ - ulong rand = 0; - - ((uchar *)&rand)[3] = *(RANDDR+0); - ((uchar *)&rand)[2] = *(RANDDR+1); - ((uchar *)&rand)[1] = *(RANDDR+2); - ((uchar *)&rand)[0] = *(RANDDR+3); - - return rand; -} - -void -devrand_seed(ulong seed) -{ - return; -} diff --git a/benchmarks/source/superh/port/devrand.h b/benchmarks/source/superh/port/devrand.h deleted file mode 100644 index b9194d44..00000000 --- a/benchmarks/source/superh/port/devrand.h +++ /dev/null @@ -1,2 +0,0 @@ -ulong devrand_getrand(void); -void devrand_seed(ulong seed); diff --git a/benchmarks/source/superh/port/devrtc.c b/benchmarks/source/superh/port/devrtc.c deleted file mode 100644 index 52f87bd5..00000000 --- a/benchmarks/source/superh/port/devrtc.c +++ /dev/null @@ -1,16 +0,0 @@ -#include "e-types.h" -#include "devsim7708.h" -#include "sh7708.h" - -ulong -devrtc_getusecs(void) -{ - ulong usecs = 0; - - ((uchar *)&usecs)[3] = *(SF_SECS+0); - ((uchar *)&usecs)[2] = *(SF_SECS+1); - ((uchar *)&usecs)[1] = *(SF_SECS+2); - ((uchar *)&usecs)[0] = *(SF_SECS+3); - - return usecs; -} diff --git a/benchmarks/source/superh/port/devrtc.h b/benchmarks/source/superh/port/devrtc.h deleted file mode 100644 index 7814b174..00000000 --- a/benchmarks/source/superh/port/devrtc.h +++ /dev/null @@ -1 +0,0 @@ -ulong devrtc_getusecs(void); diff --git a/benchmarks/source/superh/port/devsensor.c b/benchmarks/source/superh/port/devsensor.c deleted file mode 100644 index b12b3e74..00000000 --- a/benchmarks/source/superh/port/devsensor.c +++ /dev/null @@ -1,18 +0,0 @@ -#include "e-types.h" -#include "tag.h" -#include "devsim7708.h" -#include "sh7708.h" -#include - -double -devsignal_read(int which) -{ - ulong sensor_shift_offset = (which & 0xFFF) << 2; - return *(SENSOR_READ + sensor_shift_offset); -} - -void -devsignal_write(double value) -{ - return; -} diff --git a/benchmarks/source/superh/port/devsensor.h b/benchmarks/source/superh/port/devsensor.h deleted file mode 100644 index 78d0535c..00000000 --- a/benchmarks/source/superh/port/devsensor.h +++ /dev/null @@ -1,2 +0,0 @@ -double devsignal_read(int which); -void devsignal_write(double value); diff --git a/benchmarks/source/superh/port/logmarkers.h b/benchmarks/source/superh/port/logmarkers.h deleted file mode 100644 index 62e0dc2b..00000000 --- a/benchmarks/source/superh/port/logmarkers.h +++ /dev/null @@ -1,4 +0,0 @@ -/* For 32 log markers, make sure the marker is <= 1<<5 */ -#define LOGMARK(n) (*((volatile unsigned char *)0xefeeffa5 + (n & 0x1F)) = 0) - -#define NETTRACEMARK(n) (*((volatile unsigned char *)0xefeeff85 + (n & 0x1F)) = 0) diff --git a/benchmarks/source/superh/port/misc.c b/benchmarks/source/superh/port/misc.c deleted file mode 100644 index 55c5090c..00000000 --- a/benchmarks/source/superh/port/misc.c +++ /dev/null @@ -1,65 +0,0 @@ -#include "e-types.h" -#include "tag.h" -#include "devsim7708.h" -#include "devscc.h" -#include "sh7708.h" -#include "devrtc.h" -#include "misc.h" - -#define CALIBRATE 8 /* Calibrated to give you ~correct delay @ 60MHz */ - -/* Needed by print */ -void -sccputc(int device, uchar ch) -{ - while (!(*SCC_SCSSR & TX_RDY)); - - *SCC_SCTDR = ch; - *SCC_SCSSR &= TX_CLR; - - return; -} - -/* Needed by lprint */ -void -devlogprintputc(int device, uchar ch) -{ - *DEVLOGPRINT = ch; - - return; -} - -void -xudelay(ulong usecs) -{ - volatile int max, i; - - max = CALIBRATE*usecs; - for (i = 0; i < max; i++) - { - } -} - -void -xusleep(ulong usecs) -{ - ulong time = devrtc_getusecs(); - - while ((devrtc_getusecs() - time) < usecs) - { - sleep(); - } -} - -int -pow10(int y) -{ - int i, ret = 1; - - for (i = 0; i < y; i++) - { - ret *= 10; - } - - return ret; -} diff --git a/benchmarks/source/superh/port/misc.h b/benchmarks/source/superh/port/misc.h deleted file mode 100644 index 5171c048..00000000 --- a/benchmarks/source/superh/port/misc.h +++ /dev/null @@ -1,7 +0,0 @@ -#define min(a, b) ((a) < (b) ? (a) : (b)) -#define max(a, b) ((a) > (b) ? (a) : (b)) - -void xudelay(ulong); -int pow10(int y); -extern void sleep(void); -void xusleep(ulong); diff --git a/benchmarks/source/superh/swradio/swradio-demod/Makefile b/benchmarks/source/superh/swradio/swradio-demod/Makefile index b11b7b73..8a096f19 100755 --- a/benchmarks/source/superh/swradio/swradio-demod/Makefile +++ b/benchmarks/source/superh/swradio/swradio-demod/Makefile @@ -8,7 +8,7 @@ TARGET-ARCH = sh-elf PROGRAM = swradiodemod LIBOS = eOS -PORT = ../../port +PORT = ../../../port INCLUDEDIR = $(TREEROOT)/sys/include TOOLSLIB = $(TREEROOT)/tools/tools-lib INCLUDES = -I$(INCLUDEDIR) -I../ -I../../port -I$(TREEROOT)/sys/libOS/port -I$(TREEROOT)/sys/kern/superH -I$(TREEROOT)/sim diff --git a/benchmarks/source/superh/swradio/swradio-eq/Makefile b/benchmarks/source/superh/swradio/swradio-eq/Makefile index d926263d..b4fdcee2 100755 --- a/benchmarks/source/superh/swradio/swradio-eq/Makefile +++ b/benchmarks/source/superh/swradio/swradio-eq/Makefile @@ -8,7 +8,7 @@ TARGET-ARCH = sh-elf PROGRAM = swradioeq LIBOS = eOS -PORT = ../../port +PORT = ../../../port INCLUDEDIR = $(TREEROOT)/sys/include TOOLSLIB = $(TREEROOT)/tools/tools-lib INCLUDES = -I$(INCLUDEDIR) -I../ -I../../port -I$(TREEROOT)/sys/libOS/port -I$(TREEROOT)/sys/kern/superH -I$(TREEROOT)/sim diff --git a/benchmarks/source/superh/swradio/swradio-lpf/Makefile b/benchmarks/source/superh/swradio/swradio-lpf/Makefile index 4839eee1..5db7d5b8 100755 --- a/benchmarks/source/superh/swradio/swradio-lpf/Makefile +++ b/benchmarks/source/superh/swradio/swradio-lpf/Makefile @@ -8,7 +8,7 @@ TARGET-ARCH = sh-elf PROGRAM = swradiolpf LIBOS = eOS -PORT = ../../port +PORT = ../../../port INCLUDEDIR = $(TREEROOT)/sys/include TOOLSLIB = $(TREEROOT)/tools/tools-lib INCLUDES = -I$(INCLUDEDIR) -I../ -I../../port -I$(TREEROOT)/sys/libOS/port -I$(TREEROOT)/sys/kern/superH -I$(TREEROOT)/sim diff --git a/benchmarks/source/superh/swradio/swradio-sink/Makefile b/benchmarks/source/superh/swradio/swradio-sink/Makefile index 7ad615af..452540dc 100755 --- a/benchmarks/source/superh/swradio/swradio-sink/Makefile +++ b/benchmarks/source/superh/swradio/swradio-sink/Makefile @@ -9,7 +9,7 @@ PROGRAM = swradiosink LIBOS1 = mOS LIBOS2 = eOS -PORT = ../../port +PORT = ../../../port INCLUDEDIR = $(TREEROOT)/sys/include TOOLSLIB = $(TREEROOT)/tools/tools-lib INCLUDES = -I$(INCLUDEDIR) -I../ -I../../port -I$(TREEROOT)/sys/libOS/port -I$(TREEROOT)/sys/kern/superH -I$(TREEROOT)/sim diff --git a/benchmarks/source/superh/swradio/swradio-source/Makefile b/benchmarks/source/superh/swradio/swradio-source/Makefile index c72ba3d5..a4e00731 100755 --- a/benchmarks/source/superh/swradio/swradio-source/Makefile +++ b/benchmarks/source/superh/swradio/swradio-source/Makefile @@ -8,7 +8,7 @@ TARGET-ARCH = sh-elf PROGRAM = swradiosource LIBOS = eOS -PORT = ../../port +PORT = ../../../port INCLUDEDIR = $(TREEROOT)/sys/include TOOLSLIB = $(TREEROOT)/tools/tools-lib INCLUDES = -I$(INCLUDEDIR) -I../ -I../../port -I$(TREEROOT)/sys/libOS/port -I$(TREEROOT)/sys/kern/superH -I$(TREEROOT)/sim From 93389cf0db2ce56878b1850c24fbae9f7e69e453 Mon Sep 17 00:00:00 2001 From: JamesTimothyMeech Date: Fri, 18 Dec 2020 17:46:51 +0000 Subject: [PATCH 06/27] Fixed references to .h files in swradiolpf --- .../superh/swradio/swradio-lpf/swradiolpf.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/benchmarks/source/superh/swradio/swradio-lpf/swradiolpf.c b/benchmarks/source/superh/swradio/swradio-lpf/swradiolpf.c index a56c54e3..c3aae9dd 100755 --- a/benchmarks/source/superh/swradio/swradio-lpf/swradiolpf.c +++ b/benchmarks/source/superh/swradio/swradio-lpf/swradiolpf.c @@ -12,14 +12,15 @@ #include "devsim7708.h" #include "sh7708.h" #include "devscc.h" -#include "devnet.h" -#include "devrand.h" -#include "devrtc.h" -#include "devloc.h" -#include "devlog.h" -#include "devexcp.h" +#include "../../port/devnet.h" +#include "../../port/devrand.h" +#include "../../port/devrtc.h" +#include "../../port/devloc.h" +#include "../../port/devlog.h" +#include "../../port/devexcp.h" +#include "../../port/superHspecific.h" #include "print.h" -#include "misc.h" +#include "../../port/misc.h" #include "fault.h" #include "physics.h" #include "interrupts-hitachi-sh.h" @@ -45,7 +46,7 @@ extern uchar* strncpy(uchar *s1, uchar *s2, ulong n); extern void* memmove(void *, void *, long); -void +int main(void) { /* Monitor code is @ 0x8001000 */ @@ -160,7 +161,7 @@ main(void) fptr(); - return; + return 0; } From 0cb88d2ed9173f0886b84ff80aada9bdb67bc3e9 Mon Sep 17 00:00:00 2001 From: JamesTimothyMeech Date: Fri, 18 Dec 2020 17:51:47 +0000 Subject: [PATCH 07/27] Fixed references to .h files in swradio-demod --- .../swradio/swradio-demod/swradiodemod.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/benchmarks/source/superh/swradio/swradio-demod/swradiodemod.c b/benchmarks/source/superh/swradio/swradio-demod/swradiodemod.c index f99a5dfd..4a98b94d 100755 --- a/benchmarks/source/superh/swradio/swradio-demod/swradiodemod.c +++ b/benchmarks/source/superh/swradio/swradio-demod/swradiodemod.c @@ -12,14 +12,15 @@ #include "devsim7708.h" #include "sh7708.h" #include "devscc.h" -#include "devnet.h" -#include "devrand.h" -#include "devrtc.h" -#include "devloc.h" -#include "devlog.h" -#include "devexcp.h" +#include "../../port/devnet.h" +#include "../../port/devrand.h" +#include "../../port/devrtc.h" +#include "../../port/devloc.h" +#include "../../port/devlog.h" +#include "../../port/devexcp.h" +#include "../../port/superHspecific.h" #include "print.h" -#include "misc.h" +#include "../../port/misc.h" #include "fault.h" #include "physics.h" #include "interrupts-hitachi-sh.h" @@ -45,7 +46,7 @@ extern uchar* strncpy(uchar *s1, uchar *s2, ulong n); extern void* memmove(void *, void *, long); -void +int main(void) { void (*fptr)() = (void *)0x8001000; @@ -134,7 +135,7 @@ main(void) fptr(); - return; + return 0; } From 11e52de372fd19ee45f9c2a5f178275689e5a9c6 Mon Sep 17 00:00:00 2001 From: JamesTimothyMeech Date: Fri, 18 Dec 2020 17:55:31 +0000 Subject: [PATCH 08/27] Fixed .h references in swradio-eq --- .../source/superh/swradio/swradio-eq/swradioeq.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/benchmarks/source/superh/swradio/swradio-eq/swradioeq.c b/benchmarks/source/superh/swradio/swradio-eq/swradioeq.c index 50eacbed..454adbe9 100755 --- a/benchmarks/source/superh/swradio/swradio-eq/swradioeq.c +++ b/benchmarks/source/superh/swradio/swradio-eq/swradioeq.c @@ -12,14 +12,15 @@ #include "devsim7708.h" #include "sh7708.h" #include "devscc.h" -#include "devnet.h" -#include "devrand.h" -#include "devrtc.h" -#include "devloc.h" -#include "devlog.h" -#include "devexcp.h" +#include "../../port/devnet.h" +#include "../../port/devrand.h" +#include "../../port/devrtc.h" +#include "../../port/devloc.h" +#include "../../port/devlog.h" +#include "../../port/devexcp.h" +#include "../../port/superHspecific.h" #include "print.h" -#include "misc.h" +#include "../../port/misc.h" #include "fault.h" #include "physics.h" #include "interrupts-hitachi-sh.h" From ab2b4395691242a1c12fbe5f01d73dd2cc75f985 Mon Sep 17 00:00:00 2001 From: JamesTimothyMeech Date: Fri, 18 Dec 2020 18:24:52 +0000 Subject: [PATCH 09/27] Migrated swradio --- benchmarks/source/port/superHspecific.c | 1 + .../superh/swradio/swradio-eq/swradioeq.c | 18 +++++++++--------- .../superh/swradio/swradio-sink/swradiosink.c | 15 ++++++++------- .../superh/swradio/swradio-source/Makefile | 4 ++++ .../source/superh/swradio/swradio-source/asm.h | 2 +- .../swradio/swradio-source/swradiosource.c | 15 ++++++++------- 6 files changed, 31 insertions(+), 24 deletions(-) diff --git a/benchmarks/source/port/superHspecific.c b/benchmarks/source/port/superHspecific.c index da694aa4..1fdcae8f 100644 --- a/benchmarks/source/port/superHspecific.c +++ b/benchmarks/source/port/superHspecific.c @@ -4,6 +4,7 @@ #include "devscc.h" #include "sh7708.h" #include "devrtc.h" +#include "misc.h" void xusleep(ulong usecs) diff --git a/benchmarks/source/superh/swradio/swradio-eq/swradioeq.c b/benchmarks/source/superh/swradio/swradio-eq/swradioeq.c index 454adbe9..19ec287c 100755 --- a/benchmarks/source/superh/swradio/swradio-eq/swradioeq.c +++ b/benchmarks/source/superh/swradio/swradio-eq/swradioeq.c @@ -12,13 +12,13 @@ #include "devsim7708.h" #include "sh7708.h" #include "devscc.h" -#include "../../port/devnet.h" -#include "../../port/devrand.h" -#include "../../port/devrtc.h" -#include "../../port/devloc.h" -#include "../../port/devlog.h" -#include "../../port/devexcp.h" -#include "../../port/superHspecific.h" +#include "../../../port/devnet.h" +#include "../../../port/devrand.h" +#include "../../../port/devrtc.h" +#include "../../../port/devloc.h" +#include "../../../port/devlog.h" +#include "../../../port/devexcp.h" +#include "../../../port/superHspecific.h" #include "print.h" #include "../../port/misc.h" #include "fault.h" @@ -61,7 +61,7 @@ float eq_cutoffs[EQUALIZER_BANDS + 1] = 1760.00 }; -void +int main(void) { /* Monitor code is @ 0x8001000 */ @@ -141,7 +141,7 @@ main(void) fptr(); - return; + return 0; } void diff --git a/benchmarks/source/superh/swradio/swradio-sink/swradiosink.c b/benchmarks/source/superh/swradio/swradio-sink/swradiosink.c index b2c6e523..3210e05a 100755 --- a/benchmarks/source/superh/swradio/swradio-sink/swradiosink.c +++ b/benchmarks/source/superh/swradio/swradio-sink/swradiosink.c @@ -12,11 +12,12 @@ #include "devsim7708.h" #include "sh7708.h" #include "devscc.h" -#include "devnet.h" -#include "devrtc.h" -#include "devexcp.h" -#include "devlog.h" -#include "misc.h" +#include "../../../port/devnet.h" +#include "../../../port/devrtc.h" +#include "../../../port/devexcp.h" +#include "../../../port/devlog.h" +#include "../../../port/misc.h" +#include "../../../port/superHspecific.h" #include "fault.h" #include "physics.h" #include "interrupts-hitachi-sh.h" @@ -51,7 +52,7 @@ extern void* memmove(void *, void *, long); -void +int main(void) { void (*fptr)() = (void *)0x8001000; @@ -97,7 +98,7 @@ main(void) - return; + return 0; } diff --git a/benchmarks/source/superh/swradio/swradio-source/Makefile b/benchmarks/source/superh/swradio/swradio-source/Makefile index a4e00731..72b0e85a 100755 --- a/benchmarks/source/superh/swradio/swradio-source/Makefile +++ b/benchmarks/source/superh/swradio/swradio-source/Makefile @@ -22,6 +22,7 @@ OBJS =\ devrtc.o\ devexcp.o\ misc.o\ + superHspecific.o\ $(PROGRAM).o\ swradio-common.o\ @@ -58,6 +59,9 @@ devlog.o: $(PORT)/devlog.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 $@ diff --git a/benchmarks/source/superh/swradio/swradio-source/asm.h b/benchmarks/source/superh/swradio/swradio-source/asm.h index 654604ac..cf4d7534 100755 --- a/benchmarks/source/superh/swradio/swradio-source/asm.h +++ b/benchmarks/source/superh/swradio/swradio-source/asm.h @@ -1 +1 @@ -#define MOVL MOV.L \ No newline at end of file +#define MOVL MOV.L diff --git a/benchmarks/source/superh/swradio/swradio-source/swradiosource.c b/benchmarks/source/superh/swradio/swradio-source/swradiosource.c index dfada8a8..b70468f1 100755 --- a/benchmarks/source/superh/swradio/swradio-source/swradiosource.c +++ b/benchmarks/source/superh/swradio/swradio-source/swradiosource.c @@ -11,11 +11,12 @@ #include "devsim7708.h" #include "sh7708.h" #include "devscc.h" -#include "devnet.h" -#include "devrtc.h" -#include "devexcp.h" -#include "devlog.h" -#include "misc.h" +#include "../../../port/devnet.h" +#include "../../../port/devrtc.h" +#include "../../../port/devexcp.h" +#include "../../../port/devlog.h" +#include "../../../port/misc.h" +#include "../../../port/superHspecific.h" #include "fault.h" #include "physics.h" #include "interrupts-hitachi-sh.h" @@ -49,7 +50,7 @@ enum }; -void +int main(void) { FloatBuffer fb1; @@ -177,7 +178,7 @@ main(void) } - return; + return 0; } From c8db3f6102bbc077872edd504be346340555bd02 Mon Sep 17 00:00:00 2001 From: JamesTimothyMeech Date: Fri, 18 Dec 2020 18:33:49 +0000 Subject: [PATCH 10/27] Fixed Schlieren after breaking by moving port --- benchmarks/source/superh/Schlieren/Makefile | 2 +- .../source/superh/Schlieren/virtualSensorExample.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/benchmarks/source/superh/Schlieren/Makefile b/benchmarks/source/superh/Schlieren/Makefile index 9b59cb9f..e9afcc0d 100644 --- a/benchmarks/source/superh/Schlieren/Makefile +++ b/benchmarks/source/superh/Schlieren/Makefile @@ -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 diff --git a/benchmarks/source/superh/Schlieren/virtualSensorExample.c b/benchmarks/source/superh/Schlieren/virtualSensorExample.c index 00ff9fa3..d049c944 100644 --- a/benchmarks/source/superh/Schlieren/virtualSensorExample.c +++ b/benchmarks/source/superh/Schlieren/virtualSensorExample.c @@ -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 From e5af37ba6db011b6ea9981eeec91c33d6603fe5b Mon Sep 17 00:00:00 2001 From: JamesTimothyMeech Date: Fri, 18 Dec 2020 18:43:55 +0000 Subject: [PATCH 11/27] Fixed bubblesort after moving port --- benchmarks/source/superh/bubblesort/Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/benchmarks/source/superh/bubblesort/Makefile b/benchmarks/source/superh/bubblesort/Makefile index 8d1f35dc..6ead3255 100755 --- a/benchmarks/source/superh/bubblesort/Makefile +++ b/benchmarks/source/superh/bubblesort/Makefile @@ -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 $@ From 1b54b8a9c5e6db7cb3e911cdde761b12fb4eb626 Mon Sep 17 00:00:00 2001 From: JamesTimothyMeech Date: Fri, 18 Dec 2020 18:47:47 +0000 Subject: [PATCH 12/27] Fixed ConvolutionFourierTransform after moving port --- .../superh/ConvolutionFourierTransform/Makefile | 2 +- .../virtualSensorExample.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/benchmarks/source/superh/ConvolutionFourierTransform/Makefile b/benchmarks/source/superh/ConvolutionFourierTransform/Makefile index cf90d77c..1294ad86 100644 --- a/benchmarks/source/superh/ConvolutionFourierTransform/Makefile +++ b/benchmarks/source/superh/ConvolutionFourierTransform/Makefile @@ -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 diff --git a/benchmarks/source/superh/ConvolutionFourierTransform/virtualSensorExample.c b/benchmarks/source/superh/ConvolutionFourierTransform/virtualSensorExample.c index fc8c1935..f7562502 100644 --- a/benchmarks/source/superh/ConvolutionFourierTransform/virtualSensorExample.c +++ b/benchmarks/source/superh/ConvolutionFourierTransform/virtualSensorExample.c @@ -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 #include From 715ccff0fbbd0fcb4dc25a26211a7bb6b4e8fd00 Mon Sep 17 00:00:00 2001 From: JamesTimothyMeech Date: Fri, 18 Dec 2020 19:23:18 +0000 Subject: [PATCH 13/27] Fixed fftw after moving port --- benchmarks/source/superh/fftw-3.3alpha1/tests/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmarks/source/superh/fftw-3.3alpha1/tests/Makefile b/benchmarks/source/superh/fftw-3.3alpha1/tests/Makefile index 72597617..af66836a 100644 --- a/benchmarks/source/superh/fftw-3.3alpha1/tests/Makefile +++ b/benchmarks/source/superh/fftw-3.3alpha1/tests/Makefile @@ -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 From e149a6cbde0d22589a7f1810e0d6e0244618820b Mon Sep 17 00:00:00 2001 From: JamesTimothyMeech Date: Fri, 18 Dec 2020 19:25:05 +0000 Subject: [PATCH 14/27] Fixed findTheBugExample after moving port --- benchmarks/source/superh/findTheBugExample/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmarks/source/superh/findTheBugExample/Makefile b/benchmarks/source/superh/findTheBugExample/Makefile index 978153b6..df6c921f 100755 --- a/benchmarks/source/superh/findTheBugExample/Makefile +++ b/benchmarks/source/superh/findTheBugExample/Makefile @@ -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 From 9573721fe90070cb4bfeb2372fb77a5f2a757435 Mon Sep 17 00:00:00 2001 From: JamesTimothyMeech Date: Fri, 18 Dec 2020 19:28:33 +0000 Subject: [PATCH 15/27] Fixed FourierTransform after moving port --- benchmarks/source/superh/FourierTransform/Makefile | 2 +- .../superh/FourierTransform/virtualSensorExample.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/benchmarks/source/superh/FourierTransform/Makefile b/benchmarks/source/superh/FourierTransform/Makefile index cf90d77c..1294ad86 100644 --- a/benchmarks/source/superh/FourierTransform/Makefile +++ b/benchmarks/source/superh/FourierTransform/Makefile @@ -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 diff --git a/benchmarks/source/superh/FourierTransform/virtualSensorExample.c b/benchmarks/source/superh/FourierTransform/virtualSensorExample.c index 6916035a..f7c68092 100644 --- a/benchmarks/source/superh/FourierTransform/virtualSensorExample.c +++ b/benchmarks/source/superh/FourierTransform/virtualSensorExample.c @@ -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 #include From 31c7d3b4e4e2ce68076f4596ec90da2bae59f96b Mon Sep 17 00:00:00 2001 From: JamesTimothyMeech Date: Fri, 18 Dec 2020 19:30:48 +0000 Subject: [PATCH 16/27] Fixed interruptExample after moving port --- benchmarks/source/superh/interruptExample/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmarks/source/superh/interruptExample/Makefile b/benchmarks/source/superh/interruptExample/Makefile index cb8c37cf..1bffaa3e 100755 --- a/benchmarks/source/superh/interruptExample/Makefile +++ b/benchmarks/source/superh/interruptExample/Makefile @@ -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 From 7ae94186cade84c2f4db339182f0ba3828a0c457 Mon Sep 17 00:00:00 2001 From: JamesTimothyMeech Date: Fri, 18 Dec 2020 19:37:47 +0000 Subject: [PATCH 17/27] Fixed pedometerExample after moving port --- benchmarks/source/superh/pedometerExample/Makefile | 2 +- .../superh/pedometerExample/virtualSensorExample.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/benchmarks/source/superh/pedometerExample/Makefile b/benchmarks/source/superh/pedometerExample/Makefile index cf90d77c..1294ad86 100644 --- a/benchmarks/source/superh/pedometerExample/Makefile +++ b/benchmarks/source/superh/pedometerExample/Makefile @@ -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 diff --git a/benchmarks/source/superh/pedometerExample/virtualSensorExample.c b/benchmarks/source/superh/pedometerExample/virtualSensorExample.c index 32e7dd3b..87d6da0a 100644 --- a/benchmarks/source/superh/pedometerExample/virtualSensorExample.c +++ b/benchmarks/source/superh/pedometerExample/virtualSensorExample.c @@ -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}; From dc3b30614ece223c7c6dd089eab81e18d14dbf20 Mon Sep 17 00:00:00 2001 From: JamesTimothyMeech Date: Fri, 18 Dec 2020 19:38:23 +0000 Subject: [PATCH 18/27] Fixed lowPassFilter after moving port --- benchmarks/source/superh/lowPassFilter/Makefile | 2 +- .../superh/lowPassFilter/virtualSensorExample.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/benchmarks/source/superh/lowPassFilter/Makefile b/benchmarks/source/superh/lowPassFilter/Makefile index cf90d77c..1294ad86 100644 --- a/benchmarks/source/superh/lowPassFilter/Makefile +++ b/benchmarks/source/superh/lowPassFilter/Makefile @@ -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 diff --git a/benchmarks/source/superh/lowPassFilter/virtualSensorExample.c b/benchmarks/source/superh/lowPassFilter/virtualSensorExample.c index f35b8f11..231fddac 100644 --- a/benchmarks/source/superh/lowPassFilter/virtualSensorExample.c +++ b/benchmarks/source/superh/lowPassFilter/virtualSensorExample.c @@ -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" /* From 317c550a3d0d032f28a54b4a176d17a1d8506d22 Mon Sep 17 00:00:00 2001 From: JamesTimothyMeech Date: Mon, 21 Dec 2020 16:47:02 +0000 Subject: [PATCH 19/27] DAM+S-MAC+EAR working --- .../superh/sbench/DAM+S-MAC+EAR/Makefile | 7 ++++++- .../source/superh/sbench/DAM+S-MAC+EAR/sink.c | 19 ++++++++++--------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/benchmarks/source/superh/sbench/DAM+S-MAC+EAR/Makefile b/benchmarks/source/superh/sbench/DAM+S-MAC+EAR/Makefile index 37979ec8..e62e01b1 100755 --- a/benchmarks/source/superh/sbench/DAM+S-MAC+EAR/Makefile +++ b/benchmarks/source/superh/sbench/DAM+S-MAC+EAR/Makefile @@ -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 $@ diff --git a/benchmarks/source/superh/sbench/DAM+S-MAC+EAR/sink.c b/benchmarks/source/superh/sbench/DAM+S-MAC+EAR/sink.c index 5ca38509..aaa4dc24 100644 --- a/benchmarks/source/superh/sbench/DAM+S-MAC+EAR/sink.c +++ b/benchmarks/source/superh/sbench/DAM+S-MAC+EAR/sink.c @@ -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" From 7b102bc47ebb06e63d38117c8d91d5ccf413767c Mon Sep 17 00:00:00 2001 From: JamesTimothyMeech Date: Mon, 21 Dec 2020 16:47:58 +0000 Subject: [PATCH 20/27] DAM+S-MAC working --- .../source/superh/sbench/DAM+S-MAC/Makefile | 6 +++++- .../source/superh/sbench/DAM+S-MAC/damv2.c | 17 +++++++++-------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/benchmarks/source/superh/sbench/DAM+S-MAC/Makefile b/benchmarks/source/superh/sbench/DAM+S-MAC/Makefile index 599ba315..f07acc2e 100755 --- a/benchmarks/source/superh/sbench/DAM+S-MAC/Makefile +++ b/benchmarks/source/superh/sbench/DAM+S-MAC/Makefile @@ -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 $@ diff --git a/benchmarks/source/superh/sbench/DAM+S-MAC/damv2.c b/benchmarks/source/superh/sbench/DAM+S-MAC/damv2.c index 16a416a4..c0c31fec 100755 --- a/benchmarks/source/superh/sbench/DAM+S-MAC/damv2.c +++ b/benchmarks/source/superh/sbench/DAM+S-MAC/damv2.c @@ -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" From 78ef52be12f8a450c284ddd84d4921f0ccb2d964 Mon Sep 17 00:00:00 2001 From: JamesTimothyMeech Date: Mon, 21 Dec 2020 16:49:24 +0000 Subject: [PATCH 21/27] Fixed DAM+idealHWMAC+EAR --- .../superh/sbench/DAM+idealHWMAC+EAR/Makefile | 6 +++++- .../superh/sbench/DAM+idealHWMAC+EAR/damv2.c | 17 +++++++++-------- .../superh/sbench/DAM+idealHWMAC+EAR/sink.c | 19 ++++++++++--------- 3 files changed, 24 insertions(+), 18 deletions(-) diff --git a/benchmarks/source/superh/sbench/DAM+idealHWMAC+EAR/Makefile b/benchmarks/source/superh/sbench/DAM+idealHWMAC+EAR/Makefile index ba8c17b7..fc39e88c 100755 --- a/benchmarks/source/superh/sbench/DAM+idealHWMAC+EAR/Makefile +++ b/benchmarks/source/superh/sbench/DAM+idealHWMAC+EAR/Makefile @@ -11,7 +11,7 @@ ROUTE = ear-route ROUTEPATH = ../EAR-route LIBOS = eOS -PORT = ../../port +PORT = ../../../port LIBOS = eOS SIMDIR = $(TREEROOT)/sim TOOLSLIB = $(TREEROOT)/tools/tools-lib @@ -46,6 +46,7 @@ SINKOBJS =\ devloc.o\ devnet.o\ devmac.o\ + superHspecific.o\ $(ROUTE).o\ $(SINK).o\ @@ -103,6 +104,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 $@ diff --git a/benchmarks/source/superh/sbench/DAM+idealHWMAC+EAR/damv2.c b/benchmarks/source/superh/sbench/DAM+idealHWMAC+EAR/damv2.c index b9d646d4..d902affb 100755 --- a/benchmarks/source/superh/sbench/DAM+idealHWMAC+EAR/damv2.c +++ b/benchmarks/source/superh/sbench/DAM+idealHWMAC+EAR/damv2.c @@ -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" diff --git a/benchmarks/source/superh/sbench/DAM+idealHWMAC+EAR/sink.c b/benchmarks/source/superh/sbench/DAM+idealHWMAC+EAR/sink.c index 76332289..60f53ea7 100644 --- a/benchmarks/source/superh/sbench/DAM+idealHWMAC+EAR/sink.c +++ b/benchmarks/source/superh/sbench/DAM+idealHWMAC+EAR/sink.c @@ -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" From da71cc430980087c23f5c7f4764c86667411dfbc Mon Sep 17 00:00:00 2001 From: JamesTimothyMeech Date: Mon, 21 Dec 2020 16:50:03 +0000 Subject: [PATCH 22/27] Fixed S-MAC --- benchmarks/source/superh/sbench/S-MAC/s-mac.c | 1 + 1 file changed, 1 insertion(+) diff --git a/benchmarks/source/superh/sbench/S-MAC/s-mac.c b/benchmarks/source/superh/sbench/S-MAC/s-mac.c index 118c391b..24ab530d 100644 --- a/benchmarks/source/superh/sbench/S-MAC/s-mac.c +++ b/benchmarks/source/superh/sbench/S-MAC/s-mac.c @@ -6,6 +6,7 @@ #include "errors.h" #include "sf-includes.h" #include "s-mac.h" +#include "../../../port/superHspecific.h" /* */ /* A (portable?) S-MAC implementation */ From 3d0578ce7db71dcad72cf8d80b70fa556518caad Mon Sep 17 00:00:00 2001 From: JamesTimothyMeech Date: Mon, 21 Dec 2020 17:21:01 +0000 Subject: [PATCH 23/27] Edited some things in PARC-damv2.c --- .../source/superh/sbench/PARC-damv2/Makefile | 6 +++++- .../source/superh/sbench/PARC-damv2/damv2.c | 15 ++++++++------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/benchmarks/source/superh/sbench/PARC-damv2/Makefile b/benchmarks/source/superh/sbench/PARC-damv2/Makefile index 2c670132..b13db9e9 100755 --- a/benchmarks/source/superh/sbench/PARC-damv2/Makefile +++ b/benchmarks/source/superh/sbench/PARC-damv2/Makefile @@ -8,7 +8,7 @@ TARGET-ARCH = sh-elf PROGRAM = damv2 LIBOS = eOS -PORT = ../../port +PORT = ../../../port LIBOS = eOS SIMDIR = $(TREEROOT)/sim TOOLSLIB = $(TREEROOT)/tools/tools-lib @@ -26,6 +26,7 @@ OBJS =\ misc.o\ devsensor.o\ devloc.o\ + superHspecific.o\ $(PROGRAM).o\ @@ -64,6 +65,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 $@ diff --git a/benchmarks/source/superh/sbench/PARC-damv2/damv2.c b/benchmarks/source/superh/sbench/PARC-damv2/damv2.c index 1d7e7de5..ace744a1 100755 --- a/benchmarks/source/superh/sbench/PARC-damv2/damv2.c +++ b/benchmarks/source/superh/sbench/PARC-damv2/damv2.c @@ -23,13 +23,14 @@ #include "devsim7708.h" #include "sh7708.h" #include "devscc.h" -#include "devnet.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/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" From cf18b845c69e27f4ef131ebf61aae64eb248d2b4 Mon Sep 17 00:00:00 2001 From: JamesTimothyMeech Date: Tue, 22 Dec 2020 18:30:23 +0000 Subject: [PATCH 24/27] Fixed PARC-damv2 --- benchmarks/source/superh/sbench/PARC-damv2/test.m | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/benchmarks/source/superh/sbench/PARC-damv2/test.m b/benchmarks/source/superh/sbench/PARC-damv2/test.m index b1807a0f..ac588c08 100755 --- a/benchmarks/source/superh/sbench/PARC-damv2/test.m +++ b/benchmarks/source/superh/sbench/PARC-damv2/test.m @@ -31,14 +31,14 @@ -- With 400 samples in locdata, total distance of 40in, and trajectoryrate of 100, -- trajectory speed is 0.254 m/s (0.5681 mph = 0.8333 ft/s) -- -sigsrc 0 "Gaussian lightsource 1" 0.0 0.0 0.0 0.0 0.0 0.0 0.997356 -0.5 0.0 0.0 0.0 2.71828 0.0 0.0 0.0 0.0 2.0 0.0 0.0 0.0 "dam.locdata.1" 100 0.0 0.0 0.0 1 " " 0 1000.0 1 +sigsrc 0 "Gaussian lightsource 1" 0.0 0.0 0.0 0.0 0.0 0.0 0.997356 -0.5 0.0 0.0 0.0 2.71828 0.0 0.0 0.0 0.0 2.0 0.0 0.0 0.0 "dam.locdata.1" 100 0.0 0.0 0.0 1 " " 0 1000.0 1 1 -sigsrc 0 "Gaussian lightsource 2" 0.0 0.0 0.0 0.0 0.0 0.0 0.997356 -0.5 0.0 0.0 0.0 2.71828 0.0 0.0 0.0 0.0 2.0 0.0 0.0 0.0 "dam.locdata.2" 100 0.0 0.0 0.0 1 " " 0 1000.0 1 +sigsrc 0 "Gaussian lightsource 2" 0.0 0.0 0.0 0.0 0.0 0.0 0.997356 -0.5 0.0 0.0 0.0 2.71828 0.0 0.0 0.0 0.0 2.0 0.0 0.0 0.0 "dam.locdata.2" 100 0.0 0.0 0.0 1 " " 0 1000.0 1 1 -- -- Signal source 2. Ambient light at 0.1 Lux -- -sigsrc 0 "Ambient light" 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 " " 0 0.0 0.0 0.0 1 " " 0 0.1 1 +sigsrc 0 "Ambient light" 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 " " 0 0.0 0.0 0.0 1 " " 0 0.1 1 1 @@ -51,12 +51,12 @@ -- we use a Ricean model for the RF propagation, w/ received Pr = K/d^n, n = 2 -- We set ambient RF noise at 1/100 of the Peak radio power. -- -sigsrc 1 "Radio propagation model" 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -2.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 " " 0 0.0 0.0 0.0 1 " " 0 0.0 1 +sigsrc 1 "Radio propagation model" 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -2.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 " " 0 0.0 0.0 0.0 1 " " 0 0.0 1 1 -- Signal source 4 -- We set ambient RF sig strength to equal 1/10 strength of 89.1mW -- radio at sqrt(10^2+10^2)=14.14 units, and set minsnr to 9 (9 < 10) -sigsrc 1 "Ambient RF noise" 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 " " 0 0.0 0.0 0.0 1 " " 0 0.00004455 1 +sigsrc 1 "Ambient RF noise" 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 " " 0 0.0 0.0 0.0 1 " " 0 0.00004455 1 1 -- From 7a2f4f15f623e2271911149c1500dc401612a17d Mon Sep 17 00:00:00 2001 From: JamesTimothyMeech Date: Tue, 22 Dec 2020 18:42:30 +0000 Subject: [PATCH 25/27] DAM+Sift working after moving port --- benchmarks/source/superh/sbench/DAM+Sift/Makefile | 6 +++++- benchmarks/source/superh/sbench/DAM+Sift/damv2.c | 13 +++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/benchmarks/source/superh/sbench/DAM+Sift/Makefile b/benchmarks/source/superh/sbench/DAM+Sift/Makefile index 23c1eb8c..c04c06fe 100755 --- a/benchmarks/source/superh/sbench/DAM+Sift/Makefile +++ b/benchmarks/source/superh/sbench/DAM+Sift/Makefile @@ -10,7 +10,7 @@ MAC = sift-mac MACPATH = ../Sift-MAC LIBOS = eOS -PORT = ../../port +PORT = ../../../port LIBOS = eOS SIMDIR = $(TREEROOT)/sim TOOLSLIB = $(TREEROOT)/tools/tools-lib @@ -29,6 +29,7 @@ OBJS =\ devsensor.o\ devloc.o\ devmac.o\ + superHspecific.o\ $(MAC).o\ $(PROGRAM).o\ @@ -74,6 +75,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 $@ diff --git a/benchmarks/source/superh/sbench/DAM+Sift/damv2.c b/benchmarks/source/superh/sbench/DAM+Sift/damv2.c index 50810eb4..464328ac 100755 --- a/benchmarks/source/superh/sbench/DAM+Sift/damv2.c +++ b/benchmarks/source/superh/sbench/DAM+Sift/damv2.c @@ -23,12 +23,13 @@ #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 "../../../port/superHspecific.h" #include "fault.h" #include "physics.h" #include "interrupts-hitachi-sh.h" From c7b868cc1d5137c32e66a71b61f94ac357b211ed Mon Sep 17 00:00:00 2001 From: JamesTimothyMeech Date: Tue, 22 Dec 2020 18:55:46 +0000 Subject: [PATCH 26/27] DAM+Sift+EAR fixed after moving port --- benchmarks/source/port/superHspecific.c | 3 --- .../superh/sbench/DAM+Sift+EAR/Makefile | 6 +++++- .../source/superh/sbench/DAM+Sift+EAR/sink.c | 19 ++++++++++--------- 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/benchmarks/source/port/superHspecific.c b/benchmarks/source/port/superHspecific.c index 1fdcae8f..7e984e7a 100644 --- a/benchmarks/source/port/superHspecific.c +++ b/benchmarks/source/port/superHspecific.c @@ -1,7 +1,4 @@ #include "e-types.h" -#include "tag.h" -#include "devsim7708.h" -#include "devscc.h" #include "sh7708.h" #include "devrtc.h" #include "misc.h" diff --git a/benchmarks/source/superh/sbench/DAM+Sift+EAR/Makefile b/benchmarks/source/superh/sbench/DAM+Sift+EAR/Makefile index ef22a7ec..44e2bccd 100755 --- a/benchmarks/source/superh/sbench/DAM+Sift+EAR/Makefile +++ b/benchmarks/source/superh/sbench/DAM+Sift+EAR/Makefile @@ -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 $@ diff --git a/benchmarks/source/superh/sbench/DAM+Sift+EAR/sink.c b/benchmarks/source/superh/sbench/DAM+Sift+EAR/sink.c index 04e7df34..a084476d 100644 --- a/benchmarks/source/superh/sbench/DAM+Sift+EAR/sink.c +++ b/benchmarks/source/superh/sbench/DAM+Sift+EAR/sink.c @@ -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.c" #include "fault.h" #include "physics.h" #include "interrupts-hitachi-sh.h" From 9194490c2bf14da1ea5ccf29a5cb5c67e210b66c Mon Sep 17 00:00:00 2001 From: JamesTimothyMeech Date: Tue, 22 Dec 2020 20:29:38 +0000 Subject: [PATCH 27/27] Last few fixes for superH after moving port --- benchmarks/source/superh/sbench/DAM+idealHWMAC+EAR/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/benchmarks/source/superh/sbench/DAM+idealHWMAC+EAR/Makefile b/benchmarks/source/superh/sbench/DAM+idealHWMAC+EAR/Makefile index fc39e88c..7a4ea7d6 100755 --- a/benchmarks/source/superh/sbench/DAM+idealHWMAC+EAR/Makefile +++ b/benchmarks/source/superh/sbench/DAM+idealHWMAC+EAR/Makefile @@ -33,6 +33,7 @@ NODEOBJS =\ devloc.o\ devnet.o\ devmac.o\ + superHspecific.o\ $(ROUTE).o\ $(PROGRAM).o\