From 2a563d565ff3ea16c6a9124f27ce55a0f71dfb62 Mon Sep 17 00:00:00 2001 From: Jacob Lifshay Date: Wed, 27 Oct 2021 20:57:29 -0700 Subject: [PATCH] format code --- src/ieee754/part/partsig.py | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/src/ieee754/part/partsig.py b/src/ieee754/part/partsig.py index af2057a2..d467edd7 100644 --- a/src/ieee754/part/partsig.py +++ b/src/ieee754/part/partsig.py @@ -65,9 +65,9 @@ def get_runlengths(pbit, size): # identify where the 1s are, which indicates "start of a new partition" # we want a list of the lengths of all partitions for i in range(size): - if pbit & (1<>(offset*stride)[:width]") + "(self>>(offset*stride)[:width]") # TODO, http://bugs.libre-riscv.org/show_bug.cgi?id=716 + def __Slice__(self, start, stop, *, src_loc_at=0): # NO. Swizzled shall NOT be deployed, it violates # Project Development Practices @@ -240,7 +242,7 @@ class SimdSignal(UserValue): return PRepl(self.m, self, count, self.ptype) def __Cat__(self, *args, src_loc_at=0): - print ("partsig cat", self, args) + print("partsig cat", self, args) # TODO: need SwizzledSimdValue-aware Cat args = [self] + list(args) for sig in args: @@ -257,7 +259,7 @@ class SimdSignal(UserValue): return PMux(self.m, self.partpoints, self, val1, val2, self.ptype) def __Assign__(self, val, *, src_loc_at=0): - print ("partsig assign", self, val) + print("partsig assign", self, val) # this is a truly awful hack, outlined here: # https://bugs.libre-soc.org/show_bug.cgi?id=731#c13 # during the period between constructing Simd-aware sub-modules @@ -501,7 +503,7 @@ class SimdSignal(UserValue): def __new_sign(self, signed): # XXX NO - SimdShape not Shape - print ("XXX requires SimdShape not Shape") + print("XXX requires SimdShape not Shape") shape = Shape(len(self), signed=signed) result = SimdSignal.like(self, shape=shape) self.m.d.comb += result.sig.eq(self.sig) -- 2.30.2