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 sv/remap.mdwn
+ -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
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 sv/bitmanip.mdwn
+ -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
--- /dev/null
+#!/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 not line.startswith("[[!inline"):
+ o.write(line)
+ continue
+ print (line.strip())
+ # assume first thing is pagename
+ line = line.split('"')
+ fname = line[1]
+ print ("\t", fname)
+ if fname.endswith(".py"):
+ if fname.startswith("gf_reference"):
+ with open("../../nmigen-gf/"+fname) as inc:
+ o.write(inc.read())
+ else:
+ with open("../%s.mdwn" % fname) as inc:
+ o.write(inc.read())
* <https://en.wikiversity.org/wiki/Reed%E2%80%93Solomon_codes_for_coders>
* <https://maths-people.anu.edu.au/~brent/pd/rpb232tr.pdf>
-[[!inline quick="yes" raw="yes" pages="openpower/sv/draft_opcode_tables"]]
+[[!inline pages="openpower/sv/draft_opcode_tables" quick="yes" raw="yes" ]]
# binary and ternary bitops
There are four "shape" SPRs, SHAPE0-3, 32-bits in each,
which have the same format.
-[[!inline raw="yes" pages="openpower/sv/shape_table_format" ]]
+[[!inline pages="openpower/sv/shape_table_format" raw="yes" ]]
# svshape instruction <a name="svshape"> </a>
executed as a python program:
```
-[[!inline quick="yes" raw="yes" pages="openpower/sv/remap.py" ]]
+[[!inline pages="openpower/sv/remap.py" quick="yes" raw="yes" ]]
```
An easier-to-read version (using python iterators) shows the loop nesting:
```
-[[!inline quick="yes" raw="yes" pages="openpower/sv/remapyield.py" ]]
+[[!inline pages="openpower/sv/remapyield.py" quick="yes" raw="yes" ]]
```
Each element index from the for-loop `0..VL-1`