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