Description: Have an operator or a function that represents a pipeline register that can be used in __call__. Currently the only way to add a register is to declare it in __init__.
Benefits: Creating pipelined designs would become more ergonomic (cc @jack-melchert). Also possibly allows for interpreting time-sequences of values which could be used for testing, verification, and maybe timing-aware rewrite rules.
Semantics: Pipeline(init: T, val: T) -> T - For atemporal semantics, it would just return init. for time-sequences, it would prepend init (shifting the sequence by 1). For magma compilation, it would just stamp out a register initialized to init.
Possible APIs: (+) unary operation could be used with a default (0 or X) init. Otherwise an imported function Pipeline(init: T, val: T) -> T
Description: Have an operator or a function that represents a pipeline register that can be used in
__call__
. Currently the only way to add a register is to declare it in__init__
.Benefits: Creating pipelined designs would become more ergonomic (cc @jack-melchert). Also possibly allows for interpreting time-sequences of values which could be used for testing, verification, and maybe timing-aware rewrite rules.
Semantics:
Pipeline(init: T, val: T) -> T
- For atemporal semantics, it would just return init. for time-sequences, it would prepend init (shifting the sequence by 1). For magma compilation, it would just stamp out a register initialized to init.Possible APIs: (+) unary operation could be used with a default (0 or X) init. Otherwise an imported function
Pipeline(init: T, val: T) -> T