summaryrefslogtreecommitdiff
path: root/rtl/gfx/gfx_fixed_dotadd.sv
diff options
context:
space:
mode:
authorAlejandro Soto <alejandro@34project.org>2024-05-05 17:38:55 -0600
committerAlejandro Soto <alejandro@34project.org>2024-05-05 18:12:08 -0600
commitca02833f22b08ceeeff501107371aa6667426115 (patch)
treef864c5fc238a292082d2096ce546270badce9f1d /rtl/gfx/gfx_fixed_dotadd.sv
parent081a8a3ba8bfe036f31da53f9c041a2caa30fce2 (diff)
rtl/gfx: rename platform/wavelet3d -> rtl/gfx
Diffstat (limited to 'rtl/gfx/gfx_fixed_dotadd.sv')
-rw-r--r--rtl/gfx/gfx_fixed_dotadd.sv55
1 files changed, 55 insertions, 0 deletions
diff --git a/rtl/gfx/gfx_fixed_dotadd.sv b/rtl/gfx/gfx_fixed_dotadd.sv
new file mode 100644
index 0000000..fdd5ffd
--- /dev/null
+++ b/rtl/gfx/gfx_fixed_dotadd.sv
@@ -0,0 +1,55 @@
+module gfx_fixed_dotadd
+(
+ input logic clk,
+
+ input gfx::fixed a0,
+ b0,
+ a1,
+ b1,
+ c,
+ input logic stall,
+
+ output gfx::fixed q
+);
+
+ import gfx::*;
+
+ fixed q0, a1_hold, b1_hold;
+
+ gfx_fixed_muladd muladd_0
+ (
+ .clk,
+ .a(a0),
+ .b(b0),
+ .c,
+ .q(q0),
+ .stall
+ );
+
+ gfx_pipes #(.WIDTH($bits(fixed)), .DEPTH(FIXED_MULADD_DEPTH)) a_pipes
+ (
+ .clk,
+ .in(a1),
+ .out(a1_hold),
+ .stall
+ );
+
+ gfx_pipes #(.WIDTH($bits(fixed)), .DEPTH(FIXED_MULADD_DEPTH)) b_pipes
+ (
+ .clk,
+ .in(b1),
+ .out(b1_hold),
+ .stall
+ );
+
+ gfx_fixed_muladd muladd_1
+ (
+ .clk,
+ .a(a1_hold),
+ .b(b1_hold),
+ .c(q0),
+ .q,
+ .stall
+ );
+
+endmodule