Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs update; Libc improvements #51

Merged
merged 20 commits into from
Feb 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Read the Docs configuration file for Sphinx projects
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the OS, Python version and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.12"
# You can also specify other tool versions:
# nodejs: "20"
# rust: "1.70"
# golang: "1.20"

# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: docs/conf.py
# You can configure Sphinx to use a different builder, for instance use the dirhtml builder for simpler URLs
# builder: "dirhtml"
# Fail on all warnings to avoid broken references
# fail_on_warning: true

# Optionally build your docs in additional formats such as PDF and ePub
formats:
- pdf
# - epub

# Optional but recommended, declare the Python requirements required
# to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- requirements: docs/requirements.txt
28 changes: 14 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,89 +56,89 @@ all : doxy-pdf default #t# Build default with docs
.PHONY : sim
sim: boot #t# Build atomsim for given soctarget
$(call print_msg_root,Building AtomSim)
make $(MKFLAGS) -C $(sim_dir) soctarget=$(soctarget) DEBUG=$(debug)
$(MAKE) $(MKFLAGS) -C $(sim_dir) soctarget=$(soctarget) DEBUG=$(debug)


.PHONY: clean-sim
clean-sim: #t# Clean atomsim build files
$(call print_msg_root,Cleaning AtomSim build files)
make $(MKFLAGS) -C $(sim_dir) soctarget=$(soctarget) clean
$(MAKE) $(MKFLAGS) -C $(sim_dir) soctarget=$(soctarget) clean


.PHONY: test
test: sim lib #t# Test the build using banner example
$(call print_msg_root,Running example on Atomsim)
make $(MKFLAGS) -C $(RVATOM)/sw/examples soctarget=$(soctarget) ex=banner sim=1 clean compile run
$(MAKE) $(MKFLAGS) -C $(RVATOM)/sw/examples soctarget=$(soctarget) ex=banner sim=1 clean compile run


# ======== Bootloader ========
.PHONY : boot
boot: lib #t# Build bootloader for given target
$(call print_msg_root,Building bootloader)
make $(MKFLAGS) -C $(bootloader_dir) soctarget=$(soctarget) sim=$(sim)
$(MAKE) $(MKFLAGS) -C $(bootloader_dir) soctarget=$(soctarget) sim=$(sim)


.PHONY: clean-boot
clean-boot: #t# Clean bootloader build files
$(call print_msg_root,Cleaning bootloader build files)
make $(MKFLAGS) -C $(bootloader_dir) soctarget=$(soctarget) clean
$(MAKE) $(MKFLAGS) -C $(bootloader_dir) soctarget=$(soctarget) clean


# ======== SCAR ========
.PHONY: scar
scar: sim #t# Verify target using scar
$(call print_msg_root,Running SCAR)
make $(MKFLAGS) -C $(scar_dir)
$(MAKE) $(MKFLAGS) -C $(scar_dir)


.PHONY: clean-scar
clean-scar: #t# Clean scar directory
$(call print_msg_root,Cleaning SCAR working directory)
make $(MKFLAGS) -C $(scar_dir) clean
$(MAKE) $(MKFLAGS) -C $(scar_dir) clean


# ======== ElfDump ========
.PHONY: elfdump
elfdump: #t# Build elfdump utility
$(call print_msg_root,Building ELFDump)
make $(MKFLAGS) -C $(elfdump_dir)
$(MAKE) $(MKFLAGS) -C $(elfdump_dir)


.PHONY: clean-elfdump
clean-elfdump: #t# Clean elfdump directory
$(call print_msg_root,Cleaning ELFDump build files)
make $(MKFLAGS) -C $(elfdump_dir) clean
$(MAKE) $(MKFLAGS) -C $(elfdump_dir) clean

# ======== SW libs ========
.PHONY: lib
lib: #t# compile software libraries
$(call print_msg_root,Building libcatom)
make $(MKFLAGS) -C $(lib_dir) soctarget=$(soctarget) sim=$(sim)
$(MAKE) $(MKFLAGS) -C $(lib_dir) soctarget=$(soctarget) sim=$(sim)


