21 Commits

Author SHA1 Message Date
Zimri Leisher
1c87278b6b
Clean up FpySequencer directives (#4395)
* Remove assert and float floor div

* Rename add/sub/mul

---------

Co-authored-by: M Starch <LeStarch@googlemail.com>
2025-11-11 17:20:01 -08:00
Thomas Boyer-Chammard
d669ea2c5a
Replace FpConfig.h header with FPP model elements (#4393)
* Update FpConfig.h

* Update AcConstants.fpp

* Update FPrimeBasicTypes.hpp

* Update BasicTypes.h

* Update FpySequencer.hpp

* Update FpConfig.h

* Update FPrimeBasicTypes.hpp

* Update BasicTypes.h

* Update BasicTypes.h

* Update BasicTypes.h

* Update BasicTypes.h

* Update BasicTypes.h

* Update BasicTypes.h

* Update BasicTypes.h

* Update FPrimeBasicTypes.hpp

* Update FPrimeBasicTypes.hpp

* Update FpConfig.h

* Update AcConstants.fpp

* Revert casts

* Add static_cast in asserts, reorganize files per feature

* Fix static_assert after merging devel

* Add assert to static cast

* clean up comments and TODOs

* formatting

* Fix formatting

* Fix RHEL8 error

* Other UT cast fix

* cast one side only

* fix spelling and move assert count to FpConstants

* Reorder and comments

* rob test

* re-add double cast

* Revert testing static_cast

* Update docs

* use SIZE_OF variables instead of hardcoding value

* Update FpConfig in CMake tests

---------

Co-authored-by: ekswang <eric.k.wang@jpl.nasa.gov>
2025-11-06 16:29:15 -08:00
Zimri Leisher
b1b613fd0c
FpySequencer Add DUMP_STACK_TO_FILE command (#4384)
* Add DUMP_STACK_TO_FILE command

* Add docstring

* Fix bug in directive

* format
2025-11-04 09:18:55 -08:00
Zimri Leisher
d0e9508988
FpySequencer new directives for loops (#4356)
* Rework exit, push tlm and push prm

* Rename store to store const offset

* Add new dirs for loops

* Compiling again

* Add UTs, passing

* Format

* sp

* Update schema version

* Update error code names

* Update directives documentation

* Add new stack class, switch DUPLICATE to PEEK

* Update peek docs

* Remove old docs

* sp

* sp, format
2025-11-03 10:03:38 -08:00
Zimri Leisher
2fca863e4d
FpySequencer flag system (#4259)
* Much work on set flags

* Little more work on flags

* Get UTs passing

* Defaults for flags

* Add uts for set flag

* Switch from bitfield to boolean array

* fix ut

* more work on flag system

* Add some uts

* Add getflag dir

* format

* Update docs

* sp

* Remove update on change from bool tlm

* pr feedback

---------

Co-authored-by: Zimri Leisher <zimri.leisher@fireflyspace.com>
2025-10-14 13:49:22 -07:00
Zimri Leisher
896803ad20
Add PUSH_TIME directive (#4275)
* Add push_time dir

* Add docs and UT

* format
2025-10-08 13:32:33 -07:00
Zimri Leisher
35840d549d
Add STEP command to FpySequencer (#4239)
* Remove debug prefix from breakpoint commands, start working on line by line step

* Actually add teh step cmd, some uts, update docs

* Fix step ut

* Split up tlm chans, add more for breakpoint stuff

* format

* Remove update on change from bool telemetry channels
2025-10-08 13:22:03 -07:00
Zimri Leisher
9139148de2
FpySequencer Add push tlm val and time dir (#4230)
* Add push tlm val and time dir

* Update sdd with latest directives

* format

* Rework overflow check
2025-09-30 13:47:43 -07:00
Zimri Leisher
77f286f3ed
FpySequencer U32 stack size + some error telemetry (#4065)
* Switch everything that references stack size or offset to U32

* Add dir err tlm

* Rename tlm point to be consistent

* Update state tlm type to enumstoretype

* Make new Fpy::StackSizeType alias

* Add explanation for why we chose U32

* Fix one more static cast

* Bump schema vers to 2

---------

Co-authored-by: Zimri Leisher <zimri.leisher@fireflyspace.com>
2025-09-03 15:53:28 -07:00
Zimri Leisher
f4439a8cc9
FpySequencer arithmetic (#4025)
* Some work towards stack based arch

* Bring fp/int conv up to date

* Get compiling with stack based arch

* Start trying to fix UTs

* Start adding store/load dirs

* Add push val dir

* UTs are running

* UTs passing

* Make exit stack based

* Fix more uts

* Fix final UTs

* sp

* Fix overflow potential err

* Fix another overflow

* same error fix

* Format

* Also add to format checker

* Add math directives

* Add integer extension and truncation

* Also check correct size on stack

* Fix comment

* Push cmd response to stack

* Cast cmd response code to i32

* Add stack cmd, memcmp, discard dirs

* Fix some bugs with stack cmd

* Fix lil bug in sgtack cmd

* same bug

* Fix another bug sry

* Update sdd

* sp

* Fix undefined behavior with bitshift of signed integer

* sp

* Fix lil bug in timeout detection of stack cmd

* Switch format check to do all Svc dirs

* Reformat, and fix packet descriptor serialize bug

* Add UTs for all of arith ops

* Add tests for disc, memcmp, stack cmd

* Add deser tests for those three dirs

* sp

* Format

* Replace magic numbers with sizeofs

* Add currentStatementIdx helper function

* Format

* Split imod into smod and umod

* sp

* Add fmod, copy python behavior for fmod and smod

---------

Co-authored-by: Zimri Leisher <zimri.leisher@fireflyspace.com>
2025-08-21 14:08:40 -07:00
Zimri Leisher
30a3902e3e
FpySequencer stack based architecture (#3975)
* Some work towards stack based arch

* Bring fp/int conv up to date

* Get compiling with stack based arch

* Start trying to fix UTs

* Start adding store/load dirs

* Add push val dir

* UTs are running

* UTs passing

* Make exit stack based

* Fix more uts

* Fix final UTs

* sp

* Fix overflow potential err

* Fix another overflow

* same error fix

* Update sdd

* sp

* Fix undefined behavior with bitshift of signed integer

* sp

---------

Co-authored-by: Zimri Leisher <zimri.leisher@fireflyspace.com>
2025-08-13 09:51:30 -07:00
Zimri Leisher
a91f24cb38
Add float to int conversion directives, some misc changes (#3847)
* Add fptoi and itofp dirs

* Fix F32 literal

* Add some file read stage telemetry to err msgs

* Update default register count to 128

* Fix NOT directive to behave properly with if

* Make fptoi and itofp signed/unsigned

* fix warning

* Fix another warning

* Fix sp
2025-07-13 11:22:33 -07:00
Zimri Leisher
5c896379e5
Add fpext, fptrunc directives (#3845)
* Add fpext, fptrunc, combine with not into unary op, tests pass

* Some UTs, switch to using memcpy

* Add UTs for all binary and unary ops

* Some more UTs

* sp

---------

Co-authored-by: Zimri Leisher <zimri.leisher@fireflyspace.com>
Co-authored-by: M Starch <LeStarch@googlemail.com>
2025-07-03 16:23:03 -07:00
Zimri Leisher
e3376dca9e
FpySequencer floating point comparisons (#3820)
* Add a little work on fp cmps

* Lil more work on fp cmp

* Finish flt stuff, add UT

* sp

* Much cleaner binary cmps

* Add final UTs

* sp

---------

Co-authored-by: Zimri Leisher <zimri.leisher@fireflyspace.com>
Co-authored-by: M Starch <LeStarch@googlemail.com>
2025-07-03 14:16:22 -07:00
Zimri Leisher
be4def9676
Add seqstart/done ports to FpySequencer (#3826)
* Add seqstart/done ports

* Some more UTs

---------

Co-authored-by: Zimri Leisher <zimri.leisher@fireflyspace.com>
Co-authored-by: M Starch <LeStarch@googlemail.com>
2025-07-03 13:43:56 -07:00
Zimri Leisher
50d3d4e492
FpySequencer V0.3 (#3702)
* Start combining dirs and cmd

* Much closer to combining dir and cmd

* Finish making cmds work

* Add directive error codes, fix UT

* Add deser lvar directive

* Add comparison operators

* Add unsigned/signed inequality ops

* Rename store to setreg

* First UT with a binary comparison op!

* Remove printfs

* Doc commnt

* Add and/not, and/or under binary cmp

* Fix a couple bugs in sequencer

* Add exit directive'

* Make exit actually end sequence if positive

* A little more work on UTS

* Fix UTs

* Add deser lvar UT

* Add exit, not, set reg, and binary cmp UTs

* Rename lvar to sreg

* Get the last few old refs to lvar

* sp

* Fix typo

* Fix typo

---------

Co-authored-by: Zimri Leisher <zimri.leisher@fireflyspace.com>
Co-authored-by: M Starch <LeStarch@googlemail.com>
2025-06-26 11:38:19 -07:00
Mishaal
9c5c024113
PRIVATE->private and PROTECTED->protected updates in Svc/FpySequencer (#3737)
* PRIVATE->private and PROTECTED->protected updates in Svc/FpySequencer

* Clean up new UT public/private helpers

* sp

---------

Co-authored-by: M Starch <LeStarch@googlemail.com>
2025-06-17 10:22:48 -07:00
Zimri Leisher
de7107e3dc
Add seqRunIn port (#3680)
Co-authored-by: Zimri Leisher <zimri.leisher@fireflyspace.com>
2025-06-02 11:07:25 -07:00
Zimri Leisher
29989caf3f
FpySequencer 0.2 (#3552)
* Add goto, if, setlocalvar, and debugging

* Finish off debug stuff, add more UTs, start work on UT seq builder

* Some more work on UTs

* Finish UTing RunState

* Much more UT of validation

* Test allocbuff

* Add a couple more Uts

* Some formatting and more UT coverage

* Fix docstirng

* Fix rpi conversion bug

* Fix mac warning

* Fix sp

* sp

* Update some docs

* Switch to using fixtures

* Add gettlmval and gettlmtime

* Update docstrings of getprm/gettlm ports

* Add TlmGet port to tlmpacketizer

* Add get_prm_val

* Fix tlmchan gettlm

* Combine tlmval and time into one

* Update tlm packetizer with TlmValid

* Update tlm chan with TlmValid

* PR feedback

* Fix rpi build

---------

Co-authored-by: Zimri Leisher <zimri.leisher@fireflyspace.com>
Co-authored-by: M Starch <LeStarch@googlemail.com>
2025-05-14 12:30:56 -07:00
M Starch
0d55b14848
Allow new configuration for F Prime (#3563)
* WIP defaulted config

* New configuration call

* Config archives use -fPIC when supporting BUILD_SHARED_LIBS

* Moving config to default/config

* Fixing CMake UTs

* register_fprime_config tests

* Re-enabling shared libraries except for macOS

* Better testing and comments

* More configuration clean-up

* More review fixes

* Fixing multiple locations bug

* sp

* Fixing config assembler name

* Python formatting

* Initial review suggestions

* Reverting snprintf fix

* Merge conflict test failures

* Linux CMake UT fixs
2025-05-10 12:24:35 -07:00
Zimri Leisher
6e2fb1fe4b
FpySequencer Version 0.1: Feature Parity (#3334)
* Add initiali fpy sequencer

* Get ready to use internal state machines

* Start modeling state machine in fpp

* Little more work on fpy sequencer

* Little more drafting on fpy sequencer

* State machine review with bocchino

* Remove unnecessary sm stuff

* Update docstgrings

* Start implementing actions for SM

* Little more work on fpy seq

* Get compiling again, rework how errors are handled, start actually reading header from disk

* Much more work on getting the state machine up and working

* Little more work

* More changes to SM. Mostly combine validation into one state

* A little more work on the readXYZ funcs

* Start working on the actual runtime!

* Little more work on sending out cmds

* Some work on handling statement results

* Get waits working hopefully. Also refactor cmd signals and responses

* remove the two states for cmd vs directive

* Some progress in converting to fprime types

* Get seq compiling with new fprime types

* refactor validation a little

* Fix final bugs with seq parsing. First seq rangits add to ref

* Add StatementARgBuf

* Add some tlm, get wait directives working

* Check timebase/ctx, increase allocated size

* Some fixes for removing NATIVE_X

* use handlestmt result

* Fix some types, clean up some errors, add tlm

* Move more stuff to RUN state

* Start pulling seq dirs into internal ports

* Use internal interfaces for directives

* Add timeout to dispatcher

* Fix a lil bug with seq too large

* Sequencer working! Passing all int tests

* Add seq path tlm, timeout, return signals in directives

* Fix several pr feedback items

* More pr feedback

* More fixes from PR feedback

* Remove printf

* Add basic unit tests

* Respond to more feedback

* Do most feedback from comments

* Little more event fixes, add more docs

* Some work on proper cmd response off nominal behavior

* Add all events and conditions to cmdresponsein

* Small fix to unexpected cmd repsonse, remove from ref

* Fix some small compiler warnings

* Fix one more warning

* Fix a comment

* spelling

* Remove unused types from test

* Cast  assert arg

---------

Co-authored-by: Zimri Leisher <zimri.leisher@fireflyspace.com>
2025-04-21 14:04:16 -07:00