@@ -266,15 +266,18 @@ impl SubmachineKind for BinaryMachine {
266
266
trace. set_current_row ( "A_byte" , ( a1 as u32 ) . into ( ) ) ;
267
267
trace. set_current_row ( "B_byte" , ( b1 as u32 ) . into ( ) ) ;
268
268
trace. set_current_row ( "C_byte" , ( c1 as u32 ) . into ( ) ) ;
269
+ trace. set_current_row ( "operation_id_next" , op_id) ;
269
270
} else {
270
271
trace. set_final_row ( "A_byte" , ( a1 as u32 ) . into ( ) ) ;
271
272
trace. set_final_row ( "B_byte" , ( b1 as u32 ) . into ( ) ) ;
272
273
trace. set_final_row ( "C_byte" , ( c1 as u32 ) . into ( ) ) ;
274
+ trace. set_final_row ( "operation_id_next" , op_id) ;
273
275
}
274
276
275
277
// 4 rows for each binary operation
276
278
trace. push_row ( ) ;
277
279
trace. set_current_row ( "operation_id" , op_id) ;
280
+ trace. set_current_row ( "operation_id_next" , op_id) ;
278
281
trace. set_current_row ( "A_byte" , ( a2 as u32 ) . into ( ) ) ;
279
282
trace. set_current_row ( "B_byte" , ( b2 as u32 ) . into ( ) ) ;
280
283
trace. set_current_row ( "C_byte" , ( c2 as u32 ) . into ( ) ) ;
@@ -284,6 +287,7 @@ impl SubmachineKind for BinaryMachine {
284
287
285
288
trace. push_row ( ) ;
286
289
trace. set_current_row ( "operation_id" , op_id) ;
290
+ trace. set_current_row ( "operation_id_next" , op_id) ;
287
291
trace. set_current_row ( "A_byte" , ( a3 as u32 ) . into ( ) ) ;
288
292
trace. set_current_row ( "B_byte" , ( b3 as u32 ) . into ( ) ) ;
289
293
trace. set_current_row ( "C_byte" , ( c3 as u32 ) . into ( ) ) ;
@@ -293,6 +297,7 @@ impl SubmachineKind for BinaryMachine {
293
297
294
298
trace. push_row ( ) ;
295
299
trace. set_current_row ( "operation_id" , op_id) ;
300
+ trace. set_current_row ( "operation_id_next" , op_id) ;
296
301
trace. set_current_row ( "A_byte" , ( a4 as u32 ) . into ( ) ) ;
297
302
trace. set_current_row ( "B_byte" , ( b4 as u32 ) . into ( ) ) ;
298
303
trace. set_current_row ( "C_byte" , ( c4 as u32 ) . into ( ) ) ;
@@ -352,43 +357,53 @@ impl SubmachineKind for ShiftMachine {
352
357
if trace. len ( ) > 0 {
353
358
trace. set_current_row ( "A_byte" , ( b1 as u32 ) . into ( ) ) ;
354
359
trace. set_current_row ( "C_part" , ( ( ( b1 as u32 ) << shl) >> shr) . into ( ) ) ;
360
+ trace. set_current_row ( "operation_id_next" , op_id) ;
361
+ trace. set_current_row ( "B_next" , b) ;
355
362
} else {
356
363
trace. set_final_row ( "A_byte" , ( b1 as u32 ) . into ( ) ) ;
357
364
trace. set_final_row ( "C_part" , ( ( ( b1 as u32 ) << shl) >> shr) . into ( ) ) ;
365
+ trace. set_final_row ( "operation_id_next" , op_id) ;
366
+ trace. set_final_row ( "B_next" , b) ;
358
367
}
359
368
360
369
// 4 rows for each shift operation
361
370
trace. push_row ( ) ;
362
371
trace. set_current_row ( "operation_id" , op_id) ;
372
+ trace. set_current_row ( "operation_id_next" , op_id) ;
363
373
trace. set_current_row ( "A_byte" , ( b2 as u32 ) . into ( ) ) ;
364
374
let c_part_factor = ( b2 as u32 ) << 8 ;
365
375
let c_part = ( ( c_part_factor << shl) >> shr) . into ( ) ;
366
376
trace. set_current_row ( "C_part" , c_part) ;
367
377
let a_row = a. u ( ) & 0xff ;
368
378
trace. set_current_row ( "A" , a_row. into ( ) ) ;
369
379
trace. set_current_row ( "B" , b) ;
380
+ trace. set_current_row ( "B_next" , b) ;
370
381
trace. set_current_row ( "C" , ( ( a_row << shl) >> shr) . into ( ) ) ;
371
382
//
372
383
trace. push_row ( ) ;
373
384
trace. set_current_row ( "operation_id" , op_id) ;
385
+ trace. set_current_row ( "operation_id_next" , op_id) ;
374
386
trace. set_current_row ( "A_byte" , ( b3 as u32 ) . into ( ) ) ;
375
387
let c_part_factor = ( b3 as u32 ) << 16 ;
376
388
let c_part = ( ( c_part_factor << shl) >> shr) . into ( ) ;
377
389
trace. set_current_row ( "C_part" , c_part) ;
378
390
let a_row = a. u ( ) & 0xffff ;
379
391
trace. set_current_row ( "A" , a_row. into ( ) ) ;
380
392
trace. set_current_row ( "B" , b) ;
393
+ trace. set_current_row ( "B_next" , b) ;
381
394
trace. set_current_row ( "C" , ( ( a_row << shl) >> shr) . into ( ) ) ;
382
395
//
383
396
trace. push_row ( ) ;
384
397
trace. set_current_row ( "operation_id" , op_id) ;
398
+ trace. set_current_row ( "operation_id_next" , op_id) ;
385
399
trace. set_current_row ( "A_byte" , ( b4 as u32 ) . into ( ) ) ;
386
400
let c_part_factor = ( b4 as u32 ) << 24 ;
387
401
let c_part = ( ( c_part_factor << shl) >> shr) . into ( ) ;
388
402
trace. set_current_row ( "C_part" , c_part) ;
389
403
let a_row = a. u ( ) & 0xffffff ;
390
404
trace. set_current_row ( "A" , a_row. into ( ) ) ;
391
405
trace. set_current_row ( "B" , b) ;
406
+ trace. set_current_row ( "B_next" , b) ;
392
407
trace. set_current_row ( "C" , ( ( a_row << shl) >> shr) . into ( ) ) ;
393
408
// latch row
394
409
trace. push_row ( ) ;
0 commit comments