@@ -105,45 +105,45 @@ def test_eq(self):
105
105
106
106
def test_wrong_addr_width (self ):
107
107
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 )
110
110
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 ,
113
113
features = ())
114
114
115
115
def test_wrong_data_width (self ):
116
116
with self .assertRaisesRegex (ValueError ,
117
117
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 )
119
119
with self .assertRaisesRegex (ValueError ,
120
120
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 ,
122
122
features = ())
123
123
124
124
def test_wrong_granularity (self ):
125
125
with self .assertRaisesRegex (ValueError ,
126
126
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 )
128
128
with self .assertRaisesRegex (ValueError ,
129
129
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 ,
131
131
features = ())
132
132
133
133
def test_wrong_granularity_wide (self ):
134
134
with self .assertRaisesRegex (ValueError ,
135
135
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 )
137
137
with self .assertRaisesRegex (ValueError ,
138
138
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 ,
140
140
features = ())
141
141
142
142
def test_wrong_features (self ):
143
143
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" })
145
145
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 ,
147
147
features = {"foo" })
148
148
149
149
def test_set_map (self ):
@@ -203,15 +203,15 @@ def test_map(self):
203
203
self .assertIs (iface .memory_map , memory_map )
204
204
205
205
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" ,))
207
207
with self .assertRaisesRegex (AttributeError ,
208
208
r"wishbone.Signature\(.*\) does not have a memory map" ):
209
209
iface .memory_map
210
210
211
211
def test_wrong_map (self ):
212
212
with self .assertRaisesRegex (TypeError ,
213
213
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" )
215
215
216
216
def test_wrong_map_data_width (self ):
217
217
with self .assertRaisesRegex (ValueError ,
0 commit comments