From 19fd0901f92d28f3bd199a11229ff4c1d39e3af7 Mon Sep 17 00:00:00 2001 From: lkcl Date: Sat, 9 Oct 2021 15:40:49 +0100 Subject: [PATCH] --- 3d_gpu/architecture/dynamic_simd/shape.mdwn | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/3d_gpu/architecture/dynamic_simd/shape.mdwn b/3d_gpu/architecture/dynamic_simd/shape.mdwn index 8be82debf..9b9f42483 100644 --- a/3d_gpu/architecture/dynamic_simd/shape.mdwn +++ b/3d_gpu/architecture/dynamic_simd/shape.mdwn @@ -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)) -- 2.30.2