code wiki / _hdl_build / nx_simd_isa.nx
nx_simd_isa.nx
buildroot/runtime/_hdl_build/nx_simd_isa.nx
about
nx_simd_isa.nx -- a sovereign VECTOR ISA + SIMD emulator, so vectorized kernels
run as real vector MACHINE CODE and are proven by EXECUTION (the way we proved the
scalar RV64/ARM/x86 emit). Bits-up: Nishi has its own vector extension; the AVX2 /
NEON / RVV emit is then a DEPLOY-TIME lowering of this ISA to whatever vector unit
the spore/seed lands on (vertical co-design at the deploy boundary). 8 vector
registers x SV_W lanes (i64). Instruction = 2 words: [op|vd|va|vb, imm].
Ops: VLOAD vd,[imm] VSTORE [imm],va VADD/VMUL/VSUB vd,va,vb. One vector op does
SV_W lanes -- the throughput the uops.info/nanoBench cost model prices.
dependencies 1 imports · 1 importers
imports: nx_syscalls.nx
imported by: nx_simd_isa_test.nx
structs
| none |
consts
| 13 | const SV_W: i64 = 8 |
| 15 | const SVOP_HALT: i64 = 0 |
| 16 | const SVOP_VLOAD: i64 = 1 |
| 17 | const SVOP_VSTORE: i64 = 2 |
| 18 | const SVOP_VADD: i64 = 3 |
| 19 | const SVOP_VMUL: i64 = 4 |
| 20 | const SVOP_VSUB: i64 = 5 |
functions
| 23 | func sv_emit(prog: *i64, idx: i64, op: i64, vd: i64, va: i64, vb: i64, imm: i64) -> i64 called by 1: main |
| 32 | func sv_run(prog: *i64, ninstr: i64, vregs: *i64, mem: *i64) -> i64 called by 1: main |