@@ -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 positive integer, not 0 " ):
109- wishbone .Signature (addr_width = 0 , data_width = 8 )
108+ r"Address width must be a non-negative integer, not -1 " ):
109+ wishbone .Signature (addr_width = - 1 , data_width = 8 )
110110 with self .assertRaisesRegex (TypeError ,
111- r"Address width must be a positive integer, not 0 " ):
112- wishbone .Signature .check_parameters (addr_width = 0 , data_width = 8 , granularity = 8 ,
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 ,
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 = 1 , data_width = 7 )
118+ wishbone .Signature (addr_width = 0 , 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 = 1 , data_width = 7 , granularity = 7 ,
121+ wishbone .Signature .check_parameters (addr_width = 0 , 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 = 1 , data_width = 32 , granularity = 7 )
127+ wishbone .Signature (addr_width = 0 , 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 = 1 , data_width = 32 , granularity = 7 ,
130+ wishbone .Signature .check_parameters (addr_width = 0 , 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 = 1 , data_width = 8 , granularity = 32 )
136+ wishbone .Signature (addr_width = 0 , 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 = 1 , data_width = 8 , granularity = 32 ,
139+ wishbone .Signature .check_parameters (addr_width = 0 , 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 = 1 , data_width = 8 , features = {"foo" })
144+ wishbone .Signature (addr_width = 0 , data_width = 8 , features = {"foo" })
145145 with self .assertRaisesRegex (ValueError , r"'foo' is not a valid Feature" ):
146- wishbone .Signature .check_parameters (addr_width = 1 , data_width = 8 , granularity = 8 ,
146+ wishbone .Signature .check_parameters (addr_width = 0 , data_width = 8 , granularity = 8 ,
147147 features = {"foo" })
148148
149149 def test_set_map (self ):
@@ -203,15 +203,15 @@ def test_map(self):
203203 self .assertIs (iface .memory_map , memory_map )
204204
205205 def test_get_map_none (self ):
206- iface = wishbone .Interface (addr_width = 1 , data_width = 8 , path = ("iface" ,))
206+ iface = wishbone .Interface (addr_width = 0 , data_width = 8 , path = ("iface" ,))
207207 with self .assertRaisesRegex (AttributeError ,
208208 r"wishbone.Signature\(.*\) does not have a memory map" ):
209209 iface .memory_map
210210
211211 def test_wrong_map (self ):
212212 with self .assertRaisesRegex (TypeError ,
213213 r"Memory map must be an instance of MemoryMap, not 'foo'" ):
214- wishbone .Interface (addr_width = 1 , data_width = 8 , memory_map = "foo" )
214+ wishbone .Interface (addr_width = 0 , data_width = 8 , memory_map = "foo" )
215215
216216 def test_wrong_map_data_width (self ):
217217 with self .assertRaisesRegex (ValueError ,
0 commit comments