From 6dbe70d15883e60c64f06e1cbff8dab7372e7a64 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Mon, 8 Nov 2021 23:48:05 +0000 Subject: [PATCH] shorter way of getting FU busy signals --- src/soc/simple/core.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/soc/simple/core.py b/src/soc/simple/core.py index 1c67c87b..00e351cb 100644 --- a/src/soc/simple/core.py +++ b/src/soc/simple/core.py @@ -333,11 +333,9 @@ class NonProductionCore(ControlBase): rdmask = get_rdflags(self.i.e, fu) comb += fu.rdmaskn.eq(~rdmask) - # if instruction is busy, set busy output for core. also - # continue to hold each fu rdmask - for funame, fu in fus.items(): - with m.If(fu.busy_o): - comb += busy_o.eq(fu.busy_o) + # if instruction is busy, set busy output for core. + busys = map(lambda fu: fu.busy_o, fus.values()) + comb += busy_o.eq(Cat(*busys).bool()) # set ready/valid signalling. if busy, means refuse incoming issue # XXX note: for an in-order core this is far too simple. busy must -- 2.30.2