Skip to content
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

Several smaller fixes and improvements after porting Polulu robot to uc #154

Merged
merged 20 commits into from
Dec 6, 2024

Conversation

erlingrj
Copy link
Collaborator

@erlingrj erlingrj commented Dec 5, 2024

  1. Require platform: Native before LFC generates main and CMakeLists.txt and automatically builds the project.
  2. Add support for reactor inheritance
  3. Fix some subtle issues with preambles and imported preambles etc
  4. Add LF_ prefix to all macros

Copy link
Contributor

github-actions bot commented Dec 5, 2024

Memory usage after merging this PR will be:

Memory Report

action_empty_test_c

from to increase (%)
text 59655 59655 0.00
data 744 744 0.00
bss 10112 10112 0.00
total 70511 70511 0.00

action_microstep_test_c

from to increase (%)
text 60486 60486 0.00
data 752 752 0.00
bss 10112 10112 0.00
total 71350 71350 0.00

action_overwrite_test_c

from to increase (%)
text 60323 60323 0.00
data 744 744 0.00
bss 10112 10112 0.00
total 71179 71179 0.00

action_test_c

from to increase (%)
text 60259 60259 0.00
data 752 752 0.00
bss 10112 10112 0.00
total 71123 71123 0.00

deadline_test_c

from to increase (%)
text 56102 56102 0.00
data 760 760 0.00
bss 10784 10784 0.00
total 67646 67646 0.00

delayed_conn_test_c

from to increase (%)
text 61516 61516 0.00
data 744 744 0.00
bss 10112 10112 0.00
total 72372 72372 0.00

event_payload_pool_test_c

from to increase (%)
text 18330 18330 0.00
data 624 624 0.00
bss 320 320 0.00
total 19274 19274 0.00

event_queue_test_c

from to increase (%)
text 27597 27597 0.00
data 736 736 0.00
bss 480 480 0.00
total 28813 28813 0.00

nanopb_test_c

from to increase (%)
text 42888 42888 0.00
data 904 904 0.00
bss 320 320 0.00
total 44112 44112 0.00

port_test_c

from to increase (%)
text 61464 61464 0.00
data 744 744 0.00
bss 10112 10112 0.00
total 72320 72320 0.00

reaction_queue_test_c

from to increase (%)
text 27319 27319 0.00
data 736 736 0.00
bss 480 480 0.00
total 28535 28535 0.00

request_shutdown_test_c

from to increase (%)
text 60458 60458 0.00
data 744 744 0.00
bss 10112 10112 0.00
total 71314 71314 0.00

startup_test_c

from to increase (%)
text 55801 55801 0.00
data 752 752 0.00
bss 10784 10784 0.00
total 67337 67337 0.00

tcp_channel_test_c

from to increase (%)
text 91462 91462 0.00
data 1224 1224 0.00
bss 21344 21344 0.00
total 114030 114030 0.00

timer_test_c

from to increase (%)
text 55692 55692 0.00
data 744 744 0.00
bss 10784 10784 0.00
total 67220 67220 0.00

Copy link
Contributor

github-actions bot commented Dec 5, 2024

Benchmark results after merging this PR:

Benchmark results

Performance:

PingPongUc:
Best Time: 132.628 msec
Worst Time: 134.363 msec
Median Time: 133.202 msec

PingPongC:
Best Time: 175.349 msec
Worst Time: 181.067 msec
Median Time: 175.902 msec

ReactionLatencyUc:
Best latency: 18256 nsec
Median latency: 59923 nsec
Worst latency: 868925 nsec

ReactionLatencyC:
Best latency: 36981 nsec
Median latency: 60219 nsec
Worst latency: 94925 nsec

Memory usage:

PingPongUc:
text data bss dec hex filename
39572 752 8496 48820 beb4 bin/PingPongUc

PingPongC:
text data bss dec hex filename
46044 872 360 47276 b8ac bin/PingPongC

ReactionLatencyUc:
text data bss dec hex filename
29833 736 2112 32681 7fa9 bin/ReactionLatencyUc

ReactionLatencyC:
text data bss dec hex filename
41666 840 360 42866 a772 bin/ReactionLatencyC

@erlingrj erlingrj requested a review from tanneberger December 5, 2024 19:57
@erlingrj
Copy link
Collaborator Author

erlingrj commented Dec 6, 2024

@tanneberger could you perform a quick review of this? 🙏

Copy link
Contributor

github-actions bot commented Dec 6, 2024

Coverage after merging polulu-robot into main will be

