From 31610c7eac17e9e5c52e2a53d7cb6d5d744c7b07 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sun, 24 Oct 2021 11:13:56 +0100 Subject: [PATCH] add docstrings for additional necessary context-aware versions of Signal.like and Shape in SimdScope. --- src/ieee754/part/simd_scope.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/ieee754/part/simd_scope.py b/src/ieee754/part/simd_scope.py index db080a58..7daaa6ac 100644 --- a/src/ieee754/part/simd_scope.py +++ b/src/ieee754/part/simd_scope.py @@ -138,6 +138,14 @@ class SimdScope: f" vec_el_counts={self.vec_el_counts},\n" f" full_el_count={self.full_el_count})") + ################## + # from here, the functions are context-aware variants of standard + # nmigen API (Signal, Signal.like, Shape) which are to be redirected + # to either their standard scalar nmigen equivalents (verbatim) + # or to the SimdSignal equivalents. each one is to be documented + # CAREFULLY and CLEARLY. + ################## + def Signal(self, shape=None, *, name=None, reset=0, reset_less=False, attrs=None, decoder=None, src_loc_at=0): if self.scalar: @@ -167,3 +175,17 @@ class SimdScope: # set the module context so that the SimdSignal can create # its own submodules during AST creation s.set_module(self.module) + + # XXX TODO + def Signal_like(self): pass + #if self.scalar: + # scalar mode, just return nmigen Signal.like. THIS IS IMPORTANT. + # else + # simd mode. + + # XXX TODO + def Shape(self): pass + #if self.scalar: + # scalar mode, just return nmigen Shape. THIS IS IMPORTANT. + # else + # simd mode. -- 2.30.2