Data Structures | |
| struct | mmgr_praet_event |
| What the port layer reports when a transfer finishes. More... | |
| struct | PraetCallbackCfg |
| A completion callback and the pointer passed back to it. More... | |
| struct | PraetCfg |
| Arguments for a channel open, and for a poll of one. More... | |
| struct | PraetTransferCfg |
| Arguments for a transfer submit, and for a channel close. More... | |
| struct | MemoriamPraetereoNs |
| Type of the praet dispatch table. More... | |
| struct | PraetDescriptor |
| One transfer, written down. More... | |
| struct | PraetOrdo |
| Everything one context schedules over. More... | |
Macros | |
| #define | PRAET_MENSURA_MAXIMA |
| The largest measure this module knows about. | |
| #define | PRAET_DIRECTIO_MOTUS_VERBI_FOR(from_, to_, bytes_) |
| The direction of the movement of the word, for two spans of one pool. | |
| #define | PRAET_STEPS_FIT(what_, pool_, offset_, bytes_, mensura_) |
| Fails the build where one end of a transfer does not sit whole steps inside its pool. | |
| #define | PRAET_DESCRIPTOR_BODY(name_, source_, source_mode_, dest_, dest_mode_, bytes_, mensura_, motus_, next_) |
| Declares one memory to memory transfer, and what runs after it. | |
| #define | PraetDescriptorDeclare(name_, from_pool_, from_offset_, to_pool_, to_offset_, bytes_, mensura_, motus_, next_) |
| Declares one memory to memory transfer, and what runs after it. | |
| #define | PRAET_DESCRIPTOR_ENDS_DIFFER(name_, from_pool_, to_pool_) |
| Fails the build where a transfer between two pools names one pool twice. | |
| #define | PraetOneShot(name_, from_pool_, from_offset_, to_pool_, to_offset_, bytes_, mensura_) |
| Declares one transfer that runs once and stops. | |
| #define | PraetDescriptorWithin(name_, pool_, from_offset_, to_offset_, bytes_, mensura_, next_) |
| Declares one transfer that moves bytes inside a single pool, and works out which way. | |
| #define | PraetCircular(name_, from_pool_, from_offset_, to_pool_, to_offset_, bytes_, mensura_) |
| Declares one transfer that runs itself again, forever. | |
| #define | PraetPingPong(first_, second_, from_pool_, to_pool_, first_from_, first_to_, second_from_, second_to_, bytes_, mensura_) |
| Declares two transfers that hand off to each other, forever. | |
| #define | PraetPeripheralDeclare(name_, address_) |
| Declares one peripheral register a transfer may reach. | |
| #define | PraetToPeripheral(name_, from_pool_, from_offset_, peripheral_, address_, at_offset_, bytes_, mensura_, next_) |
| Declares one transfer that reads a pool and writes a peripheral. | |
| #define | PraetFromPeripheral(name_, peripheral_, address_, at_offset_, to_pool_, to_offset_, bytes_, mensura_, next_) |
| Declares one transfer that reads a peripheral and writes a pool. | |
| #define | PRAET_DENUNTIATIO_ATTR(message_) |
| Marks a declaration so that every use of it reports, with a message. | |
| #define | PRAET_CRC_RESPONSUM_IN_LOCO_FIGERE(token_) |
Pastes token_ onto the answer type prefix. | |
| #define | PRAET_CRC_RESPONSUM(token_) |
The answer type token_ names, after its expansion. | |
| #define | PRAET_CRC_VALUE_AD_VERBI_CONFINIUM_RESTITUE_PAULATIM_CRC_DISABLE |
| The value the AD_VERBI_CONFINIUM_RESTITUE_PAULATIM_CRC_DISABLE token is for. | |
| #define | PRAET_CRC_VALUE_AD_VERBI_CONFINIUM_RESTITUE_PAULATIM_CRC_ENABLE |
| The value the AD_VERBI_CONFINIUM_RESTITUE_PAULATIM_CRC_ENABLE token is for. | |
| #define | PRAET_CRC_VALUE_IN_LOCO_FIGERE(token_) |
Pastes token_ onto the value prefix. | |
| #define | PRAET_CRC_VALUE(token_) |
The value token_ is for, after its expansion. | |
| #define | PRAET_ORDINEM_INCIPE(crc_choice_) |
| An empty context, for a build with no recovery machinery to configure. | |
| #define | PraetOrdoContext(name_, crc_choice_) |
| Declares one schedule context and answers the boundary word question for it. | |
| #define | PraetAttach(context_, channel_, pool_, region_) |
| Attaches a channel over a declared pool, by name. | |
| #define | PraetChannel(context_, channel_, pool_) |
| Declares which pool a channel of a context is over. | |
| #define | PRAET_ALVEUS_SUPERARE(context_, channel_, pool_) |
| Names the binding of a channel's declaration, and fails where there is none. | |
| #define | PRAET_SPAN_FITS(pool_, offset_, length_) |
| Fails the build when a span runs past the pool it names. | |
| #define | PraetSubmit(context_, channel_, pool_, offset_, length_) |
| Submits a span of a declared pool on a channel attached over that pool. | |
| #define | PRAET_CHANNELS |
| Logical channels one context carries. | |
| #define | PRAET_UNSET_CHANNELS |
| #define | PRAET_SETTLE_MICROS |
| Microseconds the engine spends in its settle before it will take a transfer. | |
| #define | PRAET_UNSET_SETTLE_MICROS |
| #define | PRAET_KEEPALIVE_MICROS |
| Microseconds an active channel may go with no kick from the port before it reads stalled. | |
| #define | PRAET_UNSET_KEEPALIVE_MICROS |
| #define | PRAET_RECOVERY |
| Whether a stalled transfer can go back or come out scrubbed. | |
| #define | PRAET_UNSET_RECOVERY |
| #define | PRAET_OPTIMIZE |
| Whether a run records the work it did, on top of the states it reached. | |
| #define | PRAET_PROCURATOR |
| Whether a run records the states and transitions it reached. | |
| #define | praet_procurator_transitus(channel_, was_, now_) |
| Expands to nothing where PRAET_PROCURATOR is 0. | |
| #define | praet_procurator_report() |
| Expands to nothing where PRAET_PROCURATOR is 0. | |
| #define | praet_procurator_opus(type_) |
| Expands to nothing where PRAET_OPTIMIZE is 0. | |
| #define | PRAET_SEPARATUS |
| Detached: the channel holds no engine and no vector. | |
| #define | PRAET_ADNEXUS |
| Attached: the channel holds the engine and will take a transfer. | |
| #define | PRAET_BUSY |
| Busy: the engine moves bytes on this channel. | |
| #define | PRAET_OK |
| Ok: the last transfer finished and the channel is still attached. | |
| #define | PRAET_CORE_BITS |
| Bits the quaternary core occupies, at the bottom of the word. | |
| #define | PRAET_CORE_MASK |
| The two bits the quaternary core occupies. | |
| #define | PRAET_ID_CLAIMED |
| Token id of the status set while the channel holds an interrupt vector. | |
| #define | PRAET_ID_SETTLING |
| Token id of the status set while the engine settles. | |
| #define | PRAET_ID_SEPARANS |
| Token id of the status set while a detach is in progress. | |
| #define | PRAET_ID_ERROR |
| Token id of the status set where the last transfer ended in an error. | |
| #define | PRAET_ID_STALLED |
| Token id of the status set where an active channel went unkicked for a whole window. | |
| #define | PRAET_ID_ABANDONED |
| Token id of the status set where a stalled transfer went back. | |
| #define | PRAET_ID_SCRUBBED |
| Token id of the status set where a stalled transfer's bytes counted as unsafe. | |
| #define | PRAET_ID_MEASURED |
| Token id of the status set where a recovery measured the boundary word. | |
| #define | PRAET_STATUS_COUNT |
| How many status token ids there are. | |
| #define | PRAET_STATUS_SHIFT |
| First bit the statuses occupy, the bit above the core. | |
| #define | PRAET_STATUS_BIT(id_) |
| The bit a status token id owns. | |
| #define | PRAET_STATUS_MASK |
| Every bit the statuses occupy, derived from how many there are. | |
| #define | PRAET_CLAIMED |
| Set while the channel holds an interrupt vector. | |
| #define | PRAET_SETTLING |
| Set while the engine settles and will take no transfer. | |
| #define | PRAET_SEPARANS |
| Set where a detach is in progress and the channel did not finish it. | |
| #define | PRAET_ERROR |
| Set where the last transfer ended in an error, clear where it completed. | |
| #define | PRAET_STALLED |
| Set where an active channel went a whole keepalive window with no kick. | |
| #define | PRAET_ABANDONED |
| Set where a stalled transfer went back and its bytes stayed as they were. | |
| #define | PRAET_SCRUBBED |
| Set where a stalled transfer resolved with its bytes counted as unsafe. | |
| #define | PRAET_MEASURED |
| Set where a recovery measured the word the engine was in the middle of. | |
| #define | PRAET_EVERY_STATUS |
| Every status, listed by name. | |
| #define | PRAET_REGION_SHIFT |
| First bit of the region descriptor. | |
| #define | PRAET_REGION_BITS |
| How wide the region descriptor is. | |
| #define | PRAET_REGION_MAX |
| The largest descriptor the region field holds. | |
| #define | PRAET_REGION_MASK |
| The bits the region descriptor occupies once shifted into place. | |
| #define | PRAET_REGION_FIELD(region_) |
| A region descriptor placed in the field the map gives it. | |
| #define | PRAET_REGION_ID_HIGHEST |
| The largest region token id there is. | |
| #define | PRAET_MAP_MASK |
| Every bit the map accounts for. | |
Typedefs | |
| typedef void(*) | mmgr_praet_callback(const mmgr_praet_event *event, void *user) |
| Reports a finished transfer to whatever registered this callback. | |
Enumerations | |
| enum | PraetAddressing { PRAET_ADDRESS_ADVANCES , PRAET_ADDRESS_FIXED } |
| How an address behaves as a transfer runs. More... | |
| enum | EgoSumMensura { PRAET_MENSURA_OCTETUS , PRAET_MENSURA_SEMIVERBUM , PRAET_MENSURA_VERBUM } |
| Bytes the engine moves in one step, the measure of everything else. More... | |
| enum | DirectioMotusVerbi { PRAET_MOTUS_NEUTRUM , PRAET_MOTUS_SURSUM , PRAET_MOTUS_DEORSUM } |
| Which way a transfer walks the words it moves. More... | |
| enum | PraetDescriptorOwner { PRAET_OWNER_SOFTWARE , PRAET_OWNER_ENGINE } |
| Who holds a descriptor. More... | |
| enum | PraetRecoveryWordBoundaryBitwiseCrc { AD_VERBI_CONFINIUM_RESTITUE_PAULATIM_CRC_DISABLE , AD_VERBI_CONFINIUM_RESTITUE_PAULATIM_CRC_ENABLE } |
| The two answers a declaration may give about the boundary word check. More... | |
| enum | PraetRegion { PRAET_REGION_INTERNAL , PRAET_REGION_EXTERNAL } |
| The regions a channel can attach over. More... | |
Functions | |
| EMBED_HOST_DEVICE embed_bool | mmgr_praet_open (const PraetCfg *args) |
| Opens args->channel and registers args->on_complete against it. | |
| EMBED_HOST_DEVICE embed_bool | mmgr_praet_tx_submit (const PraetTransferCfg *args) |
| Submits args->bytes of args->buf on args->channel. | |
| EMBED_HOST_DEVICE void | mmgr_praet_close (const PraetTransferCfg *args) |
| Closes args->channel. | |
| EMBED_HOST_DEVICE void | mmgr_praet_poll (const PraetCfg *args) |
| Drives the port layer's poll hook. | |
| EMBED_HOST_DEVICE embed_bool | mmgr_praet_hw_open (const PraetCfg *args) |
| Opens a DMA channel on real hardware. | |
| EMBED_HOST_DEVICE embed_bool | mmgr_praet_hw_tx_submit (const PraetTransferCfg *args) |
| Submits a transfer on real hardware. | |
| EMBED_HOST_DEVICE void | mmgr_praet_hw_close (const PraetTransferCfg *args) |
| Closes a DMA channel on real hardware. | |
| EMBED_HOST_DEVICE void | mmgr_praet_hw_poll (const PraetCfg *args) |
| Advances whatever poll work the port layer needs. | |
| EMBED_HOST_DEVICE embed_word | praet_descriptor_chain_length (const PraetDescriptor *first, embed_word limit) |
| Counts the descriptors a chain reaches before it repeats or ends. | |
| typedef | PRAET_DENUNTIATIO_ATTR ("AD_VERBI_CONFINIUM_RESTITUE_PAULATIM_CRC_DISABLE - this context measures no boundary word. A " "recovery is exact to the word and no " "finer") unsigned char PraetCrcResponsum_AD_VERBI_CONFINIUM_RESTITUE_PAULATIM_CRC_DISABLE |
| A type that exists only for the AD_VERBI_CONFINIUM_RESTITUE_PAULATIM_CRC_DISABLE token. | |
| typedef | PRAET_DENUNTIATIO_ATTR ("AD_VERBI_CONFINIUM_RESTITUE_PAULATIM_CRC_ENABLE - this context checksums the word a stalled " "transfer was inside, one word, bit at a time, on the recovery path " "only") unsigned char PraetCrcResponsum_AD_VERBI_CONFINIUM_RESTITUE_PAULATIM_CRC_ENABLE |
| A type that exists only for the AD_VERBI_CONFINIUM_RESTITUE_PAULATIM_CRC_ENABLE token. | |
| EMBED_HOST_DEVICE uint16_t | praet_hw_progress (embed_word channel) |
Returns how far the port says channel has got, in bytes. | |
| EMBED_HOST_DEVICE void | praet_ordo_reset (PraetOrdo *context) |
| Clears a context back to every channel detached. | |
| EMBED_HOST_DEVICE embed_bool | praet_ordo_adnectere (PraetOrdo *context, embed_word channel, uint8_t *bound, embed_word bytes, embed_word region) |
| Attaches a channel over a block of bytes, claims its vector, and starts the settle timer. | |
| EMBED_HOST_DEVICE void | praet_ordo_separare (PraetOrdo *context, embed_word channel) |
| Asks for the detach of a channel. | |
| EMBED_HOST_DEVICE embed_bool | praet_ordo_relatio (PraetOrdo *context, embed_word channel) |
| Marks a channel busy and starts its keepalive window. | |
| EMBED_HOST_DEVICE void | praet_ordo_efficere (PraetOrdo *context, embed_word channel) |
| Feeds the watchdog for one channel. | |
| EMBED_HOST_DEVICE void | praet_ordo_completed (PraetOrdo *context, embed_word channel, embed_bool failed) |
| Reports that a channel's transfer finished. | |
| EMBED_HOST_DEVICE void | praet_ordo_advance (PraetOrdo *context, embed_word micros) |
Advances the clock by micros. | |
| EMBED_HOST_DEVICE void | praet_ordo_advance_ticks (PraetOrdo *context, embed_word ticks) |
Advances the clock by ticks, scaled against the declared frequency. | |
| EMBED_HOST_DEVICE void | praet_ordo_raise (PraetOrdo *context) |
| Is in for the interrupt that raises the set volatile. | |
| EMBED_HOST_DEVICE void | praet_ordo_poll (PraetOrdo *context) |
| Drives the port and brings every flag word up to date. The caller's poll. | |
| EMBED_HOST_DEVICE uint32_t | praet_ordo_flags (const PraetOrdo *context, embed_word channel) |
| Returns one channel's flag word. | |
Variables | |
| static const MemoriamPraetereoNs | praet |
| Dispatch table instance named praet. | |
| #define PRAET_MENSURA_MAXIMA |
The largest measure this module knows about.
Definition at line 76 of file praet_descriptor.h.
| #define PRAET_DIRECTIO_MOTUS_VERBI_FOR | ( | from_, | |
| to_, | |||
| bytes_ ) |
The direction of the movement of the word, for two spans of one pool.
| from_ | Bytes into the pool the read starts at. |
| to_ | Bytes into the pool the write starts at. |
| bytes_ | Bytes moved. |
Definition at line 111 of file praet_descriptor.h.
| #define PRAET_STEPS_FIT | ( | what_, | |
| pool_, | |||
| offset_, | |||
| bytes_, | |||
| mensura_ ) |
Fails the build where one end of a transfer does not sit whole steps inside its pool.
| what_ | Text that names which end this is, for the message. |
| pool_ | Pool declared by ParsMemoriaeInternae or ParsMemoriaeExternum. |
| offset_ | Bytes into that pool the span starts at. |
| bytes_ | Bytes in the span. |
| mensura_ | Bytes the engine moves in one step. |
Definition at line 181 of file praet_descriptor.h.
| #define PRAET_DESCRIPTOR_BODY | ( | name_, | |
| source_, | |||
| source_mode_, | |||
| dest_, | |||
| dest_mode_, | |||
| bytes_, | |||
| mensura_, | |||
| motus_, | |||
| next_ ) |
Declares one memory to memory transfer, and what runs after it.
| name_ | Name of the descriptor. |
| from_pool_ | Pool the bytes come from. |
| from_offset_ | Bytes into that pool the read starts at. |
| to_pool_ | Pool the bytes go to. |
| to_offset_ | Bytes into that pool the write starts at. |
| bytes_ | Bytes to move. |
| mensura_ | Bytes moved in one step, as a EgoSumMensura. |
| next_ | The descriptor that runs after this one, or NULL. |
Definition at line 212 of file praet_descriptor.h.
| #define PraetDescriptorDeclare | ( | name_, | |
| from_pool_, | |||
| from_offset_, | |||
| to_pool_, | |||
| to_offset_, | |||
| bytes_, | |||
| mensura_, | |||
| motus_, | |||
| next_ ) |
Declares one memory to memory transfer, and what runs after it.
| name_ | Name of the descriptor. |
| from_pool_ | Pool the bytes come from. |
| from_offset_ | Bytes into that pool the read starts at. |
| to_pool_ | Pool the bytes go to. |
| to_offset_ | Bytes into that pool the write starts at. |
| bytes_ | Bytes to move. |
| mensura_ | Bytes moved in one step, as a EgoSumMensura. |
| motus_ | Which way the words walk, as a DirectioMotusVerbi. |
| next_ | The descriptor that runs after this one, or NULL. |
Definition at line 241 of file praet_descriptor.h.
| #define PRAET_DESCRIPTOR_ENDS_DIFFER | ( | name_, | |
| from_pool_, | |||
| to_pool_ ) |
Fails the build where a transfer between two pools names one pool twice.
| name_ | Name of the descriptor this belongs to. |
| from_pool_ | Pool the bytes come from. |
| to_pool_ | Pool the bytes go to. |
Definition at line 261 of file praet_descriptor.h.
| #define PraetOneShot | ( | name_, | |
| from_pool_, | |||
| from_offset_, | |||
| to_pool_, | |||
| to_offset_, | |||
| bytes_, | |||
| mensura_ ) |
Declares one transfer that runs once and stops.
| name_ | Name of the descriptor. |
| from_pool_ | Pool the bytes come from. |
| from_offset_ | Bytes into that pool the read starts at. |
| to_pool_ | Pool the bytes go to. |
| to_offset_ | Bytes into that pool the write starts at. |
| bytes_ | Bytes to move. |
| mensura_ | Bytes moved in one step. |
Definition at line 280 of file praet_descriptor.h.
| #define PraetDescriptorWithin | ( | name_, | |
| pool_, | |||
| from_offset_, | |||
| to_offset_, | |||
| bytes_, | |||
| mensura_, | |||
| next_ ) |
Declares one transfer that moves bytes inside a single pool, and works out which way.
| name_ | Name of the descriptor. |
| pool_ | Pool both ends sit in. |
| from_offset_ | Bytes into that pool the read starts at. |
| to_offset_ | Bytes into that pool the write starts at. |
| bytes_ | Bytes to move. |
| mensura_ | Bytes moved in one step, as a EgoSumMensura. |
| next_ | The descriptor that runs after this one, or NULL. |
Definition at line 302 of file praet_descriptor.h.
| #define PraetCircular | ( | name_, | |
| from_pool_, | |||
| from_offset_, | |||
| to_pool_, | |||
| to_offset_, | |||
| bytes_, | |||
| mensura_ ) |
Declares one transfer that runs itself again, forever.
| name_ | Name of the descriptor. |
| from_pool_ | Pool the bytes come from. |
| from_offset_ | Bytes into that pool the read starts at. |
| to_pool_ | Pool the bytes go to. |
| to_offset_ | Bytes into that pool the write starts at. |
| bytes_ | Bytes to move. |
| mensura_ | Bytes moved in one step. |
Definition at line 321 of file praet_descriptor.h.
| #define PraetPingPong | ( | first_, | |
| second_, | |||
| from_pool_, | |||
| to_pool_, | |||
| first_from_, | |||
| first_to_, | |||
| second_from_, | |||
| second_to_, | |||
| bytes_, | |||
| mensura_ ) |
Declares two transfers that hand off to each other, forever.
| first_ | Name of the first descriptor. |
| second_ | Name of the second descriptor. |
| from_pool_ | Pool both transfers read from. |
| to_pool_ | Pool both transfers write to. |
| first_from_ | Bytes into the source pool the first transfer reads at. |
| first_to_ | Bytes into the destination pool the first transfer writes at. |
| second_from_ | Bytes into the source pool the second transfer reads at. |
| second_to_ | Bytes into the destination pool the second transfer writes at. |
| bytes_ | Bytes each transfer moves. |
| mensura_ | Bytes moved in one step. |
Definition at line 346 of file praet_descriptor.h.
| #define PraetPeripheralDeclare | ( | name_, | |
| address_ ) |
Declares one peripheral register a transfer may reach.
| name_ | Name of the peripheral. |
| address_ | Where the register is, as the vendor's own header gives it. |
Definition at line 374 of file praet_descriptor.h.
| #define PraetToPeripheral | ( | name_, | |
| from_pool_, | |||
| from_offset_, | |||
| peripheral_, | |||
| address_, | |||
| at_offset_, | |||
| bytes_, | |||
| mensura_, | |||
| next_ ) |
Declares one transfer that reads a pool and writes a peripheral.
| name_ | Name of the descriptor. |
| from_pool_ | Pool the bytes come from. |
| from_offset_ | Bytes into that pool the read starts at. |
| peripheral_ | Peripheral declared by PraetPeripheralDeclare. |
| address_ | Base of that peripheral, stated again here as the vendor's own name. |
| at_offset_ | Bytes into the peripheral block the transfer writes at. |
| bytes_ | Bytes to move. |
| mensura_ | Bytes moved in one step, as a EgoSumMensura. |
| next_ | The descriptor that runs after this one, or NULL. |
Definition at line 407 of file praet_descriptor.h.
| #define PraetFromPeripheral | ( | name_, | |
| peripheral_, | |||
| address_, | |||
| at_offset_, | |||
| to_pool_, | |||
| to_offset_, | |||
| bytes_, | |||
| mensura_, | |||
| next_ ) |
Declares one transfer that reads a peripheral and writes a pool.
| name_ | Name of the descriptor. |
| peripheral_ | Peripheral declared by PraetPeripheralDeclare. |
| address_ | Base of that peripheral, stated again here as the vendor's own name. |
| at_offset_ | Bytes into the peripheral block the transfer reads at. |
| to_pool_ | Pool the bytes go to. |
| to_offset_ | Bytes into that pool the write starts at. |
| bytes_ | Bytes to move. |
| mensura_ | Bytes moved in one step, as a EgoSumMensura. |
| next_ | The descriptor that runs after this one, or NULL. |
Definition at line 434 of file praet_descriptor.h.
| #define PRAET_DENUNTIATIO_ATTR | ( | message_ | ) |
Marks a declaration so that every use of it reports, with a message.
| [in] | message_ | Text the diagnostic reports, as a string literal. |
Definition at line 107 of file praet_ordo.h.
Referenced by PRAET_DENUNTIATIO_ATTR(), and PRAET_DENUNTIATIO_ATTR().
| #define PRAET_CRC_RESPONSUM_IN_LOCO_FIGERE | ( | token_ | ) |
Pastes token_ onto the answer type prefix.
| [in] | token_ | One of the two AD_VERBI_CONFINIUM_RESTITUE_PAULATIM_CRC tokens. |
Definition at line 140 of file praet_ordo.h.
| #define PRAET_CRC_RESPONSUM | ( | token_ | ) |
The answer type token_ names, after its expansion.
| [in] | token_ | One of the two AD_VERBI_CONFINIUM_RESTITUE_PAULATIM_CRC tokens, or a macro that holds one. |
Definition at line 150 of file praet_ordo.h.
| #define PRAET_CRC_VALUE_AD_VERBI_CONFINIUM_RESTITUE_PAULATIM_CRC_DISABLE |
The value the AD_VERBI_CONFINIUM_RESTITUE_PAULATIM_CRC_DISABLE token is for.
Definition at line 158 of file praet_ordo.h.
| #define PRAET_CRC_VALUE_AD_VERBI_CONFINIUM_RESTITUE_PAULATIM_CRC_ENABLE |
The value the AD_VERBI_CONFINIUM_RESTITUE_PAULATIM_CRC_ENABLE token is for.
Definition at line 163 of file praet_ordo.h.
| #define PRAET_CRC_VALUE_IN_LOCO_FIGERE | ( | token_ | ) |
Pastes token_ onto the value prefix.
| [in] | token_ | One of the two AD_VERBI_CONFINIUM_RESTITUE_PAULATIM_CRC tokens. |
Definition at line 171 of file praet_ordo.h.
| #define PRAET_CRC_VALUE | ( | token_ | ) |
The value token_ is for, after its expansion.
| [in] | token_ | One of the two AD_VERBI_CONFINIUM_RESTITUE_PAULATIM_CRC tokens, or a macro that holds one. |
Definition at line 181 of file praet_ordo.h.
| #define PRAET_ORDINEM_INCIPE | ( | crc_choice_ | ) |
An empty context, for a build with no recovery machinery to configure.
| crc_choice_ | One of the two AD_VERBI_CONFINIUM_RESTITUE_PAULATIM_CRC tokens, unused here. |
Definition at line 203 of file praet_ordo.h.
| #define PraetOrdoContext | ( | name_, | |
| crc_choice_ ) |
Declares one schedule context and answers the boundary word question for it.
| name_ | Name of the context this declares. |
| crc_choice_ | AD_VERBI_CONFINIUM_RESTITUE_PAULATIM_CRC_ENABLE or AD_VERBI_CONFINIUM_RESTITUE_PAULATIM_CRC_DISABLE. |
Definition at line 221 of file praet_ordo.h.
| #define PraetAttach | ( | context_, | |
| channel_, | |||
| pool_, | |||
| region_ ) |
Attaches a channel over a declared pool, by name.
| context_ | Context the channel belongs to. |
| channel_ | Channel to attach. |
| pool_ | Pool declared by ParsMemoriaeInternae or ParsMemoriaeExternum. |
| region_ | Region descriptor for this channel, as a byte. |
Definition at line 368 of file praet_ordo.h.
| #define PraetChannel | ( | context_, | |
| channel_, | |||
| pool_ ) |
Declares which pool a channel of a context is over.
| context_ | Context the channel belongs to. |
| channel_ | Channel number, as a literal, since it goes into the symbol this emits by paste. |
| pool_ | Pool declared by ParsMemoriaeInternae or ParsMemoriaeExternum. |
Definition at line 393 of file praet_ordo.h.
| #define PRAET_ALVEUS_SUPERARE | ( | context_, | |
| channel_, | |||
| pool_ ) |
Names the binding of a channel's declaration, and fails where there is none.
| context_ | Context the channel belongs to. |
| channel_ | Channel number, as a literal. |
| pool_ | Pool the caller believes the channel is over. |
Definition at line 412 of file praet_ordo.h.
| #define PRAET_SPAN_FITS | ( | pool_, | |
| offset_, | |||
| length_ ) |
Fails the build when a span runs past the pool it names.
| pool_ | Pool declared by ParsMemoriaeInternae or ParsMemoriaeExternum. |
| offset_ | Bytes into that pool the span starts at. |
| length_ | Bytes in the span. |
Definition at line 558 of file praet_ordo.h.
| #define PraetSubmit | ( | context_, | |
| channel_, | |||
| pool_, | |||
| offset_, | |||
| length_ ) |
Submits a span of a declared pool on a channel attached over that pool.
| context_ | Context the channel belongs to. |
| channel_ | Channel to run on. |
| pool_ | Pool declared by ParsMemoriaeInternae or ParsMemoriaeExternum. |
| offset_ | Bytes into that pool the transfer starts at. |
| length_ | Bytes it moves. |
Definition at line 603 of file praet_ordo.h.
| #define PRAET_CHANNELS |
Logical channels one context carries.
Definition at line 53 of file praet_praefinitum.h.
| #define PRAET_UNSET_CHANNELS |
Definition at line 54 of file praet_praefinitum.h.
| #define PRAET_SETTLE_MICROS |
Microseconds the engine spends in its settle before it will take a transfer.
Definition at line 68 of file praet_praefinitum.h.
| #define PRAET_UNSET_SETTLE_MICROS |
Definition at line 69 of file praet_praefinitum.h.
| #define PRAET_KEEPALIVE_MICROS |
Microseconds an active channel may go with no kick from the port before it reads stalled.
Definition at line 86 of file praet_praefinitum.h.
| #define PRAET_UNSET_KEEPALIVE_MICROS |
Definition at line 87 of file praet_praefinitum.h.
| #define PRAET_RECOVERY |
Whether a stalled transfer can go back or come out scrubbed.
Definition at line 104 of file praet_praefinitum.h.
| #define PRAET_UNSET_RECOVERY |
Definition at line 105 of file praet_praefinitum.h.
| #define PRAET_OPTIMIZE |
Whether a run records the work it did, on top of the states it reached.
Definition at line 52 of file praet_procurator.h.
| #define PRAET_PROCURATOR |
Whether a run records the states and transitions it reached.
Definition at line 69 of file praet_procurator.h.
| #define praet_procurator_transitus | ( | channel_, | |
| was_, | |||
| now_ ) |
Expands to nothing where PRAET_PROCURATOR is 0.
| channel_ | Channel whose word changed, discarded. |
| was_ | The word before, discarded. |
| now_ | The word after, discarded. |
Definition at line 120 of file praet_procurator.h.
| #define praet_procurator_report | ( | ) |
Expands to nothing where PRAET_PROCURATOR is 0.
Definition at line 125 of file praet_procurator.h.
| #define praet_procurator_opus | ( | type_ | ) |
Expands to nothing where PRAET_OPTIMIZE is 0.
| type_ | The work done, dropped. |
Definition at line 171 of file praet_procurator.h.
| #define PRAET_SEPARATUS |
Detached: the channel holds no engine and no vector.
Definition at line 35 of file praet_tabula_vexillorum.h.
| #define PRAET_ADNEXUS |
Attached: the channel holds the engine and will take a transfer.
Definition at line 40 of file praet_tabula_vexillorum.h.
| #define PRAET_BUSY |
Busy: the engine moves bytes on this channel.
Definition at line 48 of file praet_tabula_vexillorum.h.
| #define PRAET_OK |
Ok: the last transfer finished and the channel is still attached.
Definition at line 56 of file praet_tabula_vexillorum.h.
| #define PRAET_CORE_BITS |
Bits the quaternary core occupies, at the bottom of the word.
Definition at line 61 of file praet_tabula_vexillorum.h.
| #define PRAET_CORE_MASK |
The two bits the quaternary core occupies.
Definition at line 69 of file praet_tabula_vexillorum.h.
| #define PRAET_ID_CLAIMED |
Token id of the status set while the channel holds an interrupt vector.
Definition at line 74 of file praet_tabula_vexillorum.h.
| #define PRAET_ID_SETTLING |
Token id of the status set while the engine settles.
Definition at line 79 of file praet_tabula_vexillorum.h.
| #define PRAET_ID_SEPARANS |
Token id of the status set while a detach is in progress.
Definition at line 84 of file praet_tabula_vexillorum.h.
| #define PRAET_ID_ERROR |
Token id of the status set where the last transfer ended in an error.
Definition at line 89 of file praet_tabula_vexillorum.h.
| #define PRAET_ID_STALLED |
Token id of the status set where an active channel went unkicked for a whole window.
Definition at line 94 of file praet_tabula_vexillorum.h.
| #define PRAET_ID_ABANDONED |
Token id of the status set where a stalled transfer went back.
Definition at line 99 of file praet_tabula_vexillorum.h.
| #define PRAET_ID_SCRUBBED |
Token id of the status set where a stalled transfer's bytes counted as unsafe.
Definition at line 104 of file praet_tabula_vexillorum.h.
| #define PRAET_ID_MEASURED |
Token id of the status set where a recovery measured the boundary word.
Definition at line 109 of file praet_tabula_vexillorum.h.
| #define PRAET_STATUS_COUNT |
How many status token ids there are.
Definition at line 117 of file praet_tabula_vexillorum.h.
| #define PRAET_STATUS_SHIFT |
First bit the statuses occupy, the bit above the core.
Definition at line 122 of file praet_tabula_vexillorum.h.
| #define PRAET_STATUS_BIT | ( | id_ | ) |
The bit a status token id owns.
| [in] | id_ | Status token id, below PRAET_STATUS_COUNT. |
Definition at line 132 of file praet_tabula_vexillorum.h.
| #define PRAET_STATUS_MASK |
Every bit the statuses occupy, derived from how many there are.
Definition at line 137 of file praet_tabula_vexillorum.h.
| #define PRAET_CLAIMED |
Set while the channel holds an interrupt vector.
Definition at line 145 of file praet_tabula_vexillorum.h.
| #define PRAET_SETTLING |
Set while the engine settles and will take no transfer.
Definition at line 150 of file praet_tabula_vexillorum.h.
| #define PRAET_SEPARANS |
Set where a detach is in progress and the channel did not finish it.
Definition at line 155 of file praet_tabula_vexillorum.h.
| #define PRAET_ERROR |
Set where the last transfer ended in an error, clear where it completed.
Definition at line 160 of file praet_tabula_vexillorum.h.
| #define PRAET_STALLED |
Set where an active channel went a whole keepalive window with no kick.
Definition at line 168 of file praet_tabula_vexillorum.h.
| #define PRAET_ABANDONED |
Set where a stalled transfer went back and its bytes stayed as they were.
Definition at line 176 of file praet_tabula_vexillorum.h.
| #define PRAET_SCRUBBED |
Set where a stalled transfer resolved with its bytes counted as unsafe.
Definition at line 184 of file praet_tabula_vexillorum.h.
| #define PRAET_MEASURED |
Set where a recovery measured the word the engine was in the middle of.
Definition at line 196 of file praet_tabula_vexillorum.h.
| #define PRAET_EVERY_STATUS |
Every status, listed by name.
Definition at line 205 of file praet_tabula_vexillorum.h.
| #define PRAET_REGION_SHIFT |
First bit of the region descriptor.
Definition at line 219 of file praet_tabula_vexillorum.h.
| #define PRAET_REGION_BITS |
How wide the region descriptor is.
Definition at line 224 of file praet_tabula_vexillorum.h.
| #define PRAET_REGION_MAX |
The largest descriptor the region field holds.
Definition at line 229 of file praet_tabula_vexillorum.h.
| #define PRAET_REGION_MASK |
The bits the region descriptor occupies once shifted into place.
Definition at line 234 of file praet_tabula_vexillorum.h.
| #define PRAET_REGION_FIELD | ( | region_ | ) |
A region descriptor placed in the field the map gives it.
| [in] | region_ | Region descriptor, narrowed to what the field holds. |
Definition at line 244 of file praet_tabula_vexillorum.h.
| #define PRAET_REGION_ID_HIGHEST |
The largest region token id there is.
Definition at line 271 of file praet_tabula_vexillorum.h.
| #define PRAET_MAP_MASK |
Every bit the map accounts for.
Definition at line 279 of file praet_tabula_vexillorum.h.
| typedef void(*) mmgr_praet_callback(const mmgr_praet_event *event, void *user) |
Reports a finished transfer to whatever registered this callback.
| [in] | event | The completion event [BORROWS]. |
| [in] | user | The pointer registered alongside this callback [BORROWS]. |
Definition at line 57 of file memoriam_praetereo.h.
| enum PraetAddressing |
How an address behaves as a transfer runs.
| Enumerator | |
|---|---|
| PRAET_ADDRESS_ADVANCES | The address moves on by the transfer width each step. |
| PRAET_ADDRESS_FIXED | The address stays where it is, as a peripheral is. |
Definition at line 47 of file praet_descriptor.h.
| enum EgoSumMensura |
Bytes the engine moves in one step, the measure of everything else.
| Enumerator | |
|---|---|
| PRAET_MENSURA_OCTETUS | One byte a step. |
| PRAET_MENSURA_SEMIVERBUM | Half a word a step. |
| PRAET_MENSURA_VERBUM | A whole word a step. |
Definition at line 63 of file praet_descriptor.h.
| enum DirectioMotusVerbi |
Which way a transfer walks the words it moves.
Definition at line 89 of file praet_descriptor.h.
| enum PraetDescriptorOwner |
Who holds a descriptor.
| Enumerator | |
|---|---|
| PRAET_OWNER_SOFTWARE | The program may read it and write it. |
| PRAET_OWNER_ENGINE | The engine works from it, and it alone may touch it. |
Definition at line 122 of file praet_descriptor.h.
The two answers a declaration may give about the boundary word check.
Definition at line 83 of file praet_ordo.h.
| enum PraetRegion |
The regions a channel can attach over.
Definition at line 259 of file praet_tabula_vexillorum.h.
| EMBED_HOST_DEVICE embed_bool mmgr_praet_open | ( | const PraetCfg * | args | ) |
Opens args->channel and registers args->on_complete against it.
| [in] | args | Channel, peripheral, loopback flag and completion callback [BORROWS]. |
References mmgr_praet_open().
Referenced by mmgr_praet_open().
| EMBED_HOST_DEVICE embed_bool mmgr_praet_tx_submit | ( | const PraetTransferCfg * | args | ) |
Submits args->bytes of args->buf on args->channel.
| [in] | args | Channel, buffer and byte count [BORROWS]. |
References mmgr_praet_tx_submit().
Referenced by mmgr_praet_tx_submit().
| EMBED_HOST_DEVICE void mmgr_praet_close | ( | const PraetTransferCfg * | args | ) |
Closes args->channel.
| [in] | args | Channel to close [BORROWS]. |
References mmgr_praet_close().
Referenced by mmgr_praet_close().
| EMBED_HOST_DEVICE void mmgr_praet_poll | ( | const PraetCfg * | args | ) |
Drives the port layer's poll hook.
| [in] | args | Channel to poll [BORROWS]. |
References mmgr_praet_poll().
Referenced by mmgr_praet_poll().
| EMBED_HOST_DEVICE embed_bool mmgr_praet_hw_open | ( | const PraetCfg * | args | ) |
Opens a DMA channel on real hardware.
| [in] | args | Channel, peripheral, loopback flag and completion callback, as mmgr_praet_open forwards them [BORROWS]. |
References mmgr_praet_hw_open().
Referenced by mmgr_praet_hw_open().
| EMBED_HOST_DEVICE embed_bool mmgr_praet_hw_tx_submit | ( | const PraetTransferCfg * | args | ) |
Submits a transfer on real hardware.
| [in] | args | Channel, buffer and byte count, as mmgr_praet_tx_submit forwards them [BORROWS]. |
References mmgr_praet_hw_tx_submit().
Referenced by mmgr_praet_hw_tx_submit().
| EMBED_HOST_DEVICE void mmgr_praet_hw_close | ( | const PraetTransferCfg * | args | ) |
Closes a DMA channel on real hardware.
| [in] | args | Channel to close, as mmgr_praet_close forwards it [BORROWS]. |
References mmgr_praet_hw_close().
Referenced by mmgr_praet_hw_close().
| EMBED_HOST_DEVICE void mmgr_praet_hw_poll | ( | const PraetCfg * | args | ) |
Advances whatever poll work the port layer needs.
| [in] | args | Channel to poll, exactly as the caller gave it [BORROWS]. |
References mmgr_praet_hw_poll().
Referenced by mmgr_praet_hw_poll().
| EMBED_HOST_DEVICE embed_word praet_descriptor_chain_length | ( | const PraetDescriptor * | first, |
| embed_word | limit ) |
Counts the descriptors a chain reaches before it repeats or ends.
| [in] | first | First descriptor in the chain [BORROWS]. |
| [in] | limit | How many links to follow before the walk stops. |
limit where the chain is longer than that. References praet_descriptor_chain_length().
Referenced by praet_descriptor_chain_length().
| typedef PRAET_DENUNTIATIO_ATTR | ( | "AD_VERBI_CONFINIUM_RESTITUE_PAULATIM_CRC_DISABLE - this context measures no boundary word. A " "recovery is exact to the word and no " "finer" | ) |
A type that exists only for the AD_VERBI_CONFINIUM_RESTITUE_PAULATIM_CRC_DISABLE token.
References PRAET_DENUNTIATIO_ATTR.
| typedef PRAET_DENUNTIATIO_ATTR | ( | "AD_VERBI_CONFINIUM_RESTITUE_PAULATIM_CRC_ENABLE - this context checksums the word a stalled " "transfer was | inside, |
| one | word, | ||
| bit at a | time, | ||
| on the recovery path " "only" | ) |
A type that exists only for the AD_VERBI_CONFINIUM_RESTITUE_PAULATIM_CRC_ENABLE token.
References PRAET_DENUNTIATIO_ATTR.
| EMBED_HOST_DEVICE uint16_t praet_hw_progress | ( | embed_word | channel | ) |
Returns how far the port says channel has got, in bytes.
| [in] | channel | Channel to read. |
References praet_hw_progress().
Referenced by praet_hw_progress().
| EMBED_HOST_DEVICE void praet_ordo_reset | ( | PraetOrdo * | context | ) |
Clears a context back to every channel detached.
| [out] | context | Context to clear [BORROWS]. |
References praet_ordo_reset().
Referenced by praet_ordo_reset().
| EMBED_HOST_DEVICE embed_bool praet_ordo_adnectere | ( | PraetOrdo * | context, |
| embed_word | channel, | ||
| uint8_t * | bound, | ||
| embed_word | bytes, | ||
| embed_word | region ) |
Attaches a channel over a block of bytes, claims its vector, and starts the settle timer.
| [in,out] | context | Context the channel belongs to [BORROWS]. |
| [in] | channel | Channel to attach. |
| [in] | bound | First byte of the memory this channel moves. The caller's [BORROWS]. |
| [in] | bytes | How many bytes are there. |
| [in] | region | Region descriptor for this channel, as a byte. |
References praet_ordo_adnectere().
Referenced by praet_ordo_adnectere().
| EMBED_HOST_DEVICE void praet_ordo_separare | ( | PraetOrdo * | context, |
| embed_word | channel ) |
Asks for the detach of a channel.
| [in,out] | context | Context the channel belongs to [BORROWS]. |
| [in] | channel | Channel to detach. |
References praet_ordo_efficere(), praet_ordo_relatio(), and praet_ordo_separare().
Referenced by praet_ordo_separare().
| EMBED_HOST_DEVICE embed_bool praet_ordo_relatio | ( | PraetOrdo * | context, |
| embed_word | channel ) |
Marks a channel busy and starts its keepalive window.
| [in,out] | context | Context the channel belongs to [BORROWS]. |
| [in] | channel | Channel to run on. |
References praet_ordo_relatio().
Referenced by praet_ordo_relatio(), and praet_ordo_separare().
| EMBED_HOST_DEVICE void praet_ordo_efficere | ( | PraetOrdo * | context, |
| embed_word | channel ) |
Feeds the watchdog for one channel.
| [in,out] | context | Context the channel belongs to [BORROWS]. |
| [in] | channel | Channel that showed a sign of life. |
References praet_ordo_efficere().
Referenced by praet_ordo_efficere(), and praet_ordo_separare().
| EMBED_HOST_DEVICE void praet_ordo_completed | ( | PraetOrdo * | context, |
| embed_word | channel, | ||
| embed_bool | failed ) |
Reports that a channel's transfer finished.
| [in,out] | context | Context the channel belongs to [BORROWS]. |
| [in] | channel | Channel that finished. |
| [in] | failed | EMBED_TRUE where it ended in an error, EMBED_FALSE on a completion. |
References praet_ordo_completed().
Referenced by praet_ordo_completed().
| EMBED_HOST_DEVICE void praet_ordo_advance | ( | PraetOrdo * | context, |
| embed_word | micros ) |
Advances the clock by micros.
| [in,out] | context | Context to advance [BORROWS]. |
| [in] | micros | Microseconds to add. |
References praet_ordo_advance().
Referenced by praet_ordo_advance().
| EMBED_HOST_DEVICE void praet_ordo_advance_ticks | ( | PraetOrdo * | context, |
| embed_word | ticks ) |
Advances the clock by ticks, scaled against the declared frequency.
| [in,out] | context | Context to advance [BORROWS]. |
| [in] | ticks | Ticks read off the clock this build declared. |
References praet_ordo_advance_ticks().
Referenced by praet_ordo_advance_ticks().
| EMBED_HOST_DEVICE void praet_ordo_raise | ( | PraetOrdo * | context | ) |
Is in for the interrupt that raises the set volatile.
| [in,out] | context | Context the interrupt belongs to [BORROWS]. |
References praet_ordo_raise().
Referenced by praet_ordo_raise().
| EMBED_HOST_DEVICE void praet_ordo_poll | ( | PraetOrdo * | context | ) |
Drives the port and brings every flag word up to date. The caller's poll.
| [in,out] | context | Context to poll [BORROWS]. |
References praet_ordo_poll().
Referenced by praet_ordo_poll().
| EMBED_HOST_DEVICE uint32_t praet_ordo_flags | ( | const PraetOrdo * | context, |
| embed_word | channel ) |
Returns one channel's flag word.
| [in] | context | Context the channel belongs to [BORROWS]. |
| [in] | channel | Channel to read. |
References praet_ordo_flags().
Referenced by praet_ordo_flags().
|
static |
Dispatch table instance named praet.
Definition at line 208 of file memoriam_praetereo.h.