Skip to content

Commit

Permalink
delete fft
Browse files Browse the repository at this point in the history
  • Loading branch information
YuzukiTsuru committed Mar 11, 2023
1 parent 294d1ca commit 92c0525
Show file tree
Hide file tree
Showing 10 changed files with 1,049 additions and 1,858 deletions.
14 changes: 6 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ DEPFLAGS = -MT $@ -MD -MP -MF $(basename $@).d

APP_NAME = dsp
BUILDDIR = ./build
OUTDIR := $(BUILDDIR)/output
APP := $(OUTDIR)/$(APP_NAME).elf
APP := $(BUILDDIR)/$(APP_NAME).elf

IFLAGS := -I ./include
IFLAGS += -I ./arch
Expand All @@ -47,13 +46,12 @@ CFLAGS += -Wno-unused-variable
LDFLAGS := -nostdlib -Wl,--gc-sections -Wl,--defsym=__prefctl_default=0x144
LDFLAGS += -Wl,--defsym=__memctl_default_post=1
LDFLAGS += -Wl,--abi-windowed
LDFLAGS += -Wl,-Map,$(OUTDIR)/dsp.map
LDFLAGS += -Wl,-Map,$(BUILDDIR)/dsp.map
LDFLAGS += -Wl,--script link.ld

LIBS = -L ./lib/ -lxtutil -lhandler-reset -lc -lgloss -lhal -lm -lgcc -lc

APP_SRC := src/main
APP_SRC += src/fft
APP_SRC += src/msgbox

BENCHMARK_SRC := benchmark/linpack-pc
Expand Down Expand Up @@ -121,12 +119,12 @@ builddir:
$(APP): $(LIB_OBJS)
$(Q)echo [LD] LINKING $@
$(Q)$(CC) $(CFLAGS) $(LDFLAGS) $(LIB_OBJS) $(LIBS) -o $(APP)
$(Q)echo [OD] OBJDUMP $@
$(Q)$(OD) -D $(APP) > $(OUTDIR)/$(APP_NAME).dis
$(Q)echo [RE] READELF $@
$(Q)$(RE) -a $(APP) > $(OUTDIR)/$(APP_NAME).readelf
$(Q)echo [SP] STRIP $@
$(Q)$(SP) -s $(APP)
$(Q)echo [OD] OBJDUMP $@
$(Q)$(OD) -D $(APP) > $(BUILDDIR)/$(APP_NAME).dis
$(Q)echo [RE] READELF $@
$(Q)$(RE) -a $(APP) > $(BUILDDIR)/$(APP_NAME).readelf
$(Q)echo -e '\033[0;31;1m'
$(Q)$(SIZE) $(APP)
$(Q)echo -e '\033[0;32;1m'
Expand Down
152 changes: 75 additions & 77 deletions benchmark/dhry.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
*
* "DHRYSTONE" Benchmark Program
* -----------------------------
*
*
* Version: C, Version 2.1
*
*
* File: dhry.h (part 1 of 3)
*
* Date: May 25, 1988
Expand Down Expand Up @@ -33,12 +33,12 @@
*
* Collection of Results:
* Reinhold Weicker (address see above) and
*
*
* Rick Richardson
* PC Research. Inc.
* 94 Apple Orchard Drive
* Tinton Falls, NJ 07724
* Phone: (201) 389-8963 (9-17 EST)
* Phone: (201) 389-8963 (9-17 EST)
* Usenet: ...!uunet!pcrat!rick
*
* Please send results to Rick Richardson and/or Reinhold Weicker.
Expand Down Expand Up @@ -91,7 +91,7 @@
* version previously distributed by Reinhold Weicker.
*
* At several places in the benchmark, code has been added,
* but within the measurement loop only in branches that
* but within the measurement loop only in branches that
* are not executed. The intention is that optimizing compilers
* should be prevented from moving code out of the measurement
* loop, or from removing code altogether. Since the statements
Expand All @@ -101,7 +101,7 @@
* still hold. Except for sophisticated optimizing compilers,
* execution times for this version should be the same as
* for previous versions.
*
*
* Since it has proven difficult to subtract the time for the
* measurement loop overhead in a correct way, the loop check
* has been made a part of the benchmark. This does have
Expand Down Expand Up @@ -151,7 +151,7 @@
* -DTIME
* The "times" function of UNIX (returning process times)
* or the "time" function (returning wallclock time)
* is used for measurement.
* is used for measurement.
* For single user machines, "time ()" is adequate. For
* multi-user machines where you cannot get single-user
* access, use the "times ()" function. If you have
Expand Down Expand Up @@ -198,23 +198,23 @@
* different from the Ada version.]
*
* The following program contains statements of a high level programming
* language (here: C) in a distribution considered representative:
* language (here: C) in a distribution considered representative:
*
* assignments 52 (51.0 %)
* control statements 33 (32.4 %)
* procedure, function calls 17 (16.7 %)
*
* 103 statements are dynamically executed. The program is balanced with
* respect to the three aspects:
* respect to the three aspects:
*
* - statement type
* - operand type
* - operand locality
* operand global, local, parameter, or constant.
* operand global, local, parameter, or constant.
*
* The combination of these three aspects is balanced only approximately.
* The combination of these three aspects is balanced only approximately.
*
* 1. Statement Type:
* 1. Statement Type:
* ----------------- number
*
* V1 = V2 9
Expand Down Expand Up @@ -258,9 +258,9 @@
* library procedure 1
* X = F (...)
* function call 6
* user function 5
* library function 1
* --
* user function 5
* library function 1
* --
* 17 17
* ---
* 103
Expand All @@ -274,10 +274,10 @@
* number approximate
* percentage
*
* Arithmetic 32 50.8
* Arithmetic 32 50.8
*
* + 21 33.3
* - 7 11.1
* + 21 33.3
* - 7 11.1
* * 3 4.8
* / (int div) 1 1.6
*
Expand All @@ -295,7 +295,7 @@
* && (AND-THEN) 1 1.6
* | (OR) 1 1.6
* ! (NOT) 2 3.2
*
*
* -- -----
* 63 100.1
*
Expand All @@ -315,10 +315,10 @@
* 242 100.0 %
*
* When there is an access path leading to the final operand (e.g. a record
* component), only the final data type on the access path is counted.
* component), only the final data type on the access path is counted.
*
*
* 4. Operand Locality:
* 4. Operand Locality:
* -------------------
* number approximate
* percentage
Expand Down Expand Up @@ -352,84 +352,82 @@
#ifndef TIME
#define TIMES
#endif
/* Use times(2) time function unless */
/* explicitly defined otherwise */
/* Use times(2) time function unless */
/* explicitly defined otherwise */

