diff --git a/hw/Makefile b/hw/Makefile
index 7828f5d06bb576605ac2761c090b0199e00b8f25..fad99da9a38786d421df6ecf5a43adac2058db17 100644
--- a/hw/Makefile
+++ b/hw/Makefile
@@ -7,7 +7,7 @@ TARGETS = main
 
 all: $(TARGETS)
 
-TESTS = genmask-tb mul3-stage-tb mul4-stage-tb mul6-stage-tb \
+TESTS = mul3-stage-tb mul4-stage-tb mul6-stage-tb \
 	mul-3w64-tb mul-4w64-tb mul-6w64-tb srt-reciprocal-tb reciprocal-tb \
 	reg-file-tb reg-file-ice40-tb shift-unit-tb alu-unit-tb
 
diff --git a/hw/arith/Makefile b/hw/arith/Makefile
index d989b0dbfc2ecc302e0c21a7b882d5801bea4f85..8eb2660eb241663ef826466dd229cf7b043a8719 100644
--- a/hw/arith/Makefile
+++ b/hw/arith/Makefile
@@ -7,7 +7,7 @@ TARGETS = dadda-tree
 
 TESTS = add_ha-test add_fa-test add_bk4-test add_bk8-test add_bk8s-test \
 	add_h64-test add_bk16-test carry_only-test \
-	umul4-test umul8-test ctz-test popc-test
+	umul4-test umul8-test ctz-test popc-test genmask-test
 
 all: $(TARGETS)
 
diff --git a/hw/genmask-tb.vl b/hw/arith/genmask-test.v
similarity index 98%
rename from hw/genmask-tb.vl
rename to hw/arith/genmask-test.v
index fbbe59643c86c983d06b6f11d06def6f5f460b88..f57fe3981f40fb941db6792111e09ff839ea7762 100644
--- a/hw/genmask-tb.vl
+++ b/hw/arith/genmask-test.v
@@ -14,8 +14,6 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-`include "genmask.vl"
-
 module main;
    reg [5:0] cnt;
    wire [62:0] out;
diff --git a/hw/genmask.vl b/hw/arith/lib/genmask.v
similarity index 100%
rename from hw/genmask.vl
rename to hw/arith/lib/genmask.v