-
Notifications
You must be signed in to change notification settings - Fork 36
opcode and patching schema for pl ip to transfer wts #315
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
Changes from all commits
1e45efe
bbf21e3
2f9928f
f1c75c5
1034c32
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -45,6 +45,8 @@ static unsigned int control_op_save_timestamps(const uint8_t *_pc, uint32_t unq_ | |
| static unsigned int control_op_sleep(const uint8_t *_pc, uint32_t target); | ||
| static unsigned int control_op_save_register(const uint8_t *_pc, uint32_t address, uint32_t unq_id); | ||
| static unsigned int control_op_rel_acq_sync(const uint8_t *_pc, uint32_t rel_address, uint32_t acq_address); | ||
| static unsigned int control_op_uc_dma_mask_poll_ext(const uint8_t *_pc, uint32_t addr_hi, uint32_t addr_lo, uint32_t mask, uint32_t value); | ||
| static unsigned int control_op_apply_offset_pl(const uint8_t *_pc, uint16_t table_ptr, uint16_t buffer_id); | ||
|
|
||
|
|
||
| // Dispatchers | ||
|
|
@@ -344,6 +346,26 @@ FORCE_INLINE_FOR_RELEASE_ONLY static inline unsigned int control_dispatch_rel_ac | |
| ); | ||
| } | ||
|
|
||
| FORCE_INLINE_FOR_RELEASE_ONLY static inline unsigned int control_dispatch_uc_dma_mask_poll_ext(const uint8_t *pc) | ||
| { | ||
| return control_op_uc_dma_mask_poll_ext( | ||
| pc, | ||
| /* addr_hi (const) */ *(uint32_t *)(&pc[4]), | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: do not use C-style cast to convert between unrelated types [cppcoreguidelines-pro-type-cstyle-cast] /* addr_hi (const) */ *(uint32_t *)(&pc[4]),
^ |
||
| /* addr_lo (const) */ *(uint32_t *)(&pc[8]), | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: 8 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] /* addr_lo (const) */ *(uint32_t *)(&pc[8]),
^
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: do not use C-style cast to convert between unrelated types [cppcoreguidelines-pro-type-cstyle-cast] /* addr_lo (const) */ *(uint32_t *)(&pc[8]),
^ |
||
| /* mask (const) */ *(uint32_t *)(&pc[12]), | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: 12 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] /* mask (const) */ *(uint32_t *)(&pc[12]),
^
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: do not use C-style cast to convert between unrelated types [cppcoreguidelines-pro-type-cstyle-cast] /* mask (const) */ *(uint32_t *)(&pc[12]),
^ |
||
| /* value (const) */ *(uint32_t *)(&pc[16]) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: 16 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers] /* value (const) */ *(uint32_t *)(&pc[16])
^
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: do not use C-style cast to convert between unrelated types [cppcoreguidelines-pro-type-cstyle-cast] /* value (const) */ *(uint32_t *)(&pc[16])
^ |
||
| ); | ||
| } | ||
|
|
||
| FORCE_INLINE_FOR_RELEASE_ONLY static inline unsigned int control_dispatch_apply_offset_pl(const uint8_t *pc) | ||
| { | ||
| return control_op_apply_offset_pl( | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: narrowing conversion from 'unsigned int' to signed type 'int' is implementation-defined [bugprone-narrowing-conversions] return control_op_apply_offset_pl(
^ |
||
| pc, | ||
| /* table_ptr (const) */ *(uint16_t *)(&pc[2]), | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: do not use C-style cast to convert between unrelated types [cppcoreguidelines-pro-type-cstyle-cast] /* table_ptr (const) */ *(uint16_t *)(&pc[2]),
^ |
||
| /* buffer_id (const) */ *(uint16_t *)(&pc[4]) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: do not use C-style cast to convert between unrelated types [cppcoreguidelines-pro-type-cstyle-cast] /* buffer_id (const) */ *(uint16_t *)(&pc[4])
^ |
||
| ); | ||
| } | ||
|
|
||
|
|
||
| // Case statements for regular operations | ||
|
|
||
|
|
@@ -376,7 +398,9 @@ FORCE_INLINE_FOR_RELEASE_ONLY static inline unsigned int control_dispatch_rel_ac | |
| case ISA_OPCODE_SAVE_TIMESTAMPS: pc += control_dispatch_save_timestamps(pc); break; \ | ||
| case ISA_OPCODE_SLEEP: pc += control_dispatch_sleep(pc); break; \ | ||
| case ISA_OPCODE_SAVE_REGISTER: pc += control_dispatch_save_register(pc); break; \ | ||
| case ISA_OPCODE_REL_ACQ_SYNC: pc += control_dispatch_rel_acq_sync(pc); break; | ||
| case ISA_OPCODE_REL_ACQ_SYNC: pc += control_dispatch_rel_acq_sync(pc); break; \ | ||
| case ISA_OPCODE_UC_DMA_MASK_POLL_EXT: pc += control_dispatch_uc_dma_mask_poll_ext(pc); break; \ | ||
| case ISA_OPCODE_APPLY_OFFSET_PL: pc += control_dispatch_apply_offset_pl(pc); break; | ||
|
|
||
|
|
||
| #endif | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -59,6 +59,8 @@ | |
| #define ISA_OPCODE_SLEEP 0x1d | ||
| #define ISA_OPCODE_SAVE_REGISTER 0x1e | ||
| #define ISA_OPCODE_REL_ACQ_SYNC 0x21 | ||
| #define ISA_OPCODE_UC_DMA_MASK_POLL_EXT 0x22 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: macro 'ISA_OPCODE_UC_DMA_MASK_POLL_EXT' used to declare a constant; consider using a 'constexpr' constant [cppcoreguidelines-macro-usage] #define ISA_OPCODE_UC_DMA_MASK_POLL_EXT 0x22
^ |
||
| #define ISA_OPCODE_APPLY_OFFSET_PL 0x23 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: macro 'ISA_OPCODE_APPLY_OFFSET_PL' used to declare a constant; consider using a 'constexpr' constant [cppcoreguidelines-macro-usage] #define ISA_OPCODE_APPLY_OFFSET_PL 0x23
^ |
||
|
|
||
|
|
||
| // Operation sizes | ||
|
|
@@ -97,5 +99,7 @@ | |
| #define ISA_OPSIZE_SLEEP 0x08 | ||
| #define ISA_OPSIZE_SAVE_REGISTER 0x0c | ||
| #define ISA_OPSIZE_REL_ACQ_SYNC 0x0c | ||
| #define ISA_OPSIZE_UC_DMA_MASK_POLL_EXT 0x14 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: macro 'ISA_OPSIZE_UC_DMA_MASK_POLL_EXT' used to declare a constant; consider using a 'constexpr' constant [cppcoreguidelines-macro-usage] #define ISA_OPSIZE_UC_DMA_MASK_POLL_EXT 0x14
^ |
||
| #define ISA_OPSIZE_APPLY_OFFSET_PL 0x08 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: macro 'ISA_OPSIZE_APPLY_OFFSET_PL' used to declare a constant; consider using a 'constexpr' constant [cppcoreguidelines-macro-usage] #define ISA_OPSIZE_APPLY_OFFSET_PL 0x08
^ |
||
|
|
||
| #endif | ||
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.
warning: narrowing conversion from 'unsigned int' to signed type 'int' is implementation-defined [bugprone-narrowing-conversions]
return control_op_uc_dma_mask_poll_ext( ^