From 7dabf0b931036148fd7986d7d75624d81c07f146 Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Sun, 27 Feb 2022 12:03:52 +0000 Subject: Update documentation generation --- docs/Makefile | 31 ++ docs/documentation.org | 13 +- docs/images/toolflow.pdf | Bin 0 -> 20490 bytes docs/images/toolflow.png | Bin 0 -> 26864 bytes docs/images/toolflow.svg | 1250 ++++++++++++++++++++++++++++++++++++++++++++ docs/man.org | 2 + docs/res/install-deps.el | 10 + docs/res/publish-html.el | 12 + docs/res/publish-man.el | 12 + docs/res/publish-manual.el | 12 + 10 files changed, 1336 insertions(+), 6 deletions(-) create mode 100644 docs/Makefile create mode 100644 docs/images/toolflow.pdf create mode 100644 docs/images/toolflow.png create mode 100644 docs/images/toolflow.svg create mode 100644 docs/res/install-deps.el create mode 100644 docs/res/publish-html.el create mode 100644 docs/res/publish-man.el create mode 100644 docs/res/publish-manual.el diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 0000000..93083cd --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,31 @@ +all: manual src man-html + +install-deps: + emacs --batch --load ./res/install-deps.el + +manual: + mkdir -p manual + emacs --batch --file documentation.org --load ./res/publish-manual.el + makeinfo --html --number-sections --no-split \ + --css-ref "https://www.gnu.org/software/emacs/manual.css" \ + vericert.texi -o ./manual/index.html + cp -r images ./manual/. + +man-html: + mkdir -p man + emacs --batch --file man.org --load ./res/publish-html.el + cp man.html ./man/vericert.1.html + +src: + $(MAKE) -C .. doc + cp -r ../html src + +upload: + tar caf docs.tar.xz manual man src + rsync docs.tar.xz "zk@leika.ymhg.org:~" + +.PHONY: all upload manual man src install-deps man-html + +clean: + rm -rf manual man src + rm -f docs.tar.xz diff --git a/docs/documentation.org b/docs/documentation.org index 3a0633f..e951f83 100644 --- a/docs/documentation.org +++ b/docs/documentation.org @@ -4,7 +4,7 @@ #+email: git@ymhg.org #+language: en -* Docs +* Introduction :PROPERTIES: :EXPORT_FILE_NAME: _index :EXPORT_HUGO_SECTION: docs @@ -15,10 +15,10 @@ Vericert translates C code into a hardware description language called Verilog, synthesised into hardware, to be placed onto a field-programmable gate array (FPGA) or application-specific integrated circuit (ASIC). -#+attr_html: :width 600 +#+attr_html: :width "600px" #+caption: Current design of Vericert, where HTL is an intermediate language representing a finite state machine with data-path (FSMD) and Verilog is the target language. #+name: fig:design -[[./images/toolflow.svg]] +[[./images/toolflow.png]] The design shown in Figure [[fig:design]] shows how Vericert leverages an existing verified C compiler called [[https://compcert.org/compcert-C.html][CompCert]] to perform this translation. @@ -49,9 +49,9 @@ Free Documentation License''. :END: #+transclude: [[file:~/projects/vericert/README.org::#building][file:~/projects/vericert/README.org::#building]] :only-contents :exclude-elements "headline property-drawer" -#+transclude: [[file:~/projects/vericert/README.org::#downloading-compcert][file:~/projects/vericert/README.org::#downloading-compcert]] -#+transclude: [[file:~/projects/vericert/README.org::#setting-up-nix][file:~/projects/vericert/README.org::#setting-up-nix]] -#+transclude: [[file:~/projects/vericert/README.org::#makefile-build][file:~/projects/vericert/README.org::#makefile-build]] +#+transclude: [[file:~/projects/vericert/README.org::#downloading-compcert][file:~/projects/vericert/README.org::#downloading-compcert]] :level 2 +#+transclude: [[file:~/projects/vericert/README.org::#setting-up-nix][file:~/projects/vericert/README.org::#setting-up-nix]] :level 2 +#+transclude: [[file:~/projects/vericert/README.org::#makefile-build][file:~/projects/vericert/README.org::#makefile-build]] :level 2 ** Testing @@ -155,6 +155,7 @@ to the proper documentation. :PROPERTIES: :CUSTOM_ID: scheduling :END: +#+cindex: scheduling Scheduling is an optimisation which is used to run various instructions in parallel that are independent to each other. diff --git a/docs/images/toolflow.pdf b/docs/images/toolflow.pdf new file mode 100644 index 0000000..5fcee67 Binary files /dev/null and b/docs/images/toolflow.pdf differ diff --git a/docs/images/toolflow.png b/docs/images/toolflow.png new file mode 100644 index 0000000..601d6be Binary files /dev/null and b/docs/images/toolflow.png differ diff --git a/docs/images/toolflow.svg b/docs/images/toolflow.svg new file mode 100644 index 0000000..0d8f39f --- /dev/null +++ b/docs/images/toolflow.svg @@ -0,0 +1,1250 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/man.org b/docs/man.org index 36dbc42..f4d8aef 100644 --- a/docs/man.org +++ b/docs/man.org @@ -1,6 +1,8 @@ #+title: vericert #+man_class_options: :section-id "1" #+export_file_name: vericert.1 +#+options: toc:nil num:nil +#+html_head_extra: * NAME diff --git a/docs/res/install-deps.el b/docs/res/install-deps.el new file mode 100644 index 0000000..9440db5 --- /dev/null +++ b/docs/res/install-deps.el @@ -0,0 +1,10 @@ +(require 'package) +(package-initialize) +(add-to-list 'package-archives '("nongnu" . "https://elpa.nongnu.org/nongnu/") t) +(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t) +(add-to-list 'package-archives '("gnu-devel" . "https://elpa.gnu.org/devel/") t) +(package-refresh-contents) + +(package-install 'org) +(package-install 'org-contrib) +(package-install 'org-transclusion) diff --git a/docs/res/publish-html.el b/docs/res/publish-html.el new file mode 100644 index 0000000..68de36d --- /dev/null +++ b/docs/res/publish-html.el @@ -0,0 +1,12 @@ +(require 'package) +(package-initialize) + +(require 'org) +(require 'org-transclusion) +(require 'ox) +(require 'ox-html) + +(setq org-transclusion-exclude-elements nil) + +(org-transclusion-add-all) +(org-html-export-to-html) diff --git a/docs/res/publish-man.el b/docs/res/publish-man.el new file mode 100644 index 0000000..634b454 --- /dev/null +++ b/docs/res/publish-man.el @@ -0,0 +1,12 @@ +(require 'package) +(package-initialize) + +(require 'org) +(require 'org-transclusion) +(require 'ox) +(require 'ox-man) + +(setq org-transclusion-exclude-elements nil) + +(org-transclusion-add-all) +(org-man-export-to-man) diff --git a/docs/res/publish-manual.el b/docs/res/publish-manual.el new file mode 100644 index 0000000..df5db6b --- /dev/null +++ b/docs/res/publish-manual.el @@ -0,0 +1,12 @@ +(require 'package) +(package-initialize) + +(require 'org) +(require 'org-transclusion) +(require 'ox) +(require 'ox-texinfo) + +(setq org-transclusion-exclude-elements nil) + +(org-transclusion-add-all) +(org-texinfo-export-to-texinfo) -- cgit