Skip to content

Commit

Permalink
Fix/issue 295/fix while debuging the hub (#296)
Browse files Browse the repository at this point in the history
Signed-off-by: Francois Bojarski <francois.bojarski@consensys.net>
  • Loading branch information
letypequividelespoubelles authored Aug 20, 2024
1 parent c90fc44 commit 3a85039
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion mmu/constants.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
NB_PP_ROWS_EXO_TO_RAM_TRANSPLANTS 1
NB_PP_ROWS_RAM_TO_RAM_SANS_PADDING 5
NB_PP_ROWS_ANY_TO_RAM_WITH_PADDING_PURE_PADDING 4
NB_PP_ROWS_ANY_TO_RAM_WITH_PADDING_SOME_DATA 1
NB_PP_ROWS_ANY_TO_RAM_WITH_PADDING_SOME_DATA 10
NB_PP_ROWS_MODEXP_ZERO 1
NB_PP_ROWS_MODEXP_DATA 6
NB_PP_ROWS_BLAKE 2
Expand Down
23 changes: 12 additions & 11 deletions mmu/constraints.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,8 @@
(next prprc/EUC_REM))

(defun (any-to-ram-max-src-offset-or-zero)
(* (- 1 (any-to-ram-pure-padd)) (any-to-ram-max-tgt-offset)))
(* (- 1 (any-to-ram-pure-padd))
(+ macro/SRC_OFFSET_LO (- macro/SIZE 1))))

(defun (any-to-ram-mixed)
(force-bool (* (- 1 (any-to-ram-pure-padd))
Expand All @@ -856,7 +857,7 @@

(defun (any-to-ram-trsf-size)
(+ (* (any-to-ram-mixed) (- macro/REF_SIZE macro/SRC_OFFSET_LO))
(* (any-to-ram-pure-data) macro/REF_SIZE)))
(* (any-to-ram-pure-data) macro/SIZE)))

(defun (any-to-ram-padd-size)
(+ (* (any-to-ram-pure-padd) macro/SIZE)
Expand All @@ -872,7 +873,7 @@
(callToEuc 2 (any-to-ram-max-tgt-offset) LLARGE)
;; justifyng the flag
(eq! IS_ANY_TO_RAM_WITH_PADDING_PURE_PADDING (any-to-ram-pure-padd))
(eq! IS_ANY_TO_RAM_WITH_PADDING_SOME_DATA (+ (any-to-ram-mixed) (any-to-ram-pure-padd)))))
(eq! IS_ANY_TO_RAM_WITH_PADDING_SOME_DATA (+ (any-to-ram-mixed) (any-to-ram-pure-data)))))

;;
;; PURE PADDING sub case
Expand All @@ -896,7 +897,7 @@
(- LLARGE (any-to-ram-min-tbo)))

(defun (any-to-ram-pure-padding-only-padding-size)
(- LLARGE (any-to-ram-padd-size)))
(any-to-ram-padd-size))

(defconstraint any-to-ram-pure-padding-prprc (:guard (* MACRO IS_ANY_TO_RAM_WITH_PADDING_PURE_PADDING))
(begin ;; setting number of rows
Expand Down Expand Up @@ -1053,13 +1054,13 @@
(+ (- (any-to-ram-some-data-max-slo) (any-to-ram-some-data-min-slo)) 1))
;; preprocessing row n°4
(callToEq 4 0 TOTNT 1)
(eq! (any-to-ram-some-data-last-dt-size) (+ (any-to-ram-some-data-min-sbo) 1))
(eq! (any-to-ram-some-data-last-dt-size) (+ (any-to-ram-some-data-max-sbo) 1))
;; preprocessing row n°5
(callToEuc 5 (any-to-ram-some-data-min-src-offset) LLARGE)
(callToEq 5 0 (any-to-ram-min-tbo) (any-to-ram-some-data-min-sbo))
(eq! (any-to-ram-some-data-aligned) (shift prprc/WCP_RES 5))
;; preprocessing row n°6
(callToEuc 6 (any-to-ram-some-data-min-src-offset) LLARGE)
(callToEuc 6 (any-to-ram-some-data-max-src-offset) LLARGE)
;; preprocessing row n°7
(if-eq (any-to-ram-some-data-totnt-is-one) 1
(begin (callToEuc 7
Expand All @@ -1071,11 +1072,11 @@
(begin (callToEuc 8
(+ (any-to-ram-min-tbo) (- (any-to-ram-some-data-first-dt-size) 1))
LLARGE)
(callToEq 8 0 (shift prprc/EUC_REM 8) LLARGEMO))
(if-zero (any-to-ram-some-data-first-dt-maxes-out-target)
(eq! (any-to-ram-some-data-middle-tbo)
(+ 1 (shift prprc/EUC_REM 8)))
(vanishes! (any-to-ram-some-data-middle-tbo))))
(callToEq 8 0 (shift prprc/EUC_REM 8) LLARGEMO)
(if-zero (any-to-ram-some-data-first-dt-maxes-out-target)
(eq! (any-to-ram-some-data-middle-tbo)
(+ 1 (shift prprc/EUC_REM 8)))
(vanishes! (any-to-ram-some-data-middle-tbo)))))
;; preprocessing row n°9
(if-zero (any-to-ram-some-data-totnt-is-one)
(begin (callToEuc 9
Expand Down

0 comments on commit 3a85039

Please sign in to comment.