A transfer written down: where from, where to, how many bytes, how each address moves, and what runs after it. More...
#include "memoriam_praetereo/praet_ordo.h"Go to the source code of this file.
Data Structures | |
| struct | PraetDescriptor |
| One transfer, written down. 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. | |
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 everything else is counted in. 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... | |
Functions | |
| embed_word | praet_descriptor_chain_length (const PraetDescriptor *first, embed_word limit) |
| Counts the descriptors a chain reaches before it repeats or ends. | |
A transfer written down: where from, where to, how many bytes, how each address moves, and what runs after it.
Definition in file praet_descriptor.h.
| #define PRAET_MENSURA_MAXIMA |
The largest measure this module knows about.
Definition at line 72 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 107 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 naming 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 177 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 the descriptor is reached by. |
| from_pool_ | Pool the bytes are read from. |
| from_offset_ | Bytes into that pool the read starts at. |
| to_pool_ | Pool the bytes are written 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 208 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 the descriptor is reached by. |
| from_pool_ | Pool the bytes are read from. |
| from_offset_ | Bytes into that pool the read starts at. |
| to_pool_ | Pool the bytes are written 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 are walked, as a DirectioMotusVerbi. |
| next_ | The descriptor that runs after this one, or NULL. |
Definition at line 237 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 are read from. |
| to_pool_ | Pool the bytes are written to. |
Definition at line 257 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 the descriptor is reached by. |
| from_pool_ | Pool the bytes are read from. |
| from_offset_ | Bytes into that pool the read starts at. |
| to_pool_ | Pool the bytes are written to. |
| to_offset_ | Bytes into that pool the write starts at. |
| bytes_ | Bytes to move. |
| mensura_ | Bytes moved in one step. |
Definition at line 276 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 the descriptor is reached by. |
| 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 298 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 the descriptor is reached by. |
| from_pool_ | Pool the bytes are read from. |
| from_offset_ | Bytes into that pool the read starts at. |
| to_pool_ | Pool the bytes are written to. |
| to_offset_ | Bytes into that pool the write starts at. |
| bytes_ | Bytes to move. |
| mensura_ | Bytes moved in one step. |
Definition at line 317 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 the first descriptor is reached by. |
| second_ | Name the second descriptor is reached by. |
| 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 342 of file praet_descriptor.h.
| #define PraetPeripheralDeclare | ( | name_, | |
| address_ ) |
Declares one peripheral register a transfer may reach.
| name_ | Name the peripheral is reached by. |
| address_ | Where the register is, as the vendor's own header gives it. |
Definition at line 370 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 the descriptor is reached by. |
| from_pool_ | Pool the bytes are read 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 403 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 the descriptor is reached by. |
| 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 are written 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 430 of file praet_descriptor.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 43 of file praet_descriptor.h.
| enum EgoSumMensura |
Bytes the engine moves in one step, the measure everything else is counted in.
| 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 59 of file praet_descriptor.h.
| enum DirectioMotusVerbi |
Which way a transfer walks the words it moves.
Definition at line 85 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 is working from it,, alone may touch it. |
Definition at line 118 of file praet_descriptor.h.
| 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 giving up. |
limit where the chain is longer than that. References praet_descriptor_chain_length().
Referenced by praet_descriptor_chain_length().