From 560c2f9e7552f6dc46f8f119a20968cf60a013c0 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Fri, 15 May 2020 12:13:26 +0100 Subject: [PATCH] code-munging --- src/soc/countzero/countzero.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/soc/countzero/countzero.py b/src/soc/countzero/countzero.py index ae0a30df..7826d947 100644 --- a/src/soc/countzero/countzero.py +++ b/src/soc/countzero/countzero.py @@ -66,7 +66,7 @@ class ZeroCounter(Elaboratable): r = IntermediateResult() r_in = IntermediateResult() - m.d.comb += r.eq(r_in)# make the module entirely combinatorial for now + m.d.comb += r.eq(r_in) # make the module entirely combinatorial for now v = IntermediateResult() y = Signal(4, reset_less=True) @@ -129,7 +129,7 @@ class ZeroCounter(Elaboratable): m.d.comb += o[5:7].eq(Cat(r.is_32bit, ~r.is_32bit)) with m.Elif(r.count_right): # return (63 - sel), trimmed to 5 bits in 32-bit mode - m.d.comb += o.eq(Cat(~sel[0:5], (~sel[5] & ~r.is_32bit))) + m.d.comb += o.eq(Cat(~sel[0:5], ~(sel[5] | r.is_32bit))) with m.Else(): m.d.comb += o.eq(sel) -- 2.30.2