add executive,summary to pdf
[libreriscv.git] / openpower / Makefile
1 #!/usr/bin/make -f
2 ISA_DIR := ../../openpower-isa/openpower/isa
3 SOURCE_TEX := tex_out/remap.tex \
4 tex_out/remap_appendix.tex \
5 tex_out/bitmanip.tex tex_out/vector_ops.tex \
6 tex_out/sv.tex tex_out/svp64_appendix.tex \
7 tex_out/overview.tex tex_out/svp64.tex \
8 tex_out/executive_summary.tex \
9 tex_out/compliancy_levels.tex tex_out/svp64_quirks.tex \
10 tex_out/sprs.tex tex_out/opcode_regs_deduped.tex \
11 tex_out/normal.tex tex_out/ldst.tex \
12 tex_out/branches.tex tex_out/cr_ops.tex \
13 tex_out/setvl.tex tex_out/svstep.tex \
14 tex_out/mv_swizzle.tex tex_out/mv_vec.tex \
15 tex_out/pseudocode_simplev.tex \
16 tex_out/pseudocode_bitmanip.tex \
17 tex_out/cr_int_predication.tex \
18 tex_out/fcvt.tex tex_out/fclass.tex \
19 tex_out/int_fp_mv.tex tex_out/av_opcodes.tex \
20 tex_out/big_integer.tex \
21 tex_out/pseudocode_fixedshift.tex \
22 tex_out/pseudocode_bcd.tex tex_out/pseudocode_branch.tex \
23 tex_out/pseudocode_comparefixed.tex \
24 tex_out/pseudocode_condition.tex \
25 tex_out/pseudocode_svfparith.tex \
26 tex_out/pseudocode_fixedarith.tex \
27 tex_out/pseudocode_fixedload.tex \
28 tex_out/pseudocode_fixedlogical.tex \
29 tex_out/pseudocode_fixedstore.tex \
30 tex_out/pseudocode_fixedtrap.tex \
31 tex_out/pseudocode_sprset.tex \
32 tex_out/pseudocode_stringldst.tex \
33 tex_out/pseudocode_system.tex \
34 tex_out/pseudocode_fpload.tex tex_out/pseudocode_fpstore.tex \
35 tex_out/pseudocode_fpmove.tex tex_out/pseudocode_fparith.tex \
36 tex_out/pseudocode_fpcvt.tex \
37 tex_out/pseudocode_svfixedarith.tex \
38 tex_out/big_integer_analysis.tex \
39 tex_out/transcendentals.tex \
40 tex_out/atomics.tex \
41 tex_out/vector_isas.tex \
42 tex_out/comparison_table.tex \
43 tex_out/fields.tex
44
45 # Does this umbrella rule need to be modified?
46 tex: $(SOURCE_TEX)
47 mkdir -p tex_out
48
49 tex_out/comparison_table.tex : sv/comparison_table.mdwn
50 mkdir -p tex_out
51 pandoc -f markdown -t latex --top-level-division=section \
52 --filter pandoc_img.py \
53 -N -o tex_out/comparison_table_pre.tex sv/comparison_table.mdwn
54 ./texmunge.py tex_out/comparison_table_pre.tex tex_out/comparison_table.tex
55
56 tex_out/vector_isas.tex : sv/vector_isa_comparison.mdwn
57 mkdir -p tex_out
58 pandoc -f markdown -t latex --top-level-division=section \
59 --filter pandoc_img.py \
60 -N -o tex_out/vector_isas.tex sv/vector_isa_comparison.mdwn
61
62 tex_out/big_integer_analysis.tex : sv/biginteger/analysis.mdwn
63 mkdir -p tex_out
64 pandoc -f markdown -t latex --top-level-division=section \
65 --filter pandoc_img.py \
66 -N -o tex_out/big_integer_analysis.tex sv/biginteger/analysis.mdwn
67
68 tex_out/pseudocode_fixedlogical.tex : $(ISA_DIR)/fixedlogical.mdwn
69 mkdir -p tex_out
70 pandoc -f markdown -t latex --top-level-division=section \
71 --filter pandoc_img.py \
72 -N -o tex_out/pseudocode_fixedlogical.tex \
73 $(ISA_DIR)/fixedlogical.mdwn
74
75 tex_out/pseudocode_fixedarith.tex : $(ISA_DIR)/fixedarith.mdwn
76 mkdir -p tex_out
77 pandoc -f markdown -t latex --top-level-division=section \
78 --filter pandoc_img.py \
79 -N -o tex_out/pseudocode_fixedarith.tex \
80 $(ISA_DIR)/fixedarith.mdwn
81
82 tex_out/pseudocode_svfixedarith.tex : $(ISA_DIR)/svfixedarith.mdwn
83 mkdir -p tex_out
84 pandoc -f markdown -t latex --top-level-division=section \
85 --filter pandoc_img.py \
86 -N -o tex_out/pseudocode_svfixedarith.tex \
87 $(ISA_DIR)/svfixedarith.mdwn
88
89 tex_out/pseudocode_svfparith.tex : $(ISA_DIR)/svfparith.mdwn
90 mkdir -p tex_out
91 pandoc -f markdown -t latex --top-level-division=section \
92 --filter pandoc_img.py \
93 -N -o tex_out/pseudocode_svfparith.tex \
94 $(ISA_DIR)/svfparith.mdwn
95
96 tex_out/sv.tex : sv.mdwn
97 mkdir -p tex_out
98 pandoc -f markdown -t latex --top-level-division=section \
99 --filter pandoc_img.py \
100 -N -o tex_out/sv.tex sv.mdwn
101
102 tex_out/overview.tex : sv/overview.mdwn
103 mkdir -p tex_out
104 pandoc -f markdown -t latex --top-level-division=section \
105 --filter pandoc_img.py \
106 -N -o tex_out/overview.tex sv/overview.mdwn
107
108 tex_out/svp64.tex : sv/svp64.mdwn
109 mkdir -p tex_out
110 pandoc -f markdown -t latex --top-level-division=section \
111 --filter pandoc_img.py \
112 -N -o tex_out/svp64.tex sv/svp64.mdwn
113
114 tex_out/compliancy_levels.tex : sv/compliancy_levels.mdwn
115 mkdir -p tex_out
116 pandoc -f markdown -t latex --top-level-division=section \
117 --filter pandoc_img.py \
118 -N -o tex_out/compliancy_levels.tex sv/compliancy_levels.mdwn
119
120 tex_out/svp64_quirks.tex : sv/svp64_quirks.mdwn
121 mkdir -p tex_out
122 pandoc -f markdown -t latex --top-level-division=section \
123 --filter pandoc_img.py \
124 -N -o tex_out/svp64_quirks.tex sv/svp64_quirks.mdwn
125
126 tex_out/sprs.tex : sv/sprs.mdwn
127 mkdir -p tex_out
128 pandoc -f markdown -t latex --top-level-division=section \
129 --filter pandoc_img.py \
130 -N -o tex_out/sprs.tex sv/sprs.mdwn
131
132 tex_out/opcode_regs_deduped.tex : opcode_regs_deduped.mdwn
133 mkdir -p tex_out
134 pandoc -f markdown -t latex --top-level-division=section \
135 --filter pandoc_img.py \
136 -N -o tex_out/opcode_regs_deduped.tex opcode_regs_deduped.mdwn
137
138 tex_out/normal.tex : sv/normal.mdwn
139 mkdir -p tex_out
140 pandoc -f markdown -t latex --top-level-division=section \
141 --filter pandoc_img.py \
142 -N -o tex_out/normal.tex sv/normal.mdwn
143
144 tex_out/ldst.tex : sv/ldst.mdwn
145 mkdir -p tex_out
146 pandoc -f markdown -t latex --top-level-division=section \
147 --filter pandoc_img.py \
148 -N -o tex_out/ldst.tex sv/ldst.mdwn
149
150 tex_out/branches.tex : sv/branches.mdwn
151 mkdir -p tex_out
152 pandoc -f markdown -t latex --top-level-division=section \
153 --filter pandoc_img.py \
154 -N -o tex_out/branches.tex sv/branches.mdwn
155
156 tex_out/cr_ops.tex : sv/cr_ops.mdwn
157 mkdir -p tex_out
158 pandoc -f markdown -t latex --top-level-division=section \
159 --filter pandoc_img.py \
160 -N -o tex_out/cr_ops.tex sv/cr_ops.mdwn
161
162 tex_out/setvl.tex : sv/setvl.mdwn
163 mkdir -p tex_out
164 pandoc -f markdown -t latex --top-level-division=section \
165 --filter pandoc_img.py \
166 -N -o tex_out/setvl.tex sv/setvl.mdwn
167
168 tex_out/svstep.tex : sv/svstep.mdwn
169 mkdir -p tex_out
170 pandoc -f markdown -t latex --top-level-division=section \
171 --filter pandoc_img.py \
172 -N -o tex_out/svstep.tex sv/svstep.mdwn
173
174 tex_out/mv_swizzle.tex : sv/mv.swizzle.mdwn
175 mkdir -p tex_out
176 pandoc -f markdown -t latex --top-level-division=section \
177 --filter pandoc_img.py \
178 -N -o tex_out/mv_swizzle.tex sv/mv.swizzle.mdwn
179
180 tex_out/fields.tex : sv/fields.mdwn
181 mkdir -p tex_out
182 ./mdwn_inline.py sv/fields.mdwn tex_out/fields.mdwn
183 pandoc -f markdown -t latex --top-level-division=section \
184 --filter pandoc_img.py \
185 -N -o tex_out/fields.tex tex_out/fields.mdwn
186 sed -i 's/\\section{/\\section*{/g' tex_out/fields.tex
187
188 tex_out/mv_vec.tex : sv/mv.vec.mdwn
189 mkdir -p tex_out
190 pandoc -f markdown -t latex --top-level-division=section \
191 --filter pandoc_img.py \
192 -N -o tex_out/mv_vec.tex sv/mv.vec.mdwn
193
194 tex_out/pseudocode_simplev.tex : $(ISA_DIR)/simplev.mdwn
195 mkdir -p tex_out
196 pandoc -f markdown -t latex --top-level-division=section \
197 --filter pandoc_img.py \
198 -N -o tex_out/pseudocode_simplev.tex \
199 $(ISA_DIR)/simplev.mdwn
200
201 tex_out/pseudocode_bitmanip.tex : $(ISA_DIR)/bitmanip.mdwn
202 mkdir -p tex_out
203 pandoc -f markdown -t latex --top-level-division=section \
204 --filter pandoc_img.py \
205 -N -o tex_out/pseudocode_bitmanip.tex \
206 $(ISA_DIR)/bitmanip.mdwn
207
208 tex_out/cr_int_predication.tex : sv/cr_int_predication.mdwn
209 mkdir -p tex_out
210 pandoc -f markdown -t latex --top-level-division=section \
211 --filter pandoc_img.py \
212 -N -o tex_out/cr_int_predication.tex sv/cr_int_predication.mdwn
213
214 tex_out/fcvt.tex : sv/fcvt.mdwn
215 mkdir -p tex_out
216 pandoc -f markdown -t latex --top-level-division=section \
217 --filter pandoc_img.py \
218 -N -o tex_out/fcvt.tex sv/fcvt.mdwn
219
220 tex_out/fclass.tex : sv/fclass.mdwn
221 mkdir -p tex_out
222 pandoc -f markdown -t latex --top-level-division=section \
223 --filter pandoc_img.py \
224 -N -o tex_out/fclass.tex sv/fclass.mdwn
225
226 tex_out/int_fp_mv.tex : sv/int_fp_mv.mdwn
227 mkdir -p tex_out
228 pandoc -f markdown -t latex --top-level-division=section \
229 --filter pandoc_img.py \
230 -N -o tex_out/int_fp_mv.tex sv/int_fp_mv.mdwn
231
232 tex_out/av_opcodes.tex : sv/av_opcodes.mdwn
233 mkdir -p tex_out
234 pandoc -f markdown -t latex --top-level-division=section \
235 --filter pandoc_img.py \
236 -N -o tex_out/av_opcodes.tex sv/av_opcodes.mdwn
237
238 tex_out/big_integer.tex : sv/biginteger.mdwn
239 mkdir -p tex_out
240 pandoc -f markdown -t latex --top-level-division=section \
241 --filter pandoc_img.py \
242 -N -o tex_out/big_integer.tex sv/biginteger.mdwn
243
244 tex_out/pseudocode_fixedshift.tex : $(ISA_DIR)/fixedshift.mdwn
245 mkdir -p tex_out
246 pandoc -f markdown -t latex --top-level-division=section \
247 --filter pandoc_img.py \
248 -N -o tex_out/pseudocode_fixedshift.tex \
249 $(ISA_DIR)/fixedshift.mdwn
250
251 tex_out/atomics.tex: atomics.mdwn
252 mkdir -p tex_out
253 ./mdwn_inline.py atomics.mdwn tex_out/atomics.mdwn
254 pandoc -f markdown -t latex --top-level-division=section \
255 --filter pandoc_img.py \
256 -N -o tex_out/atomics.tex tex_out/atomics.mdwn
257
258 tex_out/transcendentals.tex: transcendentals.mdwn
259 mkdir -p tex_out
260 ./mdwn_inline.py transcendentals.mdwn tex_out/transcendentals.mdwn
261 pandoc -f markdown -t latex --top-level-division=section \
262 --filter pandoc_img.py \
263 -N -o tex_out/transcendentals.tex tex_out/transcendentals.mdwn
264
265 tex_out/executive_summary.tex: sv/executive_summary.mdwn
266 mkdir -p tex_out
267 ./mdwn_inline.py sv/executive_summary.mdwn tex_out/executive_summary.mdwn
268 pandoc -f markdown -t latex --top-level-division=section \
269 --filter pandoc_img.py \
270 -N -o tex_out/executive_summary.tex tex_out/executive_summary.mdwn
271
272 tex_out/svp64_appendix.tex: sv/svp64/appendix.mdwn
273 mkdir -p tex_out
274 ./mdwn_inline.py sv/svp64/appendix.mdwn tex_out/appendix.mdwn
275 pandoc -f markdown -t latex --top-level-division=section \
276 --filter pandoc_img.py \
277 -N -o tex_out/svp64_appendix.tex tex_out/appendix.mdwn
278
279 tex_out/vector_ops.tex: sv/vector_ops.mdwn
280 mkdir -p tex_out
281 ./mdwn_inline.py sv/vector_ops.mdwn tex_out/vector_ops.mdwn
282 pandoc -f markdown -t latex --top-level-division=section \
283 --filter pandoc_img.py \
284 -N -o tex_out/vector_ops.tex tex_out/vector_ops.mdwn
285
286 tex_out/remap_appendix.tex: sv/remap/appendix.mdwn
287 mkdir -p tex_out
288 ./mdwn_inline.py sv/remap/appendix.mdwn tex_out/remap_appendix.mdwn
289 pandoc -f markdown -t latex --top-level-division=section \
290 --filter pandoc_img.py \
291 -N -o tex_out/remap_appendix.tex tex_out/remap_appendix.mdwn
292
293 tex_out/remap.tex: sv/remap.mdwn
294 mkdir -p tex_out
295 ./mdwn_inline.py sv/remap.mdwn tex_out/remap.mdwn
296 pandoc -f markdown -t latex --top-level-division=section \
297 --filter pandoc_img.py \
298 -N -o tex_out/remap.tex tex_out/remap.mdwn
299
300 tex_out/bitmanip.tex: sv/bitmanip.mdwn pandoc_img.py
301 mkdir -p tex_out
302 ./mdwn_inline.py sv/bitmanip.mdwn tex_out/bitmanip.mdwn
303 pandoc -f markdown -t latex --top-level-division=section \
304 --filter pandoc_img.py \
305 -N -o tex_out/bitmanip.tex tex_out/bitmanip.mdwn
306
307 tex_out/pseudocode_bcd.tex : $(ISA_DIR)/bcd.mdwn
308 mkdir -p tex_out
309 pandoc -f markdown -t latex --top-level-division=section \
310 --filter pandoc_img.py \
311 -N -o tex_out/pseudocode_bcd.tex \
312 $(ISA_DIR)/bcd.mdwn
313
314 tex_out/pseudocode_branch.tex : $(ISA_DIR)/branch.mdwn
315 mkdir -p tex_out
316 pandoc -f markdown -t latex --top-level-division=section \
317 --filter pandoc_img.py \
318 -N -o tex_out/pseudocode_branch.tex \
319 $(ISA_DIR)/branch.mdwn
320
321 tex_out/pseudocode_comparefixed.tex : $(ISA_DIR)/comparefixed.mdwn
322 mkdir -p tex_out
323 pandoc -f markdown -t latex --top-level-division=section \
324 --filter pandoc_img.py \
325 -N -o tex_out/pseudocode_comparefixed.tex \
326 $(ISA_DIR)/comparefixed.mdwn
327
328 tex_out/pseudocode_condition.tex : $(ISA_DIR)/condition.mdwn
329 mkdir -p tex_out
330 pandoc -f markdown -t latex --top-level-division=section \
331 --filter pandoc_img.py \
332 -N -o tex_out/pseudocode_condition.tex \
333 $(ISA_DIR)/condition.mdwn
334
335 tex_out/pseudocode_fixedload.tex : $(ISA_DIR)/fixedload.mdwn
336 mkdir -p tex_out
337 pandoc -f markdown -t latex --top-level-division=section \
338 --filter pandoc_img.py \
339 -N -o tex_out/pseudocode_fixedload.tex \
340 $(ISA_DIR)/fixedload.mdwn
341
342 tex_out/pseudocode_fixedstore.tex : $(ISA_DIR)/fixedstore.mdwn
343 mkdir -p tex_out
344 pandoc -f markdown -t latex --top-level-division=section \
345 --filter pandoc_img.py \
346 -N -o tex_out/pseudocode_fixedstore.tex \
347 $(ISA_DIR)/fixedstore.mdwn
348
349 tex_out/pseudocode_fixedtrap.tex : $(ISA_DIR)/fixedtrap.mdwn
350 mkdir -p tex_out
351 pandoc -f markdown -t latex --top-level-division=section \
352 --filter pandoc_img.py \
353 -N -o tex_out/pseudocode_fixedtrap.tex \
354 $(ISA_DIR)/fixedtrap.mdwn
355
356 tex_out/pseudocode_sprset.tex : $(ISA_DIR)/sprset.mdwn
357 mkdir -p tex_out
358 pandoc -f markdown -t latex --top-level-division=section \
359 --filter pandoc_img.py \
360 -N -o tex_out/pseudocode_sprset.tex \
361 $(ISA_DIR)/sprset.mdwn
362
363 tex_out/pseudocode_stringldst.tex : $(ISA_DIR)/stringldst.mdwn
364 mkdir -p tex_out
365 pandoc -f markdown -t latex --top-level-division=section \
366 --filter pandoc_img.py \
367 -N -o tex_out/pseudocode_stringldst.tex \
368 $(ISA_DIR)/stringldst.mdwn
369
370 tex_out/pseudocode_system.tex : $(ISA_DIR)/system.mdwn
371 mkdir -p tex_out
372 pandoc -f markdown -t latex --top-level-division=section \
373 --filter pandoc_img.py \
374 -N -o tex_out/pseudocode_system.tex \
375 $(ISA_DIR)/system.mdwn
376
377 tex_out/pseudocode_fpload.tex : $(ISA_DIR)/fpload.mdwn
378 mkdir -p tex_out
379 pandoc -f markdown -t latex --top-level-division=section \
380 --filter pandoc_img.py \
381 -N -o tex_out/pseudocode_fpload.tex \
382 $(ISA_DIR)/fpload.mdwn
383
384 tex_out/pseudocode_fpstore.tex : $(ISA_DIR)/fpstore.mdwn
385 mkdir -p tex_out
386 pandoc -f markdown -t latex --top-level-division=section \
387 --filter pandoc_img.py \
388 -N -o tex_out/pseudocode_fpstore.tex \
389 $(ISA_DIR)/fpstore.mdwn
390
391 tex_out/pseudocode_fpmove.tex : $(ISA_DIR)/fpmove.mdwn
392 mkdir -p tex_out
393 pandoc -f markdown -t latex --top-level-division=section \
394 --filter pandoc_img.py \
395 -N -o tex_out/pseudocode_fpmove.tex \
396 $(ISA_DIR)/fpmove.mdwn
397
398 tex_out/pseudocode_fparith.tex : $(ISA_DIR)/fparith.mdwn
399 mkdir -p tex_out
400 pandoc -f markdown -t latex --top-level-division=section \
401 --filter pandoc_img.py \
402 -N -o tex_out/pseudocode_fparith.tex \
403 $(ISA_DIR)/fparith.mdwn
404
405 tex_out/pseudocode_fpcvt.tex : $(ISA_DIR)/fpcvt.mdwn
406 mkdir -p tex_out
407 pandoc -f markdown -t latex --top-level-division=section \
408 --filter pandoc_img.py \
409 -N -o tex_out/pseudocode_fpcvt.tex \
410 $(ISA_DIR)/fpcvt.mdwn
411
412
413
414 simple_v_spec.pdf : tex simple_v_spec.tex
415 pdflatex -synctex=1 -interaction=nonstopmode simple_v_spec.tex
416
417 pdf : simple_v_spec.pdf
418
419 upload : pdf
420 rsync -HPavz simple_v_spec.pdf \
421 libre-soc.org:/var/www/ftp.libre-riscv.org
422
423 clean:
424 rm -fr tex_out simple_v_spec.aux simple_v_spec.out simple_v_spec.toc