From: Luke Kenneth Casson Leighton Date: Fri, 7 Feb 2020 14:18:21 +0000 (+0000) Subject: use assert not raise ValueError X-Git-Tag: ls180-24jan2020~248 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7d7a9a45c11ef7af7079b472334c6905c27e765b;p=ieee754fpu.git use assert not raise ValueError --- diff --git a/src/ieee754/part_cmp/eq_gt_ge.py b/src/ieee754/part_cmp/eq_gt_ge.py index c6f15b36..70a202c3 100644 --- a/src/ieee754/part_cmp/eq_gt_ge.py +++ b/src/ieee754/part_cmp/eq_gt_ge.py @@ -44,8 +44,8 @@ class PartitionedEqGtGe(Elaboratable): self.partition_points = PartitionPoints(partition_points) self.mwidth = len(self.partition_points)+1 self.output = Signal(self.mwidth, reset_less=True) - if not self.partition_points.fits_in_width(width): - raise ValueError("partition_points doesn't fit in width") + assert self.partition_points.fits_in_width(width), + "partition_points doesn't fit in width" def elaborate(self, platform): m = Module()