From: Jean THOMAS Date: Tue, 4 Aug 2020 13:27:40 +0000 (+0200) Subject: Raise exception if no native port is present (fixing #48) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fd7aac7b50ed3400cd296896cb82ed773004b758;p=gram.git Raise exception if no native port is present (fixing #48) --- 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}