Skip to content

Commit 7fb0c7a

Browse files
authored
Merge pull request #424 from arturum1/main
Fix documentation tables
2 parents 4ea635a + ff53f49 commit 7fb0c7a

13 files changed

Lines changed: 67 additions & 31 deletions

File tree

py2hwsw/document/tsrc/ug.cls

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,3 +95,11 @@
9595

9696
\graphicspath{ {./figures/} }
9797

98+
% Custom alternative to \hline that prevents latex from breaking table rows into new pages
99+
\makeatletter
100+
\def\nobreakhline{%
101+
\multispan\LT@cols
102+
\unskip\leaders\hrule\@height\arrayrulewidth\hfill\cr
103+
\noalign{\penalty10000}%
104+
}
105+
\makeatother

py2hwsw/lib/hardware/iob_csrs/scripts/csr_gen.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1505,15 +1505,18 @@ def generate_csrs_tex(doc_tables, out_dir):
15051505
\\customcsrshhline
15061506
\\rowcolor{iob-green}
15071507
& & & {\\bf Hw} & {\\bf Sw} & & \\\\ \\hline \\hline
1508+
\\endfirsthead
1509+
\\hline
1510+
\\caption{"""
1511+
+ csr_group.descr.replace("_", "\\_")
1512+
+ """}
1513+
\\endlastfoot
15081514
15091515
\\input """
15101516
+ doc_conf
15111517
+ f"_{csr_group.name}"
15121518
+ """_csrs_tab
15131519
1514-
\\caption{"""
1515-
+ csr_group.descr.replace("_", "\\_")
1516-
+ """}
15171520
\\end{xltabular}
15181521
\\label{"""
15191522
+ doc_conf

py2hwsw/lib/hardware/memories/iob_memwrapper/iob_memwrapper.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,11 @@ def generate_mems_tex(mems, out_dir):
208208
\\hline
209209
\\rowcolor{iob-green}
210210
{\\bf Name} & {\\bf Type} & {\\bf (Word-)Addr Width} & {\\bf Data Width} & {\\bf Init file} \\\\ \\hline
211-
\\input mems_tab
211+
\\endfirsthead
212+
\\hline
212213
\\caption{Core memories.}
214+
\\endlastfoot
215+
\\input mems_tab
213216
\\end{xltabular}
214217
\\label{mems_tab:is}
215218
}

py2hwsw/py2hwsw_document/document/tsrc/core_lib.tex

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,13 @@
1010
\hline
1111
\rowcolor{iob-green}
1212
{\bf Name} & {\bf Directory} \\ \hline \hline
13+
\endfirsthead
14+
\hline
15+
\caption{Cores available in the library of the Py2HWSW framework. The \textit{Directory} column is the path to the core's setup directory, relative to the Py2HWSW lib directory \texttt{py2hwsw/lib/}.}
16+
\endlastfoot
1317

1418
\input py2hwsw_core_lib_tab
1519

16-
\caption{Cores available in the library of the Py2HWSW framework. The \textit{Directory} column is the path to the core's setup directory, relative to the Py2HWSW lib directory \texttt{py2hwsw/lib/}.}
1720
\label{py2hwsw_core_lib_tab}
1821
\end{xltabular}
1922
}

py2hwsw/py2hwsw_document/document/tsrc/standard_interfaces.tex

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,13 @@
2929
\hline
3030
\rowcolor{iob-green}
3131
{\bf Name} & {\bf Data Type} & {\bf Description} \\ \hline \hline
32+
\endfirsthead
33+
\hline
34+
\caption{Standard \textit{Python Parameters} passed by Py2HWSW to every core's "setup" function.}
35+
\endlastfoot
3236

3337
\input py2hwsw_py_params_tab
3438

35-
\caption{Standard \textit{Python Parameters} passed by Py2HWSW to every core's "setup" function.}
3639
\end{xltabular}
3740
\label{py2hwsw_py_params_tab}
3841
}
@@ -54,10 +57,13 @@
5457
\rowcolor{iob-green}
5558
% TODO: The "Data Type" column should specify what the user should input, instead of the internal object used by py2hwsw.
5659
{\bf Name} & {\bf Data Type} & {\bf Description} \\ \hline \hline
60+
\endfirsthead
61+
\hline
62+
\caption{Supported Py2HWSW attributes in the \textbf{Core Dictionary}. The \textit{Data Type} column specifies the type of internal object that the Py2HWSW will convert the attribute's value to (usually the user inputs a string, list, or dictionary value and then py2 converts it to an internal object).}
63+
\endlastfoot
5764

5865
\input py2hwsw_attributes_tab
5966

60-
\caption{Supported Py2HWSW attributes in the \textbf{Core Dictionary}. The \textit{Data Type} column specifies the type of internal object that the Py2HWSW will convert the attribute's value to (usually the user inputs a string, list, or dictionary value and then py2 converts it to an internal object).}
6167
\label{py2hwsw_attributes_tab}
6268
\end{xltabular}
6369
}

py2hwsw/scripts/block_gen.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,13 @@ def generate_subblocks_table_tex(subblocks, out_dir):
3232
\\hline
3333
\\rowcolor{iob-green}
3434
{\\bf Name} & {\\bf Description} \\\\ \\hline \\hline
35+
\\endfirsthead
36+
\\hline
37+
\\caption{Core subblocks.}
38+
\\endlastfoot
3539
3640
\\input subblocks_tab
3741
38-
\\caption{Core subblocks.}
3942
\\end{xltabular}
4043
\\label{subblocks_tab:is}
4144
}

py2hwsw/scripts/config_gen.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,14 +183,17 @@ def generate_config_tex(confs, out_dir):
183183
\\hline
184184
\\rowcolor{iob-green}
185185
{\\bf Configuration} & {\\bf Type} & {\\bf Min} & {\\bf Typical} & {\\bf Max} & {\\bf Description} \\\\ \\hline \\hline
186+
\\endfirsthead
187+
\\hline
188+
\\caption{"""
189+
+ group.descr.replace("_", "\\_")
190+
+ """}
191+
\\endlastfoot
186192
187193
\\input """
188194
+ group.name
189195
+ """_confs_tab
190196
191-
\\caption{"""
192-
+ group.descr.replace("_", "\\_")
193-
+ """}
194197
\\end{xltabular}
195198
\\label{"""
196199
+ group.name

0 commit comments

Comments
 (0)