#ifdef TIMES
#include <sys/types.h>
#include <sys/times.h>
/* for "times" */
#include <sys/types.h>
/* for "times" */
#endif

#define Mic_secs_Per_Second 1000000.0
/* Berkeley UNIX C returns process times in seconds/HZ */
#define Mic_secs_Per_Second 1000000.0
/* Berkeley UNIX C returns process times in seconds/HZ */

#ifdef NOSTRUCTASSIGN
#define structassign(d, s) memcpy(&(d), &(s), sizeof(d))
#ifdef NOSTRUCTASSIGN
#define structassign(d, s) memcpy(&(d), &(s), sizeof(d))
#else
#define structassign(d, s) d = s
#define structassign(d, s) d = s
#endif

#ifdef NOENUM
#ifdef NOENUM
#define Ident_1 0
#define Ident_2 1
#define Ident_3 2
#define Ident_4 3
#define Ident_5 4
typedef int Enumeration;
typedef int Enumeration;
#else
typedef enum {Ident_1, Ident_2, Ident_3, Ident_4, Ident_5}
Enumeration;
typedef enum { Ident_1, Ident_2, Ident_3, Ident_4, Ident_5 } Enumeration;
#endif
/* for boolean and enumeration types in Ada, Pascal */
/* for boolean and enumeration types in Ada, Pascal */

/* General definitions: */

#include <stdio.h>
/* for strcpy, strcmp */
/* for strcpy, strcmp */

#define Null 0
/* Value of a Null pointer */
#define true 1
#define Null 0
/* Value of a Null pointer */
#define true 1
#define false 0

typedef int One_Thirty;
typedef int One_Fifty;
typedef char Capital_Letter;
typedef int Boolean;
typedef char Str_30 [31];
typedef int Arr_1_Dim [50];
typedef int Arr_2_Dim [50] [50];
typedef int One_Thirty;
typedef int One_Fifty;
typedef char Capital_Letter;
typedef int Boolean;
typedef char Str_30[31];
typedef int Arr_1_Dim[50];
typedef int Arr_2_Dim[50][50];

typedef struct record
{
struct record *Ptr_Comp;
Enumeration Discr;
union {
struct {
Enumeration Enum_Comp;
int Int_Comp;
char Str_Comp [31];
} var_1;
struct {
Enumeration E_Comp_2;
char Str_2_Comp [31];
} var_2;
struct {
char Ch_1_Comp;
char Ch_2_Comp;
} var_3;
} variant;
} Rec_Type, *Rec_Pointer;
typedef struct record {
struct record *Ptr_Comp;
Enumeration Discr;
union {
struct {
Enumeration Enum_Comp;
int Int_Comp;
char Str_Comp[31];
} var_1;
struct {
Enumeration E_Comp_2;
char Str_2_Comp[31];
} var_2;
struct {
char Ch_1_Comp;
char Ch_2_Comp;
} var_3;
} variant;
} Rec_Type, *Rec_Pointer;

void Proc_1 (Rec_Pointer);
void Proc_2 (One_Fifty *);
void Proc_3 (Rec_Pointer *);
void Proc_4 (void);
void Proc_5 (void);
void Proc_6 (Enumeration, Enumeration *);
void Proc_7 (One_Fifty, One_Fifty, One_Fifty *);
void Proc_8 (Arr_1_Dim, Arr_2_Dim, int, int);
Enumeration Func_1 (Capital_Letter, Capital_Letter);
Boolean Func_2 (Str_30, Str_30);
Boolean Func_3 (Enumeration);
void Proc_1(Rec_Pointer);
void Proc_2(One_Fifty *);
void Proc_3(Rec_Pointer *);
void Proc_4(void);
void Proc_5(void);
void Proc_6(Enumeration, Enumeration *);
void Proc_7(One_Fifty, One_Fifty, One_Fifty *);
void Proc_8(Arr_1_Dim, Arr_2_Dim, int, int);
Enumeration Func_1(Capital_Letter, Capital_Letter);
Boolean Func_2(Str_30, Str_30);
Boolean Func_3(Enumeration);
Loading

0 comments on commit 92c0525

Please sign in to comment.