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

Convert sync integer ratio clock crossing c code gen to define struct instead of using fixed size array types #171

Open
JulianKemmerer opened this issue Jul 4, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@JulianKemmerer
Copy link
Owner

...so that the new clock_crossing.h header macros can be used.

Current code gen looks like:

#define fast_to_slow_RATIO 4
#include "uint64_s_array_N_t.h"
#define fast_to_slow_write_t uint64_s_array_1_t
#define fast_to_slow_read_t uint64_s_array_4_t

// Clock cross write
void fast_to_slow_WRITE(uint64_s_array_1_t in_data)
{
  // TODO
}

// Clock cross read
uint64_s_array_4_t fast_to_slow_READ()
{
  // TODO
}

Already do #define fast_to_slow_read_t uint64_s_array_4_t making it look like a type.

Get rid of #include "uint64_s_array_N_t.h" by actually generating fast_to_slow_read_t struct which has field that is an fixed size array.

Macro for sync crossing will need user to specify clock ratio (instead of being detected in auto generated header gen process) but macros are easier to work with than #include's...

@JulianKemmerer JulianKemmerer added the enhancement New feature or request label Jul 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant