Skip to content

Commit

Permalink
Improved buffer management
Browse files Browse the repository at this point in the history
A buffer constraint can be applied to an IO
  • Loading branch information
christophe0606 committed Apr 22, 2024
1 parent c1f99f0 commit 785fef5
Show file tree
Hide file tree
Showing 58 changed files with 3,069 additions and 247 deletions.
2 changes: 2 additions & 0 deletions Examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ add_subdirectory(simple bin_simple)
add_subdirectory(simpledsp bin_simpledsp)
add_subdirectory(cyclo bin_cyclo)
add_subdirectory(functionexample bin_functionexample)
add_subdirectory(callback bin_callback)


# Python examples
add_subdirectory(example4_python bin_example4_python)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
version: 1.1.0
version: 2.0.0
schedule-options:
memory-optimization: true
mem-strategy: independent_set
buffer-allocation: true
code-generation-options:
debug-limit: 1
fifo-prefix: cv
c-code-generation-options:
c-optional-args:
- uint8_t *myBuffer
- uint8_t *myBufferB
scheduler-c-file-name: cv_scheduler1

12 changes: 12 additions & 0 deletions Examples/buffer/constraint_config2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2.0.0
schedule-options:
memory-optimization: true
mem-strategy: independent_set
buffer-allocation: true
code-generation-options:
debug-limit: 1
fifo-prefix: cv
c-code-generation-options:
c-optional-args: "uint8_t *myBuffer,\n uint8_t *myBufferB"
scheduler-c-file-name: cv_scheduler2

12 changes: 12 additions & 0 deletions Examples/buffer/constraint_config3.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2.0.0
schedule-options:
memory-optimization: true
mem-strategy: independent_set
buffer-allocation: true
code-generation-options:
debug-limit: 1
fifo-prefix: cv
c-code-generation-options:
c-optional-args: "uint8_t *myBuffer,\n uint8_t *myBufferB"
scheduler-c-file-name: cv_scheduler3

12 changes: 12 additions & 0 deletions Examples/buffer/constraint_config5.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2.0.0
schedule-options:
memory-optimization: true
mem-strategy: independent_set
buffer-allocation: true
code-generation-options:
debug-limit: 1
fifo-prefix: cv
c-code-generation-options:
c-optional-args: "uint8_t *myBuffer,\n uint8_t *myBufferB"
scheduler-c-file-name: cv_scheduler5

12 changes: 12 additions & 0 deletions Examples/buffer/constraint_config6.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2.0.0
schedule-options:
memory-optimization: true
mem-strategy: independent_set
buffer-allocation: true
code-generation-options:
debug-limit: 1
fifo-prefix: cv
c-code-generation-options:
c-optional-args: "uint8_t *myBuffer,\n uint8_t *myBufferB"
scheduler-c-file-name: cv_scheduler6

12 changes: 12 additions & 0 deletions Examples/buffer/constraint_config7.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2.0.0
schedule-options:
memory-optimization: true
mem-strategy: independent_set
buffer-allocation: true
code-generation-options:
debug-limit: 1
fifo-prefix: cv
c-code-generation-options:
c-optional-args: "uint8_t *myBuffer,\n uint8_t *myBufferB"
scheduler-c-file-name: cv_scheduler7

12 changes: 12 additions & 0 deletions Examples/buffer/constraint_config8.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2.0.0
schedule-options:
memory-optimization: true
mem-strategy: independent_set
buffer-allocation: true
code-generation-options:
debug-limit: 1
fifo-prefix: cv
c-code-generation-options:
c-optional-args: "uint8_t *myBuffer,\n uint8_t *myBufferB"
scheduler-c-file-name: cv_scheduler8

12 changes: 12 additions & 0 deletions Examples/buffer/constraint_config9.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2.0.0
schedule-options:
memory-optimization: true
mem-strategy: independent_set
buffer-allocation: true
code-generation-options:
debug-limit: 1
fifo-prefix: cv
c-code-generation-options:
c-optional-args: "uint8_t *myBuffer,\n uint8_t *myBufferB"
scheduler-c-file-name: cv_scheduler9

14 changes: 14 additions & 0 deletions Examples/buffer/constraint_config_b1.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: 2.0.0
schedule-options:
memory-optimization: true
mem-strategy: independent_set
buffer-allocation: true
code-generation-options:
debug-limit: 1
fifo-prefix: cv
c-code-generation-options:
c-optional-args:
- uint8_t *myBuffer
- uint8_t *myBufferB
scheduler-c-file-name: cv_scheduler1

12 changes: 12 additions & 0 deletions Examples/buffer/constraint_config_b2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2.0.0
schedule-options:
memory-optimization: true
mem-strategy: independent_set
buffer-allocation: true
code-generation-options:
debug-limit: 1
fifo-prefix: cv
c-code-generation-options:
c-optional-args: "uint8_t *myBuffer,\n uint8_t *myBufferB"
scheduler-c-file-name: cv_scheduler2

