From 5e667f17d7994e965127af08ed29caf31ef84db2 Mon Sep 17 00:00:00 2001 From: Andrew Dennison Date: Thu, 2 Jun 2022 16:14:47 +1000 Subject: [PATCH] csr: fix field access check * Broken in 5dc440e80de --- litex/soc/interconnect/csr.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/litex/soc/interconnect/csr.py b/litex/soc/interconnect/csr.py index 849cfd27e..711785a9c 100644 --- a/litex/soc/interconnect/csr.py +++ b/litex/soc/interconnect/csr.py @@ -217,10 +217,10 @@ class CSRFieldAggregate: for field in fields: if field.access is None: field.access = access - elif field.access == CSRAccess.ReadOnly: + elif access == CSRAccess.ReadOnly: assert not field.pulse assert field.access == CSRAccess.ReadOnly - elif field.access == CSRAccess.ReadWrite: + elif access == CSRAccess.ReadWrite: assert field.access in [CSRAccess.ReadWrite, CSRAccess.WriteOnly] if field.pulse: field.access = CSRAccess.WriteOnly