aboutsummaryrefslogtreecommitdiffhomepage
path: root/problems
diff options
context:
space:
mode:
Diffstat (limited to 'problems')
-rw-r--r--problems/09-Transpose/01.vsm8
-rw-r--r--problems/09-Transpose/02.vsm56
2 files changed, 56 insertions, 8 deletions
diff --git a/problems/09-Transpose/01.vsm b/problems/09-Transpose/01.vsm
index 223cf2a..3c2e27d 100644
--- a/problems/09-Transpose/01.vsm
+++ b/problems/09-Transpose/01.vsm
@@ -1,29 +1,21 @@
# (64 / 8).times do |i|
# puts "lpassa $lm#{(2*i) * 8}v $ln#{2*i}v16"
# puts "lpassa $lm#{(2*i+1) * 8}v $ln#{2*i + 64}v16"
-# puts
# end
lpassa $lm0v $ln0v16
lpassa $lm8v $ln64v16
-
lpassa $lm16v $ln2v16
lpassa $lm24v $ln66v16
-
lpassa $lm32v $ln4v16
lpassa $lm40v $ln68v16
-
lpassa $lm48v $ln6v16
lpassa $lm56v $ln70v16
-
lpassa $lm64v $ln8v16
lpassa $lm72v $ln72v16
-
lpassa $lm80v $ln10v16
lpassa $lm88v $ln74v16
-
lpassa $lm96v $ln12v16
lpassa $lm104v $ln76v16
-
lpassa $lm112v $ln14v16
lpassa $lm120v $ln78v16
diff --git a/problems/09-Transpose/02.vsm b/problems/09-Transpose/02.vsm
new file mode 100644
index 0000000..cafa0b8
--- /dev/null
+++ b/problems/09-Transpose/02.vsm
@@ -0,0 +1,56 @@
+imm i"3" $s3/1000
+imm i"7" $s5/1000
+imm i"4" $s7/1000
+imm i"2" $s9/1000
+llsr $peid $ls2 $lr0/1000 # i
+land $peid $ls4 $lr2/1000 # j
+llsr $aluf $ls8 $lr4/1000 # j1
+land $lr2 $ls2 $lr6/1000 # j2
+lpackbit $aluf $ln0 $nowrite
+ladd $aluf $lr4 $nowrite
+llsl $aluf $ls2 $nowrite
+ladd $aluf $lr0 $nowrite
+lpackbit $aluf $ln0 $t
+nop
+l1bmd $lmt0 $lb0
+nop
+nop
+l1bmp $llb0 $lln0v
+l1bmp $llb8 $lln16v
+l1bmp $llb16 $lln32v
+l1bmp $llb24 $lln48v
+l1bmp $llb32 $lln64v
+l1bmp $llb40 $lln80v
+l1bmp $llb48 $lln96v
+l1bmp $llb56 $lln112v
+
+16.times do |mabid|
+ 4.times do |subpeid|
+ peid = mabid*4 + subpeid
+ i = peid >> 3 # $lr[0]
+ j = peid & 0b111 # $lr[2]
+ j1 = j >> 2 # $lr[4]
+ j2 = j & 0b11 # $lr[6]
+ lm = (((j1 + (j2 << 1)) << 3) + i) << 1
+ puts "MAB #{mabid} PE #{subpeid} (#{peid}): $lm[#{lm}]"
+ end
+end
+
+
+dvpassa ; t ; x1
+dvpassa ; nop ; x1
+dvpassa ; l1bmd ; x1
+dvpassa ; nop ; x1
+ ; nop ; x2 !!!
+l1bmp ... ... ; x2
+l1bmp ... ... ; x2
+l1bmp ... ... ; x2
+l1bmp ... ... ; x2
+l1bmp ... ... ; x2
+
+
+
+lpassa $llm0v $llr0v ; dvpassa $llm0v $ln[TODO]
+lpassa $llm16v $llr16v ; dvpassa $llm16v $ln[TODO]
+dvpassa $lm[TODO] $ln[TODO]
+dvpassa $lm[TODO] $ln[TODO]