The YANC manual

YANC compiles programs written in C± or C++ into a SAPHO processor: the Verilog of a processor built for that program, its memories and a testbench. This manual covers installing YANC, the two languages, running the tools, simulating the result and putting several processors together.

It describes the YANC it comes with (yanc -V prints the version). The SAPHO manual (https://nipscern.com/library/sapho) covers the processor and the AURORA IDE.

Getting started

  • Installing YANC: the release package, the simulators and GTKWave.

  • A first program: from an empty folder to a simulated processor, in C± and in C++.

  • The command line: yanc and the tools under it, the output folder, the options, --lang.

Writing programs

  • The C± language: types (int, float, comp), arrays, functions, operators, control flow, input and output, the traps.

  • The C++ YANC accepts: what works, the #pragma yanc settings, what does not exist.

  • Directives: #NUBITS, #NBMANT, #NBEXPO and the rest, with their defaults and their C++ pragmas.

  • The library: sqrt, sin, exp, … and what each one costs.

  • Floating point: the SAPHO float format (not IEEE 754) and the rounding levels of #FROUND.

Several processors

  • Several processors: the processor’s pins, toma and cade over links, FIFOs, interrupts.

Peripherals

  • Peripherals: blocks beside the processor, wired in your top level: the FIFOs myFIFO and myDCFIFO, the PS/2 keyboard myKeyPS2, the VGA text screen myVGAText.

Simulating

Reference

  • Message reference: every message the tools print, generated from their sources (the regress fails when it falls behind).

  • Instructions: the SAPHO instruction set, generated from Compilers/common/isa.tsv (the regress fails when the page falls behind the table).

Developing YANC

  • Building and testing YANC: the repository, building the tools, the regression, deploying to AURORA.

  • Design notes: why each feature is built the way it is, what was measured, what is open.