ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
ra8_dmac_internal.h File Reference

Test-access surface for ra8_dmac internal helpers (MC/DC). More...

#include <stdint.h>
#include "ra8_attributes.h"
Include dependency graph for ra8_dmac_internal.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

bool priv_ra8_dmac_internal_mode_disables_dts (uint32_t mode_normal_val, uint32_t mode_repeat_block_val, uint32_t mode)
 Pure predicate for the DMTMD-DTS "no repeat" decision.
bool priv_ra8_dmac_internal_dmint_extra_irq (bool irq_each, uint32_t mode_repeat_block_val, uint32_t mode)
 Pure predicate for the DMINT "extra IRQ bits" decision.

Detailed Description

Test-access surface for ra8_dmac internal helpers (MC/DC).

Not part of the public API. Tests under tests/ MAY include this header to drive compound boolean decisions that sit in TU-private helpers behind the public ra8_dmac facade. See CLAUDE.md "Test access to internal symbols (MC/DC scope)".

Definition in file ra8_dmac_internal.h.

Function Documentation

◆ priv_ra8_dmac_internal_dmint_extra_irq()

bool priv_ra8_dmac_internal_dmint_extra_irq ( bool irq_each,
uint32_t mode_repeat_block_val,
uint32_t mode )

Pure predicate for the DMINT "extra IRQ bits" decision.

Returns true iff irq_each is set AND mode is not REPEAT_BLOCK. Promoted from the inline compound AND at libs/ra8_hal/src/ra8_dmac.c inside internal_dmint_value.

Parameters
[in]irq_eachBoolean: per-block IRQ enable.
[in]mode_repeat_block_valNumeric value of k_ra8_dmac_mode_repeat_block.
[in]modeCandidate mode value.
Returns
Boolean enable-extra-IRQ predicate.
Return values
trueCaller must OR in RPTIE | ESIE.
falseCaller leaves RPTIE / ESIE clear.
Precondition
None.
None.
Postcondition
No state mutated.
Return value depends solely on the three inputs.
Note
Test-access only. Pure function.
MC/DC:
2-condition AND; N+1 = 3 vectors:
  • irq_each=false, mode!=rb -> false
  • irq_each=true, mode!=rb -> true (varies left)
  • irq_each=true, mode==rb -> false (varies right)
Since
0.1.0

Pure predicate for the DMINT "extra IRQ bits" decision.

Promoted helper so the line-246 AND can be driven under MC/DC.

Parameters
[in]irq_eachBoolean: per-block IRQ enable.
[in]mode_repeat_block_valNumeric value of k_ra8_dmac_mode_repeat_block.
[in]modeCandidate mode value.
Returns
Boolean predicate.
Return values
trueCaller must OR in RPTIE | ESIE.
falseLeave RPTIE / ESIE clear.
Precondition
None.
None.
Postcondition
No state mutated.
Return depends solely on inputs.
Note
Pure; thread-safe.
Since
0.1.0

Definition at line 87 of file ra8_dmac.c.

Referenced by internal_dmint_value().

◆ priv_ra8_dmac_internal_mode_disables_dts()

bool priv_ra8_dmac_internal_mode_disables_dts ( uint32_t mode_normal_val,
uint32_t mode_repeat_block_val,
uint32_t mode )

Pure predicate for the DMTMD-DTS "no repeat" decision.

Returns true iff the transfer mode is NORMAL or REPEAT_BLOCK (the two modes that disable DTS). Promoted from the inline compound OR at libs/ra8_hal/src/ra8_dmac.c inside internal_dts_code so the decision can be driven directly under -fcoverage-mcdc. Both inputs are plain integers (the enum values from ra8_dmac_mode_t); the helper performs no register I/O and has no preconditions.

Parameters
[in]mode_normal_valNumeric value of k_ra8_dmac_mode_normal.
[in]mode_repeat_block_valNumeric value of k_ra8_dmac_mode_repeat_block.
[in]modeCandidate mode value.
Returns
Boolean DTS-disabled predicate.
Return values
trueMode disables DTS (NORMAL or REPEAT_BLOCK).
falseMode requires a non-zero DTS code.
Precondition
None.
None.
Postcondition
No state mutated.
Return value depends solely on the three inputs.
Note
Test-access only. Pure function.
MC/DC:
2-condition OR; N+1 = 3 vectors:
  • mode != normal && mode != repeat_block -> false
  • mode == normal -> true (varies left)
  • mode == repeat_block -> true (varies right)
Since
0.1.0

Pure predicate for the DMTMD-DTS "no repeat" decision.

Promoted helper so the line-151 OR can be driven under MC/DC.

Parameters
[in]mode_normal_valNumeric value of k_ra8_dmac_mode_normal.
[in]mode_repeat_block_valNumeric value of k_ra8_dmac_mode_repeat_block.
[in]modeCandidate mode value.
Returns
Boolean predicate.
Return values
trueMode disables DTS.
falseMode requires non-zero DTS code.
Precondition
None.
None.
Postcondition
No state mutated.
Return depends solely on inputs.
Note
Pure; thread-safe.
Since
0.1.0

Definition at line 64 of file ra8_dmac.c.

Referenced by internal_dts_code().