From: Luke Kenneth Casson Leighton Date: Tue, 5 Apr 2022 20:10:11 +0000 (+0100) Subject: remove relative imports, use explicit. requires installation X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5fbfcb0ffd59baaa2befca3b537a580815d2fcea;p=nmigen-gf.git remove relative imports, use explicit. requires installation with "python3 setup.py develop|install" but thats ok --- diff --git a/gf_reference/cldivrem.py b/gf_reference/cldivrem.py index 33a528d..754d6a0 100644 --- a/gf_reference/cldivrem.py +++ b/gf_reference/cldivrem.py @@ -1,4 +1,4 @@ -from .log2 import floor_log2 +from nmigen_gf.reference.log2 import floor_log2 def cldivrem(n, d, width): diff --git a/gf_reference/clmulh.py b/gf_reference/clmulh.py index b170aca..19f72a2 100644 --- a/gf_reference/clmulh.py +++ b/gf_reference/clmulh.py @@ -1,4 +1,4 @@ -from .clmul import clmul +from nmigen_gf.reference.clmul import clmul def clmulh(a, b, XLEN): diff --git a/gf_reference/clmulr.py b/gf_reference/clmulr.py index 5b155b5..6573fc1 100644 --- a/gf_reference/clmulr.py +++ b/gf_reference/clmulr.py @@ -1,4 +1,4 @@ -from .clmul import clmul +from nmigen_gf.reference.clmul import clmul def clmulh(a, b, XLEN): diff --git a/gf_reference/decode_reducing_polynomial.py b/gf_reference/decode_reducing_polynomial.py index ac6623b..254d301 100644 --- a/gf_reference/decode_reducing_polynomial.py +++ b/gf_reference/decode_reducing_polynomial.py @@ -1,4 +1,4 @@ -from .state import ST +from nmigen_gf.reference.state import ST def decode_reducing_polynomial(): diff --git a/gf_reference/gfbinv.py b/gf_reference/gfbinv.py index 57aa5a8..ec47458 100644 --- a/gf_reference/gfbinv.py +++ b/gf_reference/gfbinv.py @@ -1,5 +1,5 @@ -from .decode_reducing_polynomial import decode_reducing_polynomial -from .cldivrem import degree +from nmigen_gf.reference.decode_reducing_polynomial import decode_reducing_polynomial +from nmigen_gf.reference.cldivrem import degree def gfbinv(a): diff --git a/gf_reference/gfbmadd.py b/gf_reference/gfbmadd.py index df826c4..5507d27 100644 --- a/gf_reference/gfbmadd.py +++ b/gf_reference/gfbmadd.py @@ -1,7 +1,7 @@ -from .state import ST -from .decode_reducing_polynomial import decode_reducing_polynomial -from .clmul import clmul -from .cldivrem import cldivrem +from nmigen_gf.reference.state import ST +from nmigen_gf.reference.decode_reducing_polynomial import decode_reducing_polynomial +from nmigen_gf.reference.clmul import clmul +from nmigen_gf.reference.cldivrem import cldivrem def gfbmadd(a, b, c): diff --git a/gf_reference/gfbmul.py b/gf_reference/gfbmul.py index 6295a29..bde8f05 100644 --- a/gf_reference/gfbmul.py +++ b/gf_reference/gfbmul.py @@ -1,7 +1,7 @@ -from .state import ST -from .decode_reducing_polynomial import decode_reducing_polynomial -from .clmul import clmul -from .cldivrem import cldivrem +from nmigen_gf.reference.state import ST +from nmigen_gf.reference.decode_reducing_polynomial import decode_reducing_polynomial +from nmigen_gf.reference.clmul import clmul +from nmigen_gf.reference.cldivrem import cldivrem def gfbmul(a, b): diff --git a/gf_reference/gfbredpoly.py b/gf_reference/gfbredpoly.py index 1812967..7a27dcb 100644 --- a/gf_reference/gfbredpoly.py +++ b/gf_reference/gfbredpoly.py @@ -1,4 +1,4 @@ -from .state import ST +from nmigen_gf.reference.state import ST def gfbredpoly(immed): diff --git a/gf_reference/gfpadd.py b/gf_reference/gfpadd.py index f00bf8c..8232a18 100644 --- a/gf_reference/gfpadd.py +++ b/gf_reference/gfpadd.py @@ -1,4 +1,4 @@ -from .state import ST +from nmigen_gf.reference.state import ST def gfpadd(a, b): diff --git a/gf_reference/gfpinv.py b/gf_reference/gfpinv.py index 15c1f2c..69718d1 100644 --- a/gf_reference/gfpinv.py +++ b/gf_reference/gfpinv.py @@ -1,4 +1,4 @@ -from .state import ST +from nmigen_gf.reference.state import ST def gfpinv(a): diff --git a/gf_reference/gfpmadd.py b/gf_reference/gfpmadd.py index e7159a2..64b46ae 100644 --- a/gf_reference/gfpmadd.py +++ b/gf_reference/gfpmadd.py @@ -1,4 +1,4 @@ -from .state import ST +from nmigen_gf.reference.state import ST def gfpmadd(a, b, c): diff --git a/gf_reference/gfpmsub.py b/gf_reference/gfpmsub.py index fd09124..880c12b 100644 --- a/gf_reference/gfpmsub.py +++ b/gf_reference/gfpmsub.py @@ -1,4 +1,4 @@ -from .state import ST +from nmigen_gf.reference.state import ST def gfpmsub(a, b, c): diff --git a/gf_reference/gfpmsubr.py b/gf_reference/gfpmsubr.py index 2d349f8..14edd75 100644 --- a/gf_reference/gfpmsubr.py +++ b/gf_reference/gfpmsubr.py @@ -1,4 +1,4 @@ -from .state import ST +from nmigen_gf.reference.state import ST def gfpmsubr(a, b, c): diff --git a/gf_reference/gfpmul.py b/gf_reference/gfpmul.py index 42c43a2..3ee57e2 100644 --- a/gf_reference/gfpmul.py +++ b/gf_reference/gfpmul.py @@ -1,4 +1,4 @@ -from .state import ST +from nmigen_gf.reference.state import ST def gfpmul(a, b): diff --git a/gf_reference/gfpsub.py b/gf_reference/gfpsub.py index 44e5798..5d6c00e 100644 --- a/gf_reference/gfpsub.py +++ b/gf_reference/gfpsub.py @@ -1,4 +1,4 @@ -from .state import ST +from nmigen_gf.reference.state import ST def gfpsub(a, b): diff --git a/gf_reference/state.py b/gf_reference/state.py index 91cb542..97362cf 100644 --- a/gf_reference/state.py +++ b/gf_reference/state.py @@ -1,4 +1,4 @@ -from .log2 import floor_log2 +from nmigen_gf.reference.log2 import floor_log2 from threading import local diff --git a/gf_reference/test_cl_gfb_gfp.py b/gf_reference/test_cl_gfb_gfp.py index 34133cb..87e22cb 100644 --- a/gf_reference/test_cl_gfb_gfp.py +++ b/gf_reference/test_cl_gfb_gfp.py @@ -1,17 +1,17 @@ -from .state import ST -from .cldivrem import cldivrem -from .clmul import clmul -from .gfbmul import gfbmul -from .gfbmadd import gfbmadd -from .gfbinv import gfbinv -from .gfpadd import gfpadd -from .gfpsub import gfpsub -from .gfpmul import gfpmul -from .gfpinv import gfpinv -from .gfpmadd import gfpmadd -from .gfpmsub import gfpmsub -from .gfpmsubr import gfpmsubr -from .pack_poly import pack_poly, unpack_poly +from nmigen_gf.reference.state import ST +from nmigen_gf.reference.cldivrem import cldivrem +from nmigen_gf.reference.clmul import clmul +from nmigen_gf.reference.gfbmul import gfbmul +from nmigen_gf.reference.gfbmadd import gfbmadd +from nmigen_gf.reference.gfbinv import gfbinv +from nmigen_gf.reference.gfpadd import gfpadd +from nmigen_gf.reference.gfpsub import gfpsub +from nmigen_gf.reference.gfpmul import gfpmul +from nmigen_gf.reference.gfpinv import gfpinv +from nmigen_gf.reference.gfpmadd import gfpmadd +from nmigen_gf.reference.gfpmsub import gfpmsub +from nmigen_gf.reference.gfpmsubr import gfpmsubr +from nmigen_gf.reference.pack_poly import pack_poly, unpack_poly import unittest