@@ -105,45 +105,45 @@ def test_eq(self):
105105
106106 def test_wrong_addr_width (self ):
107107 with self .assertRaisesRegex (TypeError ,
108- r"Address width must be a non-negative integer, not -1 " ):
109- wishbone .Signature (addr_width = - 1 , data_width = 8 )
108+ r"Address width must be a positive integer, not 0 " ):
109+ wishbone .Signature (addr_width = 0 , data_width = 8 )
110110 with self .assertRaisesRegex (TypeError ,
111- r"Address width must be a non-negative integer, not -1 " ):
112- wishbone .Signature .check_parameters (addr_width = - 1 , data_width = 8 , granularity = 8 ,
111+ r"Address width must be a positive integer, not 0 " ):
112+ wishbone .Signature .check_parameters (addr_width = 0 , data_width = 8 , granularity = 8 ,
113113 features = ())
114114
115115 def test_wrong_data_width (self ):
116116 with self .assertRaisesRegex (ValueError ,
117117 r"Data width must be one of 8, 16, 32, 64, not 7" ):
118- wishbone .Signature (addr_width = 0 , data_width = 7 )
118+ wishbone .Signature (addr_width = 1 , data_width = 7 )
119119 with self .assertRaisesRegex (ValueError ,
120120 r"Data width must be one of 8, 16, 32, 64, not 7" ):
121- wishbone .Signature .check_parameters (addr_width = 0 , data_width = 7 , granularity = 7 ,
121+ wishbone .Signature .check_parameters (addr_width = 1 , data_width = 7 , granularity = 7 ,
122122 features = ())
123123
124124 def test_wrong_granularity (self ):
125125 with self .assertRaisesRegex (ValueError ,
126126 r"Granularity must be one of 8, 16, 32, 64, not 7" ):
127- wishbone .Signature (addr_width = 0 , data_width = 32 , granularity = 7 )
127+ wishbone .Signature (addr_width = 1 , data_width = 32 , granularity = 7 )
128128 with self .assertRaisesRegex (ValueError ,
129129 r"Granularity must be one of 8, 16, 32, 64, not 7" ):
130- wishbone .Signature .check_parameters (addr_width = 0 , data_width = 32 , granularity = 7 ,
130+ wishbone .Signature .check_parameters (addr_width = 1 , data_width = 32 , granularity = 7 ,
131131 features = ())
132132
133133 def test_wrong_granularity_wide (self ):
134134 with self .assertRaisesRegex (ValueError ,
135135 r"Granularity 32 may not be greater than data width 8" ):
136- wishbone .Signature (addr_width = 0 , data_width = 8 , granularity = 32 )
136+ wishbone .Signature (addr_width = 1 , data_width = 8 , granularity = 32 )
137137 with self .assertRaisesRegex (ValueError ,
138138 r"Granularity 32 may not be greater than data width 8" ):
139- wishbone .Signature .check_parameters (addr_width = 0 , data_width = 8 , granularity = 32 ,
139+ wishbone .Signature .check_parameters (addr_width = 1 , data_width = 8 , granularity = 32 ,
140140 features = ())
141141
142142 def test_wrong_features (self ):
143143 with self .assertRaisesRegex (ValueError , r"'foo' is not a valid Feature" ):
144- wishbone .Signature (addr_width = 0 , data_width = 8 , features = {"foo" })
144+ wishbone .Signature (addr_width = 1 , data_width = 8 , features = {"foo" })
145145 with self .assertRaisesRegex (ValueError , r"'foo' is not a valid Feature" ):
146- wishbone .Signature .check_parameters (addr_width = 0 , data_width = 8 , granularity = 8 ,
146+ wishbone .Signature .check_parameters (addr_width = 1 , data_width = 8 , granularity = 8 ,
147147 features = {"foo" })
148148
149149
@@ -158,7 +158,7 @@ def test_simple(self):
158158 self .assertEqual (iface .cyc .name , "foo__bar__cyc" )
159159
160160 def test_get_map_wrong (self ):
161- iface = wishbone .Interface (addr_width = 0 , data_width = 8 , path = ("iface" ,))
161+ iface = wishbone .Interface (addr_width = 1 , data_width = 8 , path = ("iface" ,))
162162 with self .assertRaisesRegex (NotImplementedError ,
163163 r"wishbone.Interface\(.*\) does not have a memory map" ):
164164 iface .memory_map
@@ -171,7 +171,7 @@ def test_get_map_frozen(self):
171171 iface .memory_map .add_resource ("foo" , name = "foo" , size = 1 )
172172
173173 def test_set_map_wrong (self ):
174- iface = wishbone .Interface (addr_width = 0 , data_width = 8 , path = ("iface" ,))
174+ iface = wishbone .Interface (addr_width = 1 , data_width = 8 , path = ("iface" ,))
175175 with self .assertRaisesRegex (TypeError ,
176176 r"Memory map must be an instance of MemoryMap, not 'foo'" ):
177177 iface .memory_map = "foo"
0 commit comments