From cd038c559eb9b68bd0a5af74bfd0cb01aa323729 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Mon, 4 Jul 2022 12:30:01 +0100 Subject: [PATCH] split out into separate makefile targets, add more pseudocode --- openpower/Makefile | 78 +++++++++++++++++++++++++++---------- openpower/simple_v_spec.tex | 17 ++++++++ 2 files changed, 74 insertions(+), 21 deletions(-) diff --git a/openpower/Makefile b/openpower/Makefile index 63955d387..ce694baf9 100755 --- a/openpower/Makefile +++ b/openpower/Makefile @@ -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 diff --git a/openpower/simple_v_spec.tex b/openpower/simple_v_spec.tex index aac81357e..c7cda629f 100644 --- a/openpower/simple_v_spec.tex +++ b/openpower/simple_v_spec.tex @@ -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} -- 2.30.2