.PHONY: clean-lib
clean-lib: #t# Clean software libs
$(call print_msg_root,Cleaning libcatom build files)
make $(MKFLAGS) -C $(lib_dir) clean
$(MAKE) $(MKFLAGS) -C $(lib_dir) clean


# ======== Documentation ========
.PHONY: doxy
doxy: #t# Generate atomsim C++ source documentation
$(call print_msg_root,Generating docs for AtomSim,LATEX & HTML)
make $(MKFLAGS) -C $(doxy_dir)
$(MAKE) $(MKFLAGS) -C $(doxy_dir)


.PHONY: doxy-pdf
doxy-pdf: doxy #t# Generate atomsim C++ source documentation (pdf)
$(call print_msg_root,Generating docs for AtomSim,PDF)
make $(MKFLAGS) -C $(doxy_dir) pdf
$(MAKE) $(MKFLAGS) -C $(doxy_dir) pdf


.PHONY: clean-doxy
clean-doxy: #t# Clean build files for Atomsim docs
$(call print_msg_root,Cleaning docs build files)
make $(MKFLAGS) -C $(doxy_dir) clean
$(MAKE) $(MKFLAGS) -C $(doxy_dir) clean


# ======== clean ========
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ['sphinx.ext.autosectionlabel', 'sphinx_panels', 'sphinx_copybutton', ]
extensions = ['sphinx.ext.autosectionlabel', 'sphinx_design', 'sphinx_copybutton', 'sphinx.ext.graphviz']

