aboutsummaryrefslogtreecommitdiffstats
path: root/tests/arch/common/dynamic_part_select/multiple_blocking.v
diff options
context:
space:
mode:
Diffstat (limited to 'tests/arch/common/dynamic_part_select/multiple_blocking.v')
-rw-r--r--tests/arch/common/dynamic_part_select/multiple_blocking.v19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/arch/common/dynamic_part_select/multiple_blocking.v b/tests/arch/common/dynamic_part_select/multiple_blocking.v
new file mode 100644
index 000000000..7861722d4
--- /dev/null
+++ b/tests/arch/common/dynamic_part_select/multiple_blocking.v
@@ -0,0 +1,19 @@
+module multiple_blocking #(parameter WIDTH=256, SELW=2)
+ (input clk ,
+ input [9:0] ctrl ,
+ input [15:0] din ,
+ input [SELW-1:0] sel ,
+ output reg [WIDTH:0] dout);
+
+ localparam SLICE = WIDTH/(SELW**2);
+ reg [9:0] a;
+ reg [SELW-1:0] b;
+ reg [15:0] c;
+ always @(posedge clk) begin
+ a = ctrl + 1;
+ b = sel - 1;
+ c = ~din;
+ dout = dout + 1;
+ dout[a*b+:SLICE] = c;
+ end
+endmodule