aboutsummaryrefslogtreecommitdiffstats
path: root/tests/various/dynamic_part_select/nonblocking.v
diff options
context:
space:
mode:
authordiego <diego@symbioticeda.com>2020-04-20 12:45:35 -0500
committerdiego <diego@symbioticeda.com>2020-04-20 12:45:35 -0500
commit22f440506b2b58edc27354d9ac8d474bb6185e63 (patch)
tree2b8b0b389f4935ae4741bf96ac33f46d9d7e1c1b /tests/various/dynamic_part_select/nonblocking.v
parent50581d5a94730b33e2ca1b7f7371f502ef9263c6 (diff)
downloadyosys-22f440506b2b58edc27354d9ac8d474bb6185e63.tar.gz
yosys-22f440506b2b58edc27354d9ac8d474bb6185e63.tar.bz2
yosys-22f440506b2b58edc27354d9ac8d474bb6185e63.zip
Modifications of tests as per Eddie's request
Diffstat (limited to 'tests/various/dynamic_part_select/nonblocking.v')
-rw-r--r--tests/various/dynamic_part_select/nonblocking.v14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/various/dynamic_part_select/nonblocking.v b/tests/various/dynamic_part_select/nonblocking.v
new file mode 100644
index 000000000..0949b31a9
--- /dev/null
+++ b/tests/various/dynamic_part_select/nonblocking.v
@@ -0,0 +1,14 @@
+module nonblocking #(parameter WIDTH=32, SELW=1, CTRLW=$clog2(WIDTH), DINW=2**SELW)
+ (input clk,
+ input [CTRLW-1:0] ctrl,
+ input [DINW-1: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