Skip to content

Commit bb64102

Browse files
committed
Patmos and S4NoC: 8
1 parent 3757bff commit bb64102

File tree

21 files changed

+129
-100
lines changed

21 files changed

+129
-100
lines changed

examples/patmos/hello_lf/Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,8 @@ ifeq ($(firstword $(MAKECMDGOALS)),all)
1010
endif
1111

1212
# ---- Patmos specific configuration ----
13-
include ./src-gen/$(LF_MAIN)/Makefile
1413
include $(REACTOR_UC_PATH)/make/patmos/patmos-lfc.mk
1514

16-
CFLAGS += -DSCHEDULER_DYNAMIC
1715
CFLAGS += -DEVENT_QUEUE_SIZE=$(EVENT_QUEUE_SIZE)
1816
CFLAGS += -DREACTION_QUEUE_SIZE=$(REACTION_QUEUE_SIZE)
1917

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
LF_MAIN ?= S4NoCFedLF
2+
LF_FED ?= r1
3+
4+
include $(REACTOR_UC_PATH)/make/patmos/patmos-lfc.mk
5+
6+
# ---- Patmos specific configuration ----
7+
# Output directory
8+
BIN_DIR = $(CURDIR)/bin
9+
OUTPUT = $(BIN_DIR)/$(LF_MAIN)
10+
all: $(OUTPUT)
11+
$(info Building $(LF_MAIN) federate $(LF_FED))
12+
$(info Output directory: $(BIN_DIR))
13+
$(info Output binary: $(OUTPUT))
14+
15+
# Build rule
16+
$(OUTPUT): $(SOURCES)
17+
mkdir -p $(BIN_DIR)
18+
$(CC) $(SOURCES) $(CFLAGS) -o $(OUTPUT)
19+
# Clean rule
20+
clean:
21+
rm -rf $(BIN_DIR)
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env bash
2+
3+
LF_MAIN=S4NoCFedLF
4+
5+
$REACTOR_UC_PATH/lfc/bin/lfc-dev ../../src/$LF_MAIN.lf -n -o .
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
LF_MAIN ?= S4NoCFedLF
2+
LF_FED ?= r2
3+
4+
include $(REACTOR_UC_PATH)/make/patmos/patmos-lfc.mk
5+
6+
# ---- Patmos specific configuration ----
7+
# Output directory
8+
BIN_DIR = $(CURDIR)/bin
9+
OUTPUT = $(BIN_DIR)/$(LF_MAIN)
10+
all: $(OUTPUT)
11+
$(info Building $(LF_MAIN) federate $(LF_FED))
12+
$(info Output directory: $(BIN_DIR))
13+
$(info Output binary: $(OUTPUT))
14+
15+
# Build rule
16+
$(OUTPUT): $(SOURCES)
17+
mkdir -p $(BIN_DIR)
18+
$(CC) $(SOURCES) $(CFLAGS) -o $(OUTPUT)
19+
# Clean rule
20+
clean:
21+
rm -rf $(BIN_DIR)
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env bash
2+
3+
LF_MAIN=S4NoCFedLF
4+
5+
$REACTOR_UC_PATH/lfc/bin/lfc-dev ../../src/$LF_MAIN.lf -n -o .
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash
2+
LF_MAIN=S4NoCFedLF
3+
4+
# Generate configuration templates
5+
rm -rf $LF_MAIN
6+
$REACTOR_UC_PATH/lfc/bin/lfc-dev --gen-fed-templates src/$LF_MAIN.lf
7+
8+
9+
# Generate and build r1 sources
10+
pushd ./$LF_MAIN/r1
11+
./run_lfc.sh
12+
make clean
13+
make all
14+
popd
15+
16+
# Generate and build r2 sources
17+
pushd ./$LF_MAIN/r2
18+
./run_lfc.sh
19+
make clean
20+
make all
21+
popd
22+

examples/patmos/s4noc_lf/src/s4noc.lf renamed to examples/patmos/s4noc_fed_lf/src/S4NoCFedLF.lf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ reactor Dst {
3232
=}
3333
}
3434

35-
main reactor {
35+
federated reactor {
3636
@interface_s4noc(core=0)
3737
r1 = new Src(id=42)
3838

3939
@interface_s4noc(core=1)
4040
r2 = new Dst()
4141

42-
@link(left="0", right="1")
42+
// @link(left="0", right="1")
4343
r1.out -> r2.in
4444
}

examples/patmos/s4noc_lf/Makefile

Lines changed: 0 additions & 35 deletions
This file was deleted.

examples/patmos/s4noc_lf/build.sh

Lines changed: 0 additions & 5 deletions
This file was deleted.

examples/pico/buildAll.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
#!/bin/env bash
22
set -e
3-
cmake -Bbuild
4-
cmake --build build
3+
4+
if [ -z "$PICO_SDK_PATH" ]; then
5+
echo "Error: PICO_SDK_PATH is not defined. Please set it before running this script."
6+
else
7+
cmake -Bbuild
8+
cmake --build build
9+
fi

0 commit comments

Comments
 (0)