From: Luke Kenneth Casson Leighton Date: Fri, 22 Jul 2022 22:23:35 +0000 (+0100) Subject: hack to put comparison table on one page X-Git-Tag: opf_rfc_ls005_v1~1117 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b8b9aae2a9c89c4bcc3111cb05d2cd5ca9c3ab60;p=libreriscv.git hack to put comparison table on one page --- diff --git a/openpower/Makefile b/openpower/Makefile index 5d9c2d89d..bf9e9f55a 100755 --- a/openpower/Makefile +++ b/openpower/Makefile @@ -49,7 +49,8 @@ tex_out/comparison_table.tex : sv/comparison_table.mdwn mkdir -p tex_out pandoc -f markdown -t latex --top-level-division=section \ --filter pandoc_img.py \ - -N -o tex_out/comparison_table.tex sv/comparison_table.mdwn + -N -o tex_out/comparison_table_pre.tex sv/comparison_table.mdwn + ./texmunge.py tex_out/comparison_table_pre.tex tex_out/comparison_table.tex tex_out/vector_isas.tex : sv/vector_isa_comparison.mdwn mkdir -p tex_out diff --git a/openpower/mdwn_inline.py b/openpower/mdwn_inline.py index cea39fe21..53d30ac08 100755 --- a/openpower/mdwn_inline.py +++ b/openpower/mdwn_inline.py @@ -5,6 +5,11 @@ import sys with open(sys.argv[2], "w") as o: with open(sys.argv[1], "r") as f: for line in f.readlines(): + if sys.argv[1].endswith("comparison_table.tex") and \ + line.startswith("\begin{itemize}"): + o.write(line) + o.write("\\itemsep -0.3em\n") + continue if not line.startswith("[[!inline"): o.write(line) continue diff --git a/openpower/simple_v_spec.tex b/openpower/simple_v_spec.tex index d640fc438..679f81ecd 100644 --- a/openpower/simple_v_spec.tex +++ b/openpower/simple_v_spec.tex @@ -184,6 +184,16 @@ For questions, comments, and clarification, please contact the following: \item Andrey Miroshnikov - Libre-SOC engineer, assisting with documentation - andrey@technepisteme.xyz \end{itemize} +\begin{landscape} +\chapter*{Comparison Table} +\addcontentsline{toc}{chapter}{Comparison Table} \markboth{INTRODUCTION}{} +\hypertarget{svux2fcomparison_table}{} +{ +\fontsize{6}{8}\selectfont +\input{tex_out/comparison_table.tex} +} +\end{landscape} + \part{Scalable Vectors Primer} \input{svp64-primer/acronyms} \chapter*{Executive Summary} @@ -251,14 +261,6 @@ For questions, comments, and clarification, please contact the following: } \end{landscape} -\chapter{Comparison Table}\hypertarget{svux2fcomparison_table}{} -\begin{landscape} -{ -\fontsize{7}{9}\selectfont -\input{tex_out/comparison_table.tex} -} -\end{landscape} - \end{appendices} \part{Scalar Instructions} diff --git a/openpower/sv/comparison_table.mdwn b/openpower/sv/comparison_table.mdwn index 224f12ae3..776a44657 100644 --- a/openpower/sv/comparison_table.mdwn +++ b/openpower/sv/comparison_table.mdwn @@ -1,4 +1,3 @@ -# ISA Comparison Table | ISA
name | Num
opcodes | Taxonomy /
Class | Predicate
Masks | Twin
Predication | Explicit
Vector regs | 128-bit | Bigint
capability | LDST
Fault-First | Data-dependent
Fail-first | Predicate-
Result | Matrix HW
support | |----------------|-----------------|-----------------------|----------------------|-----------------------|----------------------------|---------|------------------------|-----------------------|--------------------------------|-----------------------|-----------------------| diff --git a/openpower/texmunge.py b/openpower/texmunge.py new file mode 100755 index 000000000..f8bc1c52d --- /dev/null +++ b/openpower/texmunge.py @@ -0,0 +1,14 @@ +#!/usr/bin/env python3 + +import sys + +with open(sys.argv[2], "w") as o: + with open(sys.argv[1], "r") as f: + for line in f.readlines(): + + if sys.argv[1].endswith("comparison_table_pre.tex") and \ + line.startswith(r"\begin{itemize}"): + o.write(line) + o.write("\\itemsep -0.3em\n") + continue + o.write(line)