Skip to content

Commit

Permalink
Improve xvshuf4i_d figure
Browse files Browse the repository at this point in the history
  • Loading branch information
jiegec committed Jul 17, 2024
1 parent a02fc82 commit 4fe483c
Show file tree
Hide file tree
Showing 9 changed files with 1,130 additions and 1,089 deletions.
48 changes: 30 additions & 18 deletions docs/diagram/gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
def init(f, rows, cols):
global col_space
if vlen == 256:
col_space = 570
col_space = 575
else:
col_space = 300
print(
Expand Down Expand Up @@ -179,7 +179,7 @@ def xvshuf4i_d():
elen = 64
vlen = 256
with open("xvshuf4i_d.svg", "w") as f:
init(f, 2, 2)
init(f, 3, 2)
add_row(f)
add_box(
f,
Expand All @@ -194,25 +194,37 @@ def xvshuf4i_d():
indices=[1, 0, 1, 0],
)
add_row(f)
add_box(
f,
"hi",
"merged",
indices=[3, 2, 1, 0],
)
add_box(
f,
"lo",
"merged",
indices=[3, 2, 1, 0],
)
add_row(f)
add_box(f, "ret", "returns")

# a & b to returns
add_line(f, 1, 0, 2, 2, 0, 3)
add_line(f, 1, 0, 3, 2, 0, 3)
add_line(f, 1, 1, 2, 2, 0, 3)
add_line(f, 1, 1, 3, 2, 0, 3)
add_line(f, 1, 0, 2, 2, 0, 2)
add_line(f, 1, 0, 3, 2, 0, 2)
add_line(f, 1, 1, 2, 2, 0, 2)
add_line(f, 1, 1, 3, 2, 0, 2)
add_line(f, 1, 0, 0, 2, 0, 1)
add_line(f, 1, 0, 1, 2, 0, 1)
add_line(f, 1, 1, 0, 2, 0, 1)
add_line(f, 1, 1, 1, 2, 0, 1)
# a & b to merged
add_line(f, 1, 0, 0, 2, 0, 0)
add_line(f, 1, 0, 1, 2, 0, 0)
add_line(f, 1, 1, 0, 2, 0, 0)
add_line(f, 1, 1, 1, 2, 0, 0)
add_line(f, 1, 0, 1, 2, 0, 1)
add_line(f, 1, 0, 2, 2, 1, 0)
add_line(f, 1, 0, 3, 2, 1, 1)
add_line(f, 1, 1, 0, 2, 0, 2)
add_line(f, 1, 1, 1, 2, 0, 3)
add_line(f, 1, 1, 2, 2, 1, 2)
add_line(f, 1, 1, 3, 2, 1, 3)

# merged to returns
for i in range(4):
add_line(f, 2, 0, i, 3, 0, 0)
add_line(f, 2, 0, i, 3, 0, 1)
add_line(f, 2, 1, i, 3, 0, 2)
add_line(f, 2, 1, i, 3, 0, 3)
end(f)


Expand Down
2 changes: 1 addition & 1 deletion docs/diagram/xvshuf4i_b.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
89 changes: 59 additions & 30 deletions docs/diagram/xvshuf4i_d.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/diagram/xvshuf4i_h.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/diagram/xvshuf4i_w.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 4fe483c

Please sign in to comment.