Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Software for White Rabbit PTP Core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
31
Issues
31
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Software for White Rabbit PTP Core
Commits
0ec7a6ec
Commit
0ec7a6ec
authored
Feb 22, 2021
by
Tomasz Wlostowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test simulation-only firmware for WRPC RISC-V port. WIP
parent
10ce9590
Pipeline
#948
failed with stage
in 34 seconds
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
21 additions
and
22 deletions
+21
-22
Makefile
Makefile
+3
-3
board.h
boards/generic/board.h
+8
-8
wrc-tasks.c
lib/wrc-tasks.c
+1
-0
Makefile
sdb-lib/Makefile
+1
-1
genraminit.c
tools/genraminit.c
+2
-2
wrc_main_sim.c
wrc_main_sim.c
+6
-8
No files found.
Makefile
View file @
0ec7a6ec
...
...
@@ -28,7 +28,7 @@ PPSI = ppsi
# list of file extensions to be copied for MAKEALL script
MAKEALL_COPY_LIST
=
.bin .elf
cflags-arch
=
-march
=
rv32im
c
-mabi
=
ilp32
cflags-arch
=
-march
=
rv32im
-mabi
=
ilp32
USER_CFLAGS
=
$
(
cflags-arch
)
#PPSI_O_LDFLAGS = -melf32lriscv
#-mabi=ilp32
...
...
@@ -123,7 +123,7 @@ CFLAGS = $(cflags-y) -Wall -Wstrict-prototypes \
ASFLAGS
=
-I
.
LDFLAGS
=
$
(
ldflags-y
)
\
-march
=
rv32im
c
-mabi
=
ilp32
-Wl
,--gc-sections
-Os
-lgcc
-lc
-march
=
rv32im
-mabi
=
ilp32
-Wl
,--gc-sections
-Os
-lgcc
-lc
WRC-O-FLAGS-$(CONFIG_LM32)
=
--gc-sections
-e
_start
...
...
@@ -239,7 +239,7 @@ distclean: clean
${
CC
}
$(CFLAGS)
$(PTPD_CFLAGS)
$(INCLUDE_DIR)
$(LIB_DIR)
-c
$*
.c
-o
$@
%.o
:
%.S
${
CC
}
-march
=
rv32im
c
-mabi
=
ilp32
-c
$*
.S
-o
$@
${
CC
}
-march
=
rv32im
-mabi
=
ilp32
-c
$*
.S
-o
$@
liblinux
:
...
...
boards/generic/board.h
View file @
0ec7a6ec
...
...
@@ -11,14 +11,14 @@
*/
/* Fixed base addresses */
#define BASE_MINIC 0x
4
0000
#define BASE_EP 0x
4
0100
#define BASE_SOFTPLL 0x
4
0200
#define BASE_PPS_GEN 0x
4
0300
#define BASE_SYSCON 0x
4
0400
#define BASE_UART 0x
4
0500
#define BASE_ONEWIRE 0x
4
0600
#define BASE_ETHERBONE_CFG 0x
4
8000
#define BASE_MINIC 0x
8000
0000
#define BASE_EP 0x
8000
0100
#define BASE_SOFTPLL 0x
8000
0200
#define BASE_PPS_GEN 0x
8000
0300
#define BASE_SYSCON 0x
8000
0400
#define BASE_UART 0x
8000
0500
#define BASE_ONEWIRE 0x
8000
0600
#define BASE_ETHERBONE_CFG 0x
8000
8000
/* Board-specific parameters */
#define TICS_PER_SECOND 1000
...
...
lib/wrc-tasks.c
View file @
0ec7a6ec
...
...
@@ -15,6 +15,7 @@ static uint32_t prev_ticks_for_profile;
uint32_t
print_task_time_threshold
=
CONFIG_DEFAULT_PRINT_TASK_TIME_THRESHOLD
;
static
struct
wrc_task
tasks
[
WRC_MAX_TASKS
];
static
struct
wrc_task
*
last_task
=
&
tasks
[
0
];
static
void
task_time_normalize
(
struct
wrc_task
*
t
)
{
...
...
sdb-lib/Makefile
View file @
0ec7a6ec
...
...
@@ -19,7 +19,7 @@ OBJDUMP = $(CROSS_COMPILE)objdump
# calculate endianness at compile time
ENDIAN
:=
$(
shell
./check-endian
$(CC))
CFLAGS
=
-Wall
-ggdb
-O2
-march
=
rv32im
c
-mabi
=
ilp32
CFLAGS
=
-Wall
-ggdb
-O2
-march
=
rv32im
-mabi
=
ilp32
CFLAGS
+=
-I
../include/linux
-I
../include
# for <sdb.h>
CFLAGS
+=
-ffunction-sections
-fdata-sections
CFLAGS
+=
-Wno-pointer-sign
...
...
tools/genraminit.c
View file @
0ec7a6ec
...
...
@@ -17,10 +17,10 @@ const char *byte_to_binary(int x)
static
char
b
[
33
];
b
[
0
]
=
'\0'
;
x
=
htonl
(
x
);
// ugly hack
for
(
z
=
0x80000000
;
z
>
0
;
z
>>=
1
)
{
strcat
(
b
,
((
x
&
z
)
==
z
)
?
"1"
:
"0"
);
}
return
b
;
}
...
...
wrc_main_sim.c
View file @
0ec7a6ec
...
...
@@ -26,6 +26,8 @@
#include <stdio.h>
#include <inttypes.h>
#include "boards/generic/board.h"
#include "system_checks.h"
#include "dev/endpoint.h"
#include "dev/minic.h"
...
...
@@ -84,14 +86,10 @@ static void wrc_sim_initialize(void)
// uncomment the following line to perform a dynamic search
// at runtime.
//sdb_find_devices();
BASE_MINIC
=
(
void
*
)
0x20000
;
BASE_EP
=
(
void
*
)
0x20100
;
BASE_SOFTPLL
=
(
void
*
)
0x20200
;
BASE_PPS_GEN
=
(
void
*
)
0x20300
;
BASE_SYSCON
=
(
void
*
)
0x20400
;
BASE_UART
=
(
void
*
)
0x20500
;
BASE_ONEWIRE
=
(
void
*
)
0x20600
;
BASE_ETHERBONE_CFG
=
(
void
*
)
0x20700
;
console_init
();
pp_printf
(
"WR Core Sim Says Hello!
\n
"
);
timer_init
(
1
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment