(no commit message)
authorlkcl <lkcl@web>
Sat, 9 Oct 2021 14:40:49 +0000 (15:40 +0100)
committerIkiWiki <ikiwiki.info>
Sat, 9 Oct 2021 14:40:49 +0000 (15:40 +0100)
3d_gpu/architecture/dynamic_simd/shape.mdwn

index 8be82debf35add23c77dd1f4e4f2e5d4fbfd1036..9b9f4248396513967c7d39d6428bf7bbbbd02d4d 100644 (file)
@@ -104,16 +104,16 @@ occur on `Shape.width`.
 
 With this capability it becomes possible to use the Liskov Substitution
 Principle in dynamically compiling code that switches between scalar and
-SIMD:
+SIMD transparently:
 
     # scalar context
     scalarctx = scl = object()
     scl.XLEN = 64
-    scl.SigKls = Signal
+    scl.SigKls = Signal         # standard nmigen Signal
     # SIMD context
     simdctx = sdc = object()
     sdc = SimdShape(64, ....)
-    sdc.SigKls = SimdSignal
+    sdc.SigKls = SimdSignal     # advanced SIMD Signal
     sdc.elwidth = Signal(2)
     # select one 
     if compiletime_switch == 'SIMD':
@@ -126,4 +126,5 @@ SIMD:
     with ctx:
         x = ctx.SigKls(ctx.XLEN)
         ...
+    m.d.comb += x.eq(Const(3))