(no commit message)
[libreriscv.git] / simple_v_extension / vector_ops.mdwn
index eb868d91cea671bb6519725cf73c0056efed3b32..5294cbdb5012e5dfde9f2c84ae89f871553beb50 100644 (file)
@@ -1,4 +1,6 @@
-[[!tag standards]]
+[[!tag oldstandards]]
+
+**OBSOLETE**, see [[openpower/sv/3d_vector_ops]]
 
 # Vector Operations Extension to SV
 
@@ -25,11 +27,16 @@ Examples which can require SUBVL include cross product and may in future involve
 * CORDIC.cir.vec vd, vs, beta
 * CORDIC.hyp.vec vd, vs, beta
 
+
+| Instr | result | src1 | src2 | SUBVL | VL | Notes |
+| ------------------ | ------ | ---- | ---- | ----- | -- | ------ |
+| CORDIC.x.t vd, vs1, rs2 | vec2 | vec2 | scal | 2 | any | src2 ignores SUBVL |
+
 SUBVL must be set to 2 and applies to vd and vs. SUBVL is *ignored* on beta.  vd and vs must be marked as vectors.
 
 VL may be applied.  beta as a scalar is ok (applies across all vectors vd and vs). Predication is also ok (single predication) sourced from vd. Use of swizzle is also ok.
 
-Non vector args vd, vs, or SUBVL != 2 are reserved encodings.
+Non vector args vd, vs are reserved encodings.
 
 CORDIC is an extremely general-purpose algorithm useful for a huge number
 of diverse purposes.  In its full form it does however require quite a
@@ -58,6 +65,10 @@ Result is the cross product of x and y.
 
 SUBVL must be set to 3, and all regs must be vectors. VL nonzero produces multiple results in vd.
 
+| Instr | result | src1 | src2 | SUBVL | VL |
+| ------------------ | ------ | ---- | ---- | ----- | -- |
+| VCROSS vd, vs1, vs2 | vec3 | vec3 | vec3 | 3 | any |
+
 The resulting components are, in order:
 
     x[1] * y[2] - y[1] * x[2]
@@ -88,7 +99,6 @@ Assembler:
 
 ## Vector dot product
 
-
 * VDOT rd, vs1, vs2
 
 Computes the dot product of two vectors. Internal accuracy must be
@@ -99,6 +109,12 @@ There are two possible argument options:
 * SUBVL=2,3,4 vs1 and vs2 set as vectors,  multiple results are generated. When VL is set, only the first (unpredicated) SUBVector is used to create a result, if rd is scalar (standard behaviour for single predication). Otherwise, if rd is a vector, multiple scalar results are calculated (i.e. SUBVL is always ignored for rd). Swizzling may be applied.
 * When rd=scalar, SUBVL=1 and vs1=vec, vs2=vec, one scalar result is generated from the entire src vectors.  Predication is allowed on the src vectors.
 
+
+| Instr | result | src1 | src2 | SUBVL | VL |
+| ------------------ | ------ | ---- | ---- | ----- | -- |
+| VDOT rd, vs1, vs2 | scal | vec  | vec | 2-4 | any |
+| VDOT rd, vs1, vs2 | scal | vec  | vec | 1 | any |
+
 Pseudocode in python:
 
     from operator import mul