-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bring back lfc #121
Bring back lfc #121
Conversation
Memory usage after merging this PR will be: Memory Reportaction_empty_test_c
action_microstep_test_c
action_overwrite_test_c
action_test_c
delayed_conn_test_c
event_payload_pool_test_c
event_queue_test_c
multiple_startup_shutdown_test_c
nanopb_test_c
physical_action_test_c
port_test_c
reaction_queue_test_c
request_shutdown_test_c
shutdown_test_c
startup_test_c
tcp_channel_test_c
timer_test_c
|
Memory usage after merging this PR will be: Memory Reportaction_empty_test_c
action_microstep_test_c
action_overwrite_test_c
action_test_c
delayed_conn_test_c
event_payload_pool_test_c
event_queue_test_c
multiple_startup_shutdown_test_c
nanopb_test_c
physical_action_test_c
port_test_c
reaction_queue_test_c
request_shutdown_test_c
shutdown_test_c
startup_test_c
tcp_channel_test_c
timer_test_c
|
Memory usage after merging this PR will be: Memory Reportaction_empty_test_c
action_microstep_test_c
action_overwrite_test_c
action_test_c
delayed_conn_test_c
event_payload_pool_test_c
event_queue_test_c
multiple_startup_shutdown_test_c
nanopb_test_c
physical_action_test_c
port_test_c
reaction_queue_test_c
request_shutdown_test_c
shutdown_test_c
startup_test_c
tcp_channel_test_c
timer_test_c
|
Memory usage after merging this PR will be: Memory Reportaction_empty_test_c
action_microstep_test_c
action_overwrite_test_c
action_test_c
delayed_conn_test_c
event_payload_pool_test_c
event_queue_test_c
multiple_startup_shutdown_test_c
nanopb_test_c
physical_action_test_c
port_test_c
reaction_queue_test_c
request_shutdown_test_c
shutdown_test_c
startup_test_c
tcp_channel_test_c
timer_test_c
|
Memory usage after merging this PR will be: Memory Reportaction_empty_test_c
action_microstep_test_c
action_overwrite_test_c
action_test_c
delayed_conn_test_c
event_payload_pool_test_c
event_queue_test_c
multiple_startup_shutdown_test_c
nanopb_test_c
physical_action_test_c
port_test_c
reaction_queue_test_c
request_shutdown_test_c
shutdown_test_c
startup_test_c
tcp_channel_test_c
timer_test_c
|
1 similar comment
Memory usage after merging this PR will be: Memory Reportaction_empty_test_c
action_microstep_test_c
action_overwrite_test_c
action_test_c
delayed_conn_test_c
event_payload_pool_test_c
event_queue_test_c
multiple_startup_shutdown_test_c
nanopb_test_c
physical_action_test_c
port_test_c
reaction_queue_test_c
request_shutdown_test_c
shutdown_test_c
startup_test_c
tcp_channel_test_c
timer_test_c
|
Memory usage after merging this PR will be: Memory Reportaction_empty_test_c
action_microstep_test_c
action_overwrite_test_c
action_test_c
delayed_conn_test_c
event_payload_pool_test_c
event_queue_test_c
multiple_startup_shutdown_test_c
nanopb_test_c
physical_action_test_c
port_test_c
reaction_queue_test_c
request_shutdown_test_c
shutdown_test_c
startup_test_c
tcp_channel_test_c
timer_test_c
|
@@ -80,6 +80,7 @@ if(NETWORK_CHANNEL_TCP_POSIX) | |||
endif() | |||
|
|||
target_compile_options(reactor-uc PRIVATE -Wall -Wextra -Werror) | |||
target_compile_options(reactor-uc PUBLIC -Wno-zero-length-bounds) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needed because our macros generate zero-length arrays
Memory usage after merging this PR will be: Memory Reportaction_empty_test_c
action_microstep_test_c
action_overwrite_test_c
action_test_c
delayed_conn_test_c
event_payload_pool_test_c
event_queue_test_c
multiple_startup_shutdown_test_c
nanopb_test_c
physical_action_test_c
port_test_c
reaction_queue_test_c
request_shutdown_test_c
shutdown_test_c
startup_test_c
tcp_channel_test_c
timer_test_c
|
// FIXME: Separate user-facing vs internal macros | ||
// FIXME: Group macros either by functionality or by element they operate on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These will be addressed in later fixup PRs
include/reactor-uc/macros.h
Outdated
|
||
#define DEFINE_DELAYED_CONNECTION_STRUCT(ParentName, ReactorName, OutputPort, DownstreamSize, BufferType, BufferSize, \ | ||
Delay) \ | ||
#define CONTAINED_OUTPUT_CONNECTIONS(ReactorName, OutputPort, NumConnsOut) \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The following macros create the fields on the parents self the child ports.
include/reactor-uc/macros.h
Outdated
#define CONTAINED_OUTPUT_OBSERVERS(ReactorName, OutputPort, NumObservers) \ | ||
Reaction *_observers_##ReactorName##_##OutputPort[NumObservers]; | ||
|
||
#define DEFINE_CONTAINED_OUTPUT_ARGS(ReactorName, OutputPort) \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This macro creates an OutputExternalCtorArgs object and initializes its fields so that we can later pass it to the ctor of the child
@@ -6,38 +6,45 @@ | |||
#include "reactor-uc/reactor.h" | |||
#include "reactor-uc/trigger.h" | |||
|
|||
typedef struct Input Input; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No longer any useful separation between Inputs and Outputs
|
||
val Action.codeType | ||
get(): String = "${reactor.name}_Action_$name" | ||
|
||
val Action.bufSize | ||
get(): Int = 12 // FIXME: This is a parameter/annotation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need LF syntax to set this
Memory usage after merging this PR will be: Memory Reportaction_empty_test_c
action_microstep_test_c
action_overwrite_test_c
action_test_c
delayed_conn_test_c
event_payload_pool_test_c
event_queue_test_c
multiple_startup_shutdown_test_c
nanopb_test_c
physical_action_test_c
port_test_c
reaction_queue_test_c
request_shutdown_test_c
shutdown_test_c
startup_test_c
tcp_channel_test_c
timer_test_c
|
Memory usage after merging this PR will be: Memory Reportaction_empty_test_c
action_microstep_test_c
action_overwrite_test_c
action_test_c
delayed_conn_test_c
event_payload_pool_test_c
event_queue_test_c
multiple_startup_shutdown_test_c
nanopb_test_c
physical_action_test_c
port_test_c
reaction_queue_test_c
request_shutdown_test_c
shutdown_test_c
startup_test_c
tcp_channel_test_c
timer_test_c
|
Memory usage after merging this PR will be: Memory Reportaction_empty_test_c
action_microstep_test_c
action_overwrite_test_c
action_test_c
delayed_conn_test_c
event_payload_pool_test_c
event_queue_test_c
multiple_startup_shutdown_test_c
nanopb_test_c
physical_action_test_c
port_test_c
reaction_queue_test_c
request_shutdown_test_c
shutdown_test_c
startup_test_c
tcp_channel_test_c
timer_test_c
|
This adds back LFC support ontop of our nice macro system. Next step is to support federated programs written in LFC.
Also adds:
The code-gen is still very messy and has to be improved. But I think we should merge this in and improve the code generator separatly