12 changes: 12 additions & 0 deletions Examples/buffer/constraint_config_b3.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2.0.0
schedule-options:
memory-optimization: true
mem-strategy: independent_set
buffer-allocation: true
code-generation-options:
debug-limit: 1
fifo-prefix: cv
c-code-generation-options:
c-optional-args: "uint8_t *myBuffer,\n uint8_t *myBufferB"
scheduler-c-file-name: cv_scheduler3

12 changes: 12 additions & 0 deletions Examples/buffer/constraint_config_b5.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2.0.0
schedule-options:
memory-optimization: true
mem-strategy: independent_set
buffer-allocation: true
code-generation-options:
debug-limit: 1
fifo-prefix: cv
c-code-generation-options:
c-optional-args: "uint8_t *myBuffer,\n uint8_t *myBufferB"
scheduler-c-file-name: cv_scheduler5

12 changes: 12 additions & 0 deletions Examples/buffer/constraint_config_b6.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2.0.0
schedule-options:
memory-optimization: true
mem-strategy: independent_set
buffer-allocation: true
code-generation-options:
debug-limit: 1
fifo-prefix: cv
c-code-generation-options:
c-optional-args: "uint8_t *myBuffer,\n uint8_t *myBufferB"
scheduler-c-file-name: cv_scheduler6

12 changes: 12 additions & 0 deletions Examples/buffer/constraint_config_b7.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2.0.0
schedule-options:
memory-optimization: true
mem-strategy: independent_set
buffer-allocation: true
code-generation-options:
debug-limit: 1
fifo-prefix: cv
c-code-generation-options:
c-optional-args: "uint8_t *myBuffer,\n uint8_t *myBufferB"
scheduler-c-file-name: cv_scheduler7

12 changes: 12 additions & 0 deletions Examples/buffer/constraint_config_b8.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2.0.0
schedule-options:
memory-optimization: true
mem-strategy: independent_set
buffer-allocation: true
code-generation-options:
debug-limit: 1
fifo-prefix: cv
c-code-generation-options:
c-optional-args: "uint8_t *myBuffer,\n uint8_t *myBufferB"
scheduler-c-file-name: cv_scheduler8

12 changes: 12 additions & 0 deletions Examples/buffer/constraint_config_b9.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2.0.0
schedule-options:
memory-optimization: true
mem-strategy: independent_set
buffer-allocation: true
code-generation-options:
debug-limit: 1
fifo-prefix: cv
c-code-generation-options:
c-optional-args: "uint8_t *myBuffer,\n uint8_t *myBufferB"
scheduler-c-file-name: cv_scheduler9

Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
version: 1.1.0
version: 2.0.0
graph:
nodes:
- node: source
identified: true
kind: Source
kind: SourceC1
outputs:
- output: o
samples: 5
type: float
buffer-constraint:
name: Test
must-be-array: true
assigned-by-node: false
- node: processing1
identified: true
kind: ProcessingNode
Expand All @@ -19,46 +23,24 @@ graph:
- output: o
samples: 5
type: float
- node: sink2
- node: sink1
identified: true
kind: Sink
inputs:
- input: i
samples: 5
type: float
args:
- literal: sink2
- node: processing2
identified: true
kind: ProcessingNode
inputs:
- input: i
samples: 5
type: float
outputs:
- output: o
samples: 5
type: float
- node: processing3
identified: true
kind: ProcessingNode
inputs:
- input: i
samples: 5
type: float
outputs:
- output: o
samples: 5
type: float
- node: sink1
- literal: sink1
- node: sink2
identified: true
kind: Sink
inputs:
- input: i
samples: 5
type: float
args:
- literal: sink1
- literal: sink2
edges:
- src:
node: source
Expand All @@ -70,24 +52,12 @@ graph:
node: processing1
output: o
dst:
node: sink2
node: sink1
input: i
- src:
node: processing1
output: o
dst:
node: processing2
input: i
- src:
node: processing2
output: o
dst:
node: processing3
input: i
- src:
node: processing3
output: o
dst:
node: sink1
node: sink2
input: i

63 changes: 63 additions & 0 deletions Examples/buffer/constraint_graph_2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
version: 2.0.0
graph:
nodes:
- node: source
identified: true
kind: SourceC2
outputs:
- output: o
samples: 5
type: float
buffer-constraint:
name: Test
must-be-array: true
assigned-by-node: true
- node: processing1
identified: true
kind: ProcessingNode
inputs:
- input: i
samples: 5
type: float
outputs:
- output: o
samples: 5
type: float
- node: sink1
identified: true
kind: Sink
inputs:
- input: i
samples: 5
type: float
args:
- literal: sink1
- node: sink2
identified: true
kind: Sink
inputs:
- input: i
samples: 5
type: float
args:
- literal: sink2
edges:
- src:
node: source
output: o
dst:
node: processing1
input: i
- src:
node: processing1
output: o
dst:
node: sink1
input: i
- src:
node: processing1
output: o
dst:
node: sink2
input: i

Loading

0 comments on commit 785fef5

Please sign in to comment.