70.76%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   action.c81.90%69.23%100%85.33%120–121, 24, 43–46, 49, 51, 53, 56–58, 63–64, 73–74, 85–86
   builtin_triggers.c90.91%70%100%96.77%14, 18, 40, 43
   connection.c78.52%51.16%100%88.66%10, 104, 11, 110, 123–124, 136–137, 14, 14, 143, 145, 16–17, 21–22, 22, 22–23, 25, 27–28, 33, 48, 48, 48–49, 55, 60–62, 97
   environment.c78.35%55.56%84.62%83.33%12–13, 18, 20–21, 31, 35–36, 42–43, 51–52, 55–56, 60–61, 93–95
   event.c95.35%92.86%100%96.15%14–15
   federated.c5.41%2.88%7.69%6.48%100–102, 104, 104, 104–107, 109, 11, 111, 111, 111–112, 115, 118–119, 119, 119–120, 122–123, 125, 129, 13, 13, 13, 130, 132–134, 137, 139, 14, 140–144, 146–148, 15, 151–153, 153, 153–154, 154, 154–156, 158, 16, 161–162, 164–168, 17, 17, 17, 170–175, 177, 177, 177–180, 182, 182, 182–184, 184, 184–185, 189–190, 190, 190, 193–194, 198–199, 20, 200, 202, 202, 202, 204–208, 21, 211, 211, 211–214, 217–218, 218, 218–219, 22, 22, 22, 221–222, 225–226, 23, 231–232, 232, 232–233, 235, 237, 237, 237–239, 24, 24, 24, 240, 240, 240, 240, 240–249, 25, 250–252, 256, 259, 259, 259, 26, 260–261, 265, 268–269, 269, 269, 269, 27, 270–277, 279, 28, 28, 28, 285–287, 29, 299, 30, 30, 30, 30, 300, 303–306, 308, 308, 308–309, 31, 313–314, 314, 314, 316, 318–319, 319, 319, 32, 320, 320, 320–321, 321, 321–322, 322, 322–323, 323, 323–324, 324, 324, 326, 326, 326–327, 327, 327–328, 328, 328–329, 329, 329, 33, 331, 37, 37, 37, 37, 37–38, 40–43, 48, 48, 48, 48, 48–49, 52, 56–57, 59–62, 64, 64, 64–65, 65, 65, 67, 67, 67–69, 69, 69–71, 75–76, 80–81, 83–86, 88, 9, 90, 90, 90–91, 91, 91–92, 92, 92–93, 93, 93, 96–97, 99
   logging.c87.50%80%100%88.64%24, 37–39, 46, 59–60
   port.c81.43%50%100%95.45%10, 10, 10, 16, 20, 26, 26–28, 38, 38, 38–39
   queues.c89.94%80.36%100%94.06%108, 113, 119, 21–23, 47–48, 60–61, 84–88, 91–92
   reaction.c70.34%54.55%100%78.26%15, 17, 21–22, 28–31, 31, 31–32, 42, 45, 47, 52–53, 53, 53–55, 55, 55–56, 73, 89–91, 91, 91–94, 94, 94–95
   reactor.c69.33%51.52%100%82.28%10, 101–102, 14–19, 22, 28, 30, 32–37, 37, 37–38, 38, 38, 43, 55, 58–59, 59, 59–60, 60, 60–61, 63, 77–78, 81–82, 82, 82–83, 83, 83–84, 86, 91
   serialization.c50%50%50%50%16–17, 26–27, 33–35, 38–40
   tag.c40.19%31.48%60%47.92%14, 14–15, 17, 17–18, 23–24, 24, 24, 24, 24–25, 27, 27, 27, 27, 27–28, 30, 30, 30–31, 33–34, 34, 34–35, 37, 37, 37, 37, 37–38, 40, 40, 40, 40, 40–41, 43, 53–54, 63, 63–64, 83–85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85–87, 89
   timer.c95%66.67%100%100%14, 25
   trigger.c100%100%100%100%
   util.c0%0%0%0%10, 3–4, 4, 4–5, 5, 5–6, 8–9
src/platform/posix
   posix.c52.73%30%66.67%56%100, 100, 100–102, 106, 16, 18, 20–21, 34–36, 38–40, 48–49, 54–59, 59, 59–62, 62, 62–64, 67, 73–74, 78, 81, 92–94, 94, 94–96, 98–99
   tcp_ip_channel.c70.44%58.46%100%74.04%101, 103, 107–108, 125–127, 132–135, 139–142, 161, 166, 166, 166, 170–171, 184–185, 188, 190, 190, 190, 192, 194, 197, 203–204, 206, 209, 224–225, 229–231, 233, 238–241, 244, 247, 250, 257–260, 263–266, 269–270, 301–303, 310, 315–317, 317, 317–318, 320–323, 332, 332–334, 356–359, 359, 359–361, 371–372, 372, 372–373, 373, 373–374, 378–379, 382, 394–395, 412–413, 417–418, 43, 433, 44, 463–464, 468–469, 473–474, 487–489, 52–53, 59–60, 60, 60–62, 66–68, 71–73, 87–88
src/schedulers/dynamic
   scheduler.c81.71%63.83%95%87.71%117, 119, 119, 126, 142, 203,

for (i in 0..bankWidth-1) {
for (j in 0..portWidth-1) {
channels.add(UcChannel(varRef, j, i))
if (isInterleaved) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@erlingrj erlingrj merged commit 828008b into main Dec 6, 2024
8 checks passed
@erlingrj erlingrj deleted the polulu-robot branch December 6, 2024 22:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for parameters to main reactor Add support for initializing state variables
2 participants