Org Wiki
Main Programming Platforms Projects Emacs Russian Quotes Old Lisa wiki
Table of Contents
1 VideoCore
1.1 Notes
- DSL - Domain-Specific Language
- TFU - Texture Formatting Unit (v3d)
Useful command for examining device tree:
> dtc -I fs /sys/firmware/devicetree/base | less
Search for e.g. `v3d`
1.2 Links
- Datasheet BCM2711 - Pi4
- Real-Time Linux on the Raspberry Pi
- Falling Sand simulation - cellular automaton
- Goertzel
- man vcgencmd
- XMRig - github, Pi project using it
- Circle - C++ DSL for OpenGL shaders (competition, in a sense)
- Revision codes - specifically, meaning of sub-fields
- USB-C cabling colors
- repo `raspberrypi/linux'
- movies from PGM files
1.2.1 Crypto
- How to Mine for Cryptocurrency on Raspberry Pi
- Ethereum Algorithm Explained - Warning: this may be old shit soon due to next point
- Ethereum 2.0 Proof of Stake - C++ Client
- MinerGate
- cpuminer - Litecoin and Bitcoin; scrypt and SHA256 (not ethereum)
1.2.2 FFT
- Blog FFT - Has run times in microsecs for comparison
- GPU_FFT - technical details of previous
- C++ implementation FFT - with bit reversal
- Stockham FFT
- Basic implementation of Cooley-Tukey FFT algorithm in C++
1.3 Rpi power usage
- How much power does the Pi4B use? Power Measurements
- How much energy does the Raspberry Pi consume in a day?
- raspberry-power-supply-check.sh - Check your Raspberry pi power supply and USB cable
1.4 config.txt
Other notes:
- Pi4 OS should use at least Mesa 19.1. This version didn't make it into Buster.
- reference
- Blog with GPU settings
- Location:
/boot/config.txt
Apparently, Ubuntu 64-bits:/boot/firmware/usercfg.txt
Pi4 (silke) settings:
# Enable DRM VC4 V3D driver on top of the dispmanx display stack dtoverlay=vc4-fkms-v3d max_framebuffers=2 arm_64bit=1
fkms
- FAKE KMS- fake better supported than full
- fake: dispman X API remains available (not with full KMS)
- GPU mem set in
raspi-config
: 64MB dtoverlay
valuesvc4-fkms-v3d
- appears to be standard for PI4vc4-kms-v3d
vc4-kms-v3d-pi4
1.5 Idea(s) for usage
- UTF8 validation on QPU's - Blog
1.5.1 Crypto
- post
- 5 Easiest Cryptocurrencies to Mine
- Monero, app
cpuminer-multi
1.6 Reference
See V3DLib
for other links, most have been transferred to there
1.6.1 vc4
- VideoCore® IV 3D Architecture Reference Guide - not same link as in
README.md
- py-videocore
- vc4 driver in kernel repo
- VC4 graphics driver description
- mesa vc4 driver
- Mailbox property interface - doesn't describe
qpu_enable
- Peripheral addresses -
bcm_host_
-calls - Ref guide Errata
- github qpuinfo
- github libvc4regmap
- GPU FFT
- Blog John Otander - worked on mesa v3d, blog now defunct
1.6.2 v3d
- Forum 'Pi 4 - full specification of VideoCore 6'
- BCM7268 V3D3.3 ("vc5") driver release
- Addition of MMU - The addition of the MMU to the QPU eliminates the need for physically contiguous addresses in the memory I/O area, and also enables detection and blocking of illegal memory reads and writes.
- There is no more register A/B file, so basic 32-bit value register allocation is simple
- half-precision floating point operations - you can do twice as many add/sub/mul/min/maxes per cycle if you can pack them in the same register
- List of V3D registers (link not found TODO search new link) - contains registers not in the ref doc: Source
1.6.2.1 readl/writel
readl/writel are typically used for reading from memory mapped registers, which can cause hangs if accessed unclocked.
1.6.3 Other
- PBM graphics format - pgm ppm etc
- animate tool - for perhaps showing mandelbrot (etc.) animations
2 CmdParameter
2.1 Competitors
- Skipped all that is on the `getopt()` level.
- In all cases, no action handling.
- However, all of these are much smaller dan own, usually one header file.
- Usual setup is a parser, then dynamic setting of help and validation
- most do long/short options
- parg - printf's in a switch for help
- flags - per-option read-in; uses istream to process. No real help
- argh - parses command line, then processes. Dynamic calls for adding validation and help
- optionparser - does have usage-struct, POSIX conventions
- cmdline - parse, dynamic adding of functionality
- linkom - C-style, extensive parsing of syntax (i.e. order), '/A' style options
- ProgramOptions - C+11, 'flow-style' syntax, dynamic
2.2 Blurb
Extra's
- Declarative: Centralized definition of the options
- Validation of any parameters passed in
- Add as much text as is necessary - can be big
- Extensibility of data types
- Support for actions on command line, like `aws`
Also:
- Column alignment (no line wrapping)
Missing:
- POSIX - long/short options etc, investigate
3 OMeta
3.1 Reference
- OMeta home
- RFC JSON
- Blog Tratt - claim that there is an error on ometa
- Website Warth - OMeta + workspace
3.2 Links
- parser attacks for denial of service - perhaps of interest for
ometa
3.3 TODO consider parsing all examples at OMeta/JS 2.0 Workspace
3.4 Gezira/Nile - from Alan Kay's talk
Source: Is it really "Complex"? Or did we just make it "Complicated"? - Alan Kay
Source2: How Complex is "Personal Computing"? - Combined talk Dan Amelang, Alex Warth, Nil/OMeta
- Source2: 0:53:00 review 'foreign rule invocation' - try parsing first as OMeta grammar; if that doesn't work, try js.
"Hardware is just software crystallized early" - Alan Kay, Source, 1:37:35
- Hardware should follow the software; we got it all reversed now.
- Maru - Language used for Nile
- Dan Amelang's github - of interest: Nile, Gezira
- Gezira Demo Video
- Naming and Synchronization in a Decentralized Computer System - David P. Reed
- Implementing Atomic Actions on Decentralized Data - Follow up paper
Of further interest:
- Pseudo time (0:51:25)
- Semaphore is bad idea that won out
- better: pseudo time
- Bret Victor (0:55:0) Visualizer for Nile
3.5 Nile:
"Nile is a dataflow language"
From Dan's talk:
- Everything is a data stream processed by kernels
- Kernel syntax optimized for expressing arithmetic, vector computations
- Various compile targets - other languages, hardware targets (maybe, haven't done that yet)
Dan Amelang, from end of Source.
Adjusts itself to the hardware:
- automatically parallellize high level programs
- automatic SIMD generation
- spread among cores of desktop
- spread among computers
Additional:
- CAP Theorem - 'You can't have it all'
- A plain english introduction to CAP Theorem
4 vis.js
4.1 Links
- gihub emoji's
- graph3d on stackoverflow
- vis.js Lobby
- jsdoc
- Annotating JavaScript for the Closure Compiler - strict typechecking for javascript using jsdoc tags
- nmp stats on vis.js - default shows past year from current date
4.2 Consider
4.2.1 Examples for Graph3D
- plot.ly - 3D Surface plot
- Steepest-Ascent Hill-Climbing - interesting 3D graphs here
4.2.2 Device pixel ratio alternative
window.devicePixelRatio = window.devicePixelRatio || window.screen.deviceXDPI /
4.3 Rheingold and Tilford layout
For hierarchical graphs.
See slideshow document CS448B-20111110-GraphsAndTrees.pdf
for step-by-step explanation.
5 Other
- Mollie Payments - iDeal for WordPress