Generated reference › Data Store Memory — Control Systems/Signal Routing
kind: generated#block#control-systems-signal-routing

Data Store Memory — Control Systems/Signal Routing

Control_Systems/Signal_Routing/Data_Store_Memory · 0 input / 0 output port(s) at insert · exports to Python, MATLAB, Java, Rust, C, C++, VHDL, Verilog, SystemVerilog, PLC Structured Text

Description#

The block's own DESCRIPTION_HTML, rendered verbatim — the same text the config dialog's info panel and the library navigator show. Fix a wrong sentence in the block's .cpp (R-D9), never here.

Data Store Memory

Control Systems / Signal Routing

Declares a named data store: a matrix that Data Store Write blocks write and Data Store Read blocks read, by name, with no wire between them. The store holds Initial value until a Write replaces it, and keeps what was last written from one step to the next. Simulink’s Data Store Memory (BlockType=DataStoreMemory).

Ports

None.

Parameters

  • Data store name – A (default). The name a Read or a Write gives to reach this store. Names are case-sensitive: Dx and dx are two stores. It is a name, never looked up in the variables space.
  • Initial value – 0 (default); a scalar or a matrix, or a variable’s name. What a Read gives before any Write, at the start of every run.
  • Dimensions – -1 (default) takes the store’s size from Initial value. A size, n (a 1×n row) or [r c], expands a scalar initial value to that size; a matrix initial value must already have it.
  • Read before write – none (default), warning or error: what a run reports when a Read, in a step, reads the store before any Write has written it in that step – which includes every Read of a store nothing writes.
  • Write after write – warning (default), none or error: a Write, in a step, after another Write has already written the store in that step.
  • Write after read – none (default), warning or error: a Write, in a step, after a Read has read the store in that step.
  • Sampling Time (s) – zero or less inherits the solver’s rate; a positive value runs the block at that period. The block computes nothing, so its rate changes no value, and Simulink’s Data Store Memory has no SampleTime: it does not cross the bridge.

Each of the three is reported once per run, in Simulink’s words and with its message ID; error stops the run.

Scope

  • A store is visible at the level its Memory sits in and in every subsystem below it, never above it or in a sibling. A Read or a Write that finds none stops the run: Data store memory with name 'A' was not found for block …, as Simulink says it.
  • A Memory inside a subsystem shadows one of the same name further out, for the blocks at its level and below. Two Memories with one name at the same level stop the run.

Code export

All ten targets: the store is a named global of the exported core (ds0, ds1, …), held beside the signals and seeded with the initial value where the target seeds its state; Python, MATLAB, Java, Rust, C and C++ hold it in doubles, VHDL, Verilog and SystemVerilog in their Q16.16 fixed point, and PLC Structured Text in LREAL. The block itself emits no statement. An export of a subsystem whose Reads or Writes reach a store declared outside it is refused by name, because the core would have nowhere to hold the store. The three diagnostics are the simulation’s; an exported core does not report them.

Simulink bridge

Both directions, as simulink/Signal Routing/Data Store Memory. Data store name goes to DataStoreName, Initial value to InitialValue, Dimensions to Dimensions, and the three diagnostics to ReadBeforeWriteMsg, WriteAfterWriteMsg and WriteAfterReadMsg, one value for one value. Simulink’s block has no SampleTime, so none is written. Its data type (OutDataTypeStr), signal type, storage class and logging settings do not cross: a store here is double.

Notes

  • A store written in one step is read by a Read later in the same step: a Write is ordered before the Reads of its store wherever no data path or loop says otherwise, as Simulink orders them. A data path from a Read to a Write of the same store wins, so Read → +1 → Write counts 0, 1, 2, … with no delay block.
  • Simulink’s block Priority, which reverses that order, has no counterpart here; an import names each block that carries one.
  • A global store backed by a workspace Simulink.Signal is not supported.

Code facts#

FactValue
registered typeControl_Systems/Signal_Routing/Data_Store_Memory
familyControl_Systems/Signal_Routing
solver environment classICoreBlock_0_Control_Systems_1_Signal_Routing_2_Data_Store_Memory
sourcesrc/ICoreBlocks/ICoreBlockLibrary/Blocks/Control_Systems/Signal_Routing/Data_Store_Memory/ICoreBlock_0_Control_Systems_1_Signal_Routing_2_Data_Store_Memory.cpp
headersrc/ICoreBlocks/ICoreBlockLibrary/Blocks/Control_Systems/Signal_Routing/Data_Store_Memory/ICoreBlock_0_Control_Systems_1_Signal_Routing_2_Data_Store_Memory.h
default size on canvas80 × 60 px
ports at insert0 in, 0 out
code generators implementedPython, MATLAB, Java, Rust, C, C++, VHDL, Verilog, SystemVerilog, PLC Structured Text

Ports#

The constructor creates no port explicitly — the port list comes from registerInitialPorts (0 in, 0 out) or from the block's configuration.

Configuration variables#

Config variableDefaultSimulink parameter
Data store nameADataStoreName
Initial value0InitialValue
Dimensions-1Dimensions
Read before writenone%~%warning%~%error~~noneReadBeforeWriteMsg
Write after writenone%~%warning%~%error~~warningWriteAfterWriteMsg
Write after readnone%~%warning%~%error~~noneWriteAfterReadMsg

Every block also carries Sampling Time (s) from ICoreBlockSolverEnvironment: zero or less inherits the solver's rate, a positive value runs the block at that period.

supportSupport::Both
Simulink pathsimulink/Signal Routing/Data Store Memory
port-count rulePortsParam::None
SampleTime parameterno — the counterpart defines none; the rate stays on the ICore side
ICore configSimulink parameterValue translation
Data store nameDataStoreNamepasses through
Initial valueInitialValuepasses through
DimensionsDimensionspasses through
Read before writeReadBeforeWriteMsgnone → none, warning → warning, error → error
Write after writeWriteAfterWriteMsgnone → none, warning → warning, error → error
Write after readWriteAfterReadMsgnone → none, warning → warning, error → error

Caveat (shown to the user): A store here is double: Simulink's OutDataTypeStr, SignalType, storage class and logging settings do not cross. A global store backed by a workspace Simulink.Signal is not supported.

Catalog contract: src/ICoreBlocks/ICoreCoder/ICoreCommandSystem/SimulinkBridge/ICoreSimulinkBlockCatalog.h

Description vs code#

The checker has a blind spot here — it could not resolve something (a grouped port bullet, a computed config name), which is reported and never counted as a pass. A reader has to settle it:

  • B0 no sample under docs/generated/samples/ — nothing to cross-check (P8.1)

The verdict above is tools/docs/check_block_descriptions.py (P7.1), which compares LISTS. It cannot read a sentence: "stateless" on a block with a state, an initial-value semantic the recursion does not implement, a "not synthesizable" caveat the HDL banner contradicts. That is the agent audit (P7.3) on BLOCK_DESCRIPTION_AUDIT.md, and this tool's green is not a substitute for one.

Sample results#

No sample run is committed for this block. Samples come from the headless harness (DOCS_PLAN.md P8.1) into docs/generated/samples/; until one exists this block's behaviour is witnessed by the parity and export-verification suites, not by a plot here.