From d7fb57425d7f0e0ed4b27c4fdfd49f83e7c5d744 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Mon, 4 Jul 2022 11:06:13 +0100 Subject: [PATCH] add more inlines to PDF --- openpower/Makefile | 6 ++++-- openpower/mdwn_inline.py | 3 +++ openpower/sv/svp64/appendix.mdwn | 2 +- openpower/sv/vector_ops.mdwn | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/openpower/Makefile b/openpower/Makefile index c7fb3fa39..63955d387 100755 --- a/openpower/Makefile +++ b/openpower/Makefile @@ -14,9 +14,10 @@ tex: pandoc -f markdown -t latex --top-level-division=section \ --filter pandoc_img.py \ -N -o tex_out/svp64.tex sv/svp64.mdwn + ./mdwn_inline.py sv/svp64/appendix.mdwn tex_out/appendix.mdwn pandoc -f markdown -t latex --top-level-division=section \ --filter pandoc_img.py \ - -N -o tex_out/svp64_appendix.tex sv/svp64/appendix.mdwn + -N -o tex_out/svp64_appendix.tex tex_out/appendix.mdwn pandoc -f markdown -t latex --top-level-division=section \ --filter pandoc_img.py \ -N -o tex_out/compliancy_levels.tex sv/compliancy_levels.mdwn @@ -61,9 +62,10 @@ tex: --filter pandoc_img.py \ -N -o tex_out/pseudocode_simplev.tex \ ../../openpower-isa/openpower/isa/simplev.mdwn + ./mdwn_inline.py sv/vector_ops.mdwn tex_out/vector_ops.mdwn pandoc -f markdown -t latex --top-level-division=section \ --filter pandoc_img.py \ - -N -o tex_out/vector_ops.tex sv/vector_ops.mdwn + -N -o tex_out/vector_ops.tex tex_out/vector_ops.mdwn pandoc -f markdown -t latex --top-level-division=section \ --filter pandoc_img.py \ -N -o tex_out/cr_int_predication.tex sv/cr_int_predication.mdwn diff --git a/openpower/mdwn_inline.py b/openpower/mdwn_inline.py index 6d8a7b460..7a6a15745 100755 --- a/openpower/mdwn_inline.py +++ b/openpower/mdwn_inline.py @@ -17,6 +17,9 @@ with open(sys.argv[2], "w") as o: if fname.startswith("gf_reference"): with open("../../nmigen-gf/"+fname) as inc: o.write(inc.read()) + else: + with open("../%s" % fname) as inc: + o.write(inc.read()) else: with open("../%s.mdwn" % fname) as inc: o.write(inc.read()) diff --git a/openpower/sv/svp64/appendix.mdwn b/openpower/sv/svp64/appendix.mdwn index 5c8c224eb..44a8e7758 100644 --- a/openpower/sv/svp64/appendix.mdwn +++ b/openpower/sv/svp64/appendix.mdwn @@ -1025,7 +1025,7 @@ Executable demo pseudocode, full version [here](https://git.libre-soc.org/?p=libreriscv.git;a=blob;f=openpower/sv/test_preduce.py;hb=HEAD) ``` -[[!inline raw="yes" pages="openpower/sv/preduce.py" ]] +[[!inline pages="openpower/sv/preduce.py" raw="yes" ]] ``` This algorithm works by noting when data remains in-place rather than diff --git a/openpower/sv/vector_ops.mdwn b/openpower/sv/vector_ops.mdwn index 71b41bde3..3d0331075 100644 --- a/openpower/sv/vector_ops.mdwn +++ b/openpower/sv/vector_ops.mdwn @@ -61,7 +61,7 @@ then instead of reading from the register file the mask is set to all ones. Executable pseudocode demo: ``` -[[!inline quick="yes" raw="yes" pages="openpower/sv/bmask.py"]] +[[!inline pages="openpower/sv/bmask.py" quick="yes" raw="yes" ]] ``` # Carry-lookahead -- 2.30.2