From fd7aac7b50ed3400cd296896cb82ed773004b758 Mon Sep 17 00:00:00 2001 From: Jean THOMAS Date: Tue, 4 Aug 2020 15:27:40 +0200 Subject: [PATCH] Raise exception if no native port is present (fixing #48) --- gram/core/crossbar.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gram/core/crossbar.py b/gram/core/crossbar.py index 642a8e2..ae29a12 100644 --- a/gram/core/crossbar.py +++ b/gram/core/crossbar.py @@ -106,7 +106,8 @@ class gramCrossbar(Elaboratable): controller = self.controller nmasters = len(self.masters) - assert nmasters > 0 + if nmasters < 1: + raise ValueError("No frontend instantiated") # Address mapping -------------------------------------------------------------------------- cba_shifts = {"ROW_BANK_COL": controller.settings.geom.colbits - controller.address_align} -- 2.30.2