copybutton_prompt_text = r">>> |\.\.\. |\$ |In \[\d*\]: | {2,5}\.\.\.: | {5,8}: "
copybutton_prompt_is_regexp = True
Expand Down
88 changes: 88 additions & 0 deletions docs/diagrams/AtomBones.drawio
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
<mxfile host="Electron" modified="2024-01-15T22:39:26.389Z" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/22.1.2 Chrome/114.0.5735.289 Electron/25.9.4 Safari/537.36" etag="lhEtyTG7v3GwLPToCexG" version="22.1.2" type="device">
<diagram name="Page-1" id="AxxHWK4P5G7_AUV5sOG4">
<mxGraphModel dx="918" dy="656" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="lmuDNqRA9jmjP6LMzpu7-7" value="" style="rounded=1;whiteSpace=wrap;html=1;dashed=1;arcSize=4;fontStyle=1;fillColor=#f5f5f5;fontColor=#333333;strokeColor=#666666;" parent="1" vertex="1">
<mxGeometry x="240" y="50" width="560" height="290" as="geometry" />
</mxCell>
<mxCell id="B27qckaR17qhnebmrA8z-7" value="" style="rounded=1;whiteSpace=wrap;html=1;dashed=1;arcSize=6;fontStyle=1" vertex="1" parent="1">
<mxGeometry x="520" y="80" width="200" height="240" as="geometry" />
</mxCell>
<mxCell id="lmuDNqRA9jmjP6LMzpu7-14" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.004;entryY=0.208;entryDx=0;entryDy=0;strokeWidth=2;startArrow=classic;startFill=1;fontStyle=1;entryPerimeter=0;" parent="1" source="lmuDNqRA9jmjP6LMzpu7-4" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points" />
<mxPoint x="520.8000000000002" y="129.91999999999996" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="lmuDNqRA9jmjP6LMzpu7-4" value="IPort" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;fontStyle=1;rotation=-90;" parent="1" vertex="1">
<mxGeometry x="450" y="120" width="40" height="20" as="geometry" />
</mxCell>
<mxCell id="lmuDNqRA9jmjP6LMzpu7-10" value="DPort" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;fontStyle=1;rotation=-90;" parent="1" vertex="1">
<mxGeometry x="450" y="220" width="40" height="20" as="geometry" />
</mxCell>
<mxCell id="lmuDNqRA9jmjP6LMzpu7-2" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;fontStyle=1" parent="1" vertex="1">
<mxGeometry x="300" y="100" width="160" height="160" as="geometry" />
</mxCell>
<mxCell id="lmuDNqRA9jmjP6LMzpu7-1" value="Atom CPU&lt;br&gt;(AtomRV)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontStyle=1" parent="1" vertex="1">
<mxGeometry x="320" y="120" width="120" height="100" as="geometry" />
</mxCell>
<mxCell id="lmuDNqRA9jmjP6LMzpu7-3" value="Atom Wishbone Wrapper (AtomRV_wb)" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontStyle=1" parent="1" vertex="1">
<mxGeometry x="305" y="224" width="150" height="30" as="geometry" />
</mxCell>
<mxCell id="lmuDNqRA9jmjP6LMzpu7-12" value="" style="triangle;whiteSpace=wrap;html=1;fontStyle=1" parent="1" vertex="1">
<mxGeometry x="300" y="110" width="10" height="20" as="geometry" />
</mxCell>
<mxCell id="lmuDNqRA9jmjP6LMzpu7-16" value="store()" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;dashed=1;fontStyle=1" parent="1" vertex="1">
<mxGeometry x="530" y="200" width="60" height="20" as="geometry" />
</mxCell>
<mxCell id="lmuDNqRA9jmjP6LMzpu7-21" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;strokeWidth=2;startArrow=classic;startFill=1;fontStyle=1;" parent="1" source="lmuDNqRA9jmjP6LMzpu7-10" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="340" y="290" as="sourcePoint" />
<mxPoint x="520" y="230" as="targetPoint" />
<Array as="points">
<mxPoint x="520" y="230" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="lmuDNqRA9jmjP6LMzpu7-26" value="" style="endArrow=none;html=1;rounded=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontStyle=1" parent="1" target="lmuDNqRA9jmjP6LMzpu7-12" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="290" y="120" as="sourcePoint" />
<mxPoint x="290" y="130" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="lmuDNqRA9jmjP6LMzpu7-30" value="" style="endArrow=none;html=1;rounded=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontStyle=1" parent="1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="290" y="149.85" as="sourcePoint" />
<mxPoint x="300" y="149.85" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="lmuDNqRA9jmjP6LMzpu7-35" value="fetch()" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;dashed=1;fontStyle=1" parent="1" vertex="1">
<mxGeometry x="530" y="140" width="60" height="20" as="geometry" />
</mxCell>
<mxCell id="lmuDNqRA9jmjP6LMzpu7-36" value="tick()" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;dashed=1;fontStyle=1" parent="1" vertex="1">
<mxGeometry x="250" y="110" width="40" height="20" as="geometry" />
</mxCell>
<mxCell id="lmuDNqRA9jmjP6LMzpu7-37" value="reset()" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;dashed=1;fontStyle=1" parent="1" vertex="1">
<mxGeometry x="250" y="140" width="40" height="20" as="geometry" />
</mxCell>
<mxCell id="lmuDNqRA9jmjP6LMzpu7-38" value="&lt;span&gt;AtomBones Backend&lt;/span&gt;" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontStyle=1" parent="1" vertex="1">
<mxGeometry x="660" y="50" width="130" height="30" as="geometry" />
</mxCell>
<mxCell id="lmuDNqRA9jmjP6LMzpu7-41" value="Peripherals simulated in C++" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontStyle=1" parent="1" vertex="1">
<mxGeometry x="535" y="300" width="170" height="20" as="geometry" />
</mxCell>
<mxCell id="B27qckaR17qhnebmrA8z-4" value="Boot ROM" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffe6cc;strokeColor=#d79b00;dashed=1;fontStyle=1" vertex="1" parent="1">
<mxGeometry x="600" y="90" width="80" height="60" as="geometry" />
</mxCell>
<mxCell id="B27qckaR17qhnebmrA8z-5" value="RAM" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffe6cc;strokeColor=#d79b00;dashed=1;fontStyle=1" vertex="1" parent="1">
<mxGeometry x="600" y="160" width="80" height="60" as="geometry" />
</mxCell>
<mxCell id="B27qckaR17qhnebmrA8z-6" value="UART" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;dashed=1;fontStyle=1" vertex="1" parent="1">
<mxGeometry x="600" y="230" width="80" height="60" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>
Binary file added docs/diagrams/AtomBones.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading