@@ -9,6 +9,7 @@ mod tests {
9
9
utils:: { air_test, air_test_with_min_segments, test_system_config} ,
10
10
} ;
11
11
use openvm_instructions:: { exe:: VmExe , instruction:: Instruction , LocalOpcode , SystemOpcode } ;
12
+ use openvm_memcpy_transpiler:: MemcpyTranspilerExtension ;
12
13
use openvm_rv32im_circuit:: { Rv32IBuilder , Rv32IConfig , Rv32ImBuilder , Rv32ImConfig } ;
13
14
use openvm_rv32im_guest:: hint_load_by_key_encode;
14
15
use openvm_rv32im_transpiler:: {
@@ -46,7 +47,8 @@ mod tests {
46
47
Transpiler :: < F > :: default ( )
47
48
. with_extension ( Rv32ITranspilerExtension )
48
49
. with_extension ( Rv32MTranspilerExtension )
49
- . with_extension ( Rv32IoTranspilerExtension ) ,
50
+ . with_extension ( Rv32IoTranspilerExtension )
51
+ . with_extension ( MemcpyTranspilerExtension ) ,
50
52
) ?;
51
53
change_rv32m_insn_to_nop ( & mut exe) ;
52
54
air_test_with_min_segments ( Rv32IBuilder , config, exe, vec ! [ ] , min_segments) ;
@@ -63,7 +65,8 @@ mod tests {
63
65
Transpiler :: < F > :: default ( )
64
66
. with_extension ( Rv32ITranspilerExtension )
65
67
. with_extension ( Rv32IoTranspilerExtension )
66
- . with_extension ( Rv32MTranspilerExtension ) ,
68
+ . with_extension ( Rv32MTranspilerExtension )
69
+ . with_extension ( MemcpyTranspilerExtension ) ,
67
70
) ?;
68
71
air_test_with_min_segments ( Rv32ImBuilder , config, exe, vec ! [ ] , min_segments) ;
69
72
Ok ( ( ) )
@@ -84,7 +87,8 @@ mod tests {
84
87
Transpiler :: < F > :: default ( )
85
88
. with_extension ( Rv32ITranspilerExtension )
86
89
. with_extension ( Rv32IoTranspilerExtension )
87
- . with_extension ( Rv32MTranspilerExtension ) ,
90
+ . with_extension ( Rv32MTranspilerExtension )
91
+ . with_extension ( MemcpyTranspilerExtension ) ,
88
92
) ?;
89
93
air_test_with_min_segments ( Rv32ImBuilder , config, exe, vec ! [ ] , min_segments) ;
90
94
Ok ( ( ) )
@@ -99,7 +103,8 @@ mod tests {
99
103
Transpiler :: < F > :: default ( )
100
104
. with_extension ( Rv32ITranspilerExtension )
101
105
. with_extension ( Rv32MTranspilerExtension )
102
- . with_extension ( Rv32IoTranspilerExtension ) ,
106
+ . with_extension ( Rv32IoTranspilerExtension )
107
+ . with_extension ( MemcpyTranspilerExtension ) ,
103
108
) ?;
104
109
let input = vec ! [ [ 0 , 1 , 2 , 3 ] . map( F :: from_canonical_u8) . to_vec( ) ] ;
105
110
air_test_with_min_segments ( Rv32ImBuilder , config, exe, input, 1 ) ;
@@ -115,7 +120,8 @@ mod tests {
115
120
Transpiler :: < F > :: default ( )
116
121
. with_extension ( Rv32ITranspilerExtension )
117
122
. with_extension ( Rv32MTranspilerExtension )
118
- . with_extension ( Rv32IoTranspilerExtension ) ,
123
+ . with_extension ( Rv32IoTranspilerExtension )
124
+ . with_extension ( MemcpyTranspilerExtension ) ,
119
125
) ?;
120
126
// stdin will be read after reading kv_store
121
127
let stdin = vec ! [ [ 0 , 1 , 2 ] . map( F :: from_canonical_u8) . to_vec( ) ] ;
@@ -138,7 +144,8 @@ mod tests {
138
144
Transpiler :: < F > :: default ( )
139
145
. with_extension ( Rv32ITranspilerExtension )
140
146
. with_extension ( Rv32MTranspilerExtension )
141
- . with_extension ( Rv32IoTranspilerExtension ) ,
147
+ . with_extension ( Rv32IoTranspilerExtension )
148
+ . with_extension ( MemcpyTranspilerExtension ) ,
142
149
) ?;
143
150
144
151
#[ derive( serde:: Serialize ) ]
@@ -169,7 +176,8 @@ mod tests {
169
176
Transpiler :: < F > :: default ( )
170
177
. with_extension ( Rv32ITranspilerExtension )
171
178
. with_extension ( Rv32MTranspilerExtension )
172
- . with_extension ( Rv32IoTranspilerExtension ) ,
179
+ . with_extension ( Rv32IoTranspilerExtension )
180
+ . with_extension ( MemcpyTranspilerExtension ) ,
173
181
) ?;
174
182
175
183
let executor = VmExecutor :: new ( config. clone ( ) ) ?;
@@ -211,7 +219,8 @@ mod tests {
211
219
Transpiler :: < F > :: default ( )
212
220
. with_extension ( Rv32ITranspilerExtension )
213
221
. with_extension ( Rv32MTranspilerExtension )
214
- . with_extension ( Rv32IoTranspilerExtension ) ,
222
+ . with_extension ( Rv32IoTranspilerExtension )
223
+ . with_extension ( MemcpyTranspilerExtension ) ,
215
224
) ?;
216
225
air_test ( Rv32ImBuilder , config, exe) ;
217
226
Ok ( ( ) )
@@ -226,7 +235,8 @@ mod tests {
226
235
Transpiler :: < F > :: default ( )
227
236
. with_extension ( Rv32ITranspilerExtension )
228
237
. with_extension ( Rv32MTranspilerExtension )
229
- . with_extension ( Rv32IoTranspilerExtension ) ,
238
+ . with_extension ( Rv32IoTranspilerExtension )
239
+ . with_extension ( MemcpyTranspilerExtension ) ,
230
240
) ?;
231
241
232
242
let executor = VmExecutor :: new ( config) ?;
@@ -253,7 +263,8 @@ mod tests {
253
263
Transpiler :: < F > :: default ( )
254
264
. with_extension ( Rv32ITranspilerExtension )
255
265
. with_extension ( Rv32MTranspilerExtension )
256
- . with_extension ( Rv32IoTranspilerExtension ) ,
266
+ . with_extension ( Rv32IoTranspilerExtension )
267
+ . with_extension ( MemcpyTranspilerExtension ) ,
257
268
) ?;
258
269
air_test ( Rv32ImBuilder , config, exe) ;
259
270
Ok ( ( ) )
@@ -273,7 +284,8 @@ mod tests {
273
284
Transpiler :: < F > :: default ( )
274
285
. with_extension ( Rv32ITranspilerExtension )
275
286
. with_extension ( Rv32MTranspilerExtension )
276
- . with_extension ( Rv32IoTranspilerExtension ) ,
287
+ . with_extension ( Rv32IoTranspilerExtension )
288
+ . with_extension ( MemcpyTranspilerExtension ) ,
277
289
) ?;
278
290
air_test ( Rv32ImBuilder , config, exe) ;
279
291
Ok ( ( ) )
@@ -289,7 +301,8 @@ mod tests {
289
301
Transpiler :: < F > :: default ( )
290
302
. with_extension ( Rv32ITranspilerExtension )
291
303
. with_extension ( Rv32MTranspilerExtension )
292
- . with_extension ( Rv32IoTranspilerExtension ) ,
304
+ . with_extension ( Rv32IoTranspilerExtension )
305
+ . with_extension ( MemcpyTranspilerExtension ) ,
293
306
)
294
307
. unwrap ( ) ;
295
308
let executor = VmExecutor :: new ( config) . unwrap ( ) ;
@@ -315,7 +328,8 @@ mod tests {
315
328
Transpiler :: < F > :: default ( )
316
329
. with_extension ( Rv32ITranspilerExtension )
317
330
. with_extension ( Rv32MTranspilerExtension )
318
- . with_extension ( Rv32IoTranspilerExtension ) ,
331
+ . with_extension ( Rv32IoTranspilerExtension )
332
+ . with_extension ( MemcpyTranspilerExtension ) ,
319
333
)
320
334
. unwrap ( ) ;
321
335
air_test ( Rv32ImBuilder , config, exe) ;
0 commit comments