split out into separate makefile targets, add more pseudocode
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Mon, 4 Jul 2022 11:30:01 +0000 (12:30 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Mon, 4 Jul 2022 11:30:01 +0000 (12:30 +0100)
openpower/Makefile
openpower/simple_v_spec.tex

index 63955d387129ae4330cbdada583bdeb5801db44f..ce694baf9577f35193af4a9e30f1d8ab7d29f7aa 100755 (executable)
@@ -1,10 +1,13 @@
 #!/usr/bin/make -f
+SOURCE_TEX := tex_out/remap.tex tex_out/bitmanip.tex tex_out/vector_ops.tex \
+              tex_out/sv.tex tex_out/svp64_appendix.tex \
+                tex_out/pseudocode_svfparith.tex \
+                tex_out/pseudocode_fixedarith.tex \
+                tex_out/pseudocode_fixedlogical.tex \
+                 tex_out/pseudocode_svfixedarith.tex
 
-tex:
+tex: $(SOURCE_TEX)
        mkdir -p tex_out
-       pandoc -f markdown -t latex --top-level-division=section \
-               --filter pandoc_img.py \
-            -N -o tex_out/sv.tex sv.mdwn
        pandoc -f markdown -t latex --top-level-division=section \
                --filter pandoc_img.py \
             -N -o tex_out/vector_isas.tex sv/vector_isa_comparison.mdwn
@@ -14,10 +17,6 @@ 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 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
@@ -48,10 +47,6 @@ tex:
        pandoc -f markdown -t latex --top-level-division=section \
                --filter pandoc_img.py \
             -N -o tex_out/svstep.tex sv/svstep.mdwn
-       ./mdwn_inline.py sv/remap.mdwn tex_out/remap.mdwn
-       pandoc -f markdown -t latex --top-level-division=section \
-               --filter pandoc_img.py \
-            -N -o tex_out/remap.tex tex_out/remap.mdwn
        pandoc -f markdown -t latex --top-level-division=section \
                --filter pandoc_img.py \
             -N -o tex_out/mv_swizzle.tex sv/mv.swizzle.mdwn
@@ -62,17 +57,9 @@ 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 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
-       ./mdwn_inline.py sv/bitmanip.mdwn tex_out/bitmanip.mdwn
-       pandoc -f markdown -t latex --top-level-division=section \
-               --filter pandoc_img.py \
-                       -N -o tex_out/bitmanip.tex tex_out/bitmanip.mdwn
        pandoc -f markdown -t latex --top-level-division=section \
                --filter pandoc_img.py \
                        -N -o tex_out/fcvt.tex sv/fcvt.mdwn
@@ -91,19 +78,68 @@ tex:
        pandoc -f markdown -t latex --top-level-division=section \
                --filter pandoc_img.py \
                        -N -o tex_out/big_integer_analysis.tex sv/biginteger/analysis.mdwn
+
+tex_out/pseudocode_fixedlogical.tex : ../../openpower-isa/openpower/isa/fixedlogical.mdwn
+       pandoc -f markdown -t latex --top-level-division=section \
+               --filter pandoc_img.py \
+                       -N -o tex_out/pseudocode_fixedlogical.tex \
+                       ../../openpower-isa/openpower/isa/fixedlogical.mdwn
+
+tex_out/pseudocode_fixedarith.tex : ../../openpower-isa/openpower/isa/fixedarith.mdwn
+       pandoc -f markdown -t latex --top-level-division=section \
+               --filter pandoc_img.py \
+                       -N -o tex_out/pseudocode_fixedarith.tex \
+                       ../../openpower-isa/openpower/isa/fixedarith.mdwn
+
+tex_out/pseudocode_svfixedarith.tex : ../../openpower-isa/openpower/isa/svfixedarith.mdwn
        pandoc -f markdown -t latex --top-level-division=section \
                --filter pandoc_img.py \
                        -N -o tex_out/pseudocode_svfixedarith.tex \
                        ../../openpower-isa/openpower/isa/svfixedarith.mdwn
+
+tex_out/pseudocode_svfparith.tex : ../../openpower-isa/openpower/isa/svfparith.mdwn
        pandoc -f markdown -t latex --top-level-division=section \
                --filter pandoc_img.py \
                        -N -o tex_out/pseudocode_svfparith.tex \
                        ../../openpower-isa/openpower/isa/svfparith.mdwn
 
+tex_out/sv.tex : sv.mdwn
+       pandoc -f markdown -t latex --top-level-division=section \
+               --filter pandoc_img.py \
+            -N -o tex_out/sv.tex sv.mdwn
+
+tex_out/svp64_appendix.tex: sv/svp64/appendix.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 tex_out/appendix.mdwn
+
+tex_out/vector_ops.tex: sv/vector_ops.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 tex_out/vector_ops.mdwn
 
-pdf:
+tex_out/remap.tex: sv/remap.mdwn
+       mkdir -p tex_out
+       ./mdwn_inline.py sv/remap.mdwn tex_out/remap.mdwn
+       pandoc -f markdown -t latex --top-level-division=section \
+               --filter pandoc_img.py \
+            -N -o tex_out/remap.tex tex_out/remap.mdwn
+
+tex_out/bitmanip.tex: sv/bitmanip.mdwn
+       mkdir -p tex_out
+       ./mdwn_inline.py sv/bitmanip.mdwn tex_out/bitmanip.mdwn
+       pandoc -f markdown -t latex --top-level-division=section \
+               --filter pandoc_img.py \
+                       -N -o tex_out/bitmanip.tex tex_out/bitmanip.mdwn
+
+pdf: simple_v_spec.tex tex
        pdflatex -synctex=1 -interaction=nonstopmode simple_v_spec.tex
 
 upload: tex pdf
        rsync -HPavz simple_v_spec.pdf \
         libre-soc.org:/var/www/ftp.libre-riscv.org
+
+clean:
+       rm -fr tex_out
index aac81357e916979690dfa578f4ec0fb9a4c2c325..c7cda629f31a498d4ae3e4c649aaced27c8fc0a4 100644 (file)
@@ -215,6 +215,23 @@ Programme, requires full transparency.
 \input{tex_out/pseudocode_svfixedarith.tex}
 \end{appendices}
 
+\part{Scalar Power ISA pseudocode}
+
+This section contains updated pseudocode from the Power ISA Specification
+v3.0B to be executable.  Several bugfixes have been created as a direct
+result.  A Formal Correctness Proof Research Paper written by Boris
+Shingarov.
+
+\begin{appendices}
+\chapter{Fixed Point Arithmetic pseudocode}
+\hypertarget{svux2fpseudocode_fixedarith}{}
+\input{tex_out/pseudocode_fixedarith.tex}
+\chapter{Fixed Point Logical pseudocode}
+\hypertarget{svux2fpseudocode_fixedlogical}{}
+\input{tex_out/pseudocode_fixedlogical.tex}
+\end{appendices}
+
+
 
 
 \end{document}