aboutsummaryrefslogtreecommitdiffstats
path: root/tests/various/dynamic_part_select/forloop_select.v
diff options
context:
space:
mode:
authorClaire Xen <claire@symbioticeda.com>2020-11-25 09:44:23 +0100
committerGitHub <noreply@github.com>2020-11-25 09:44:23 +0100
commitcf67e6a3977410e039d62a1e9f6c49c42cb97b08 (patch)
tree66475213fd27ac129f8a03eabf6131aae69730ba /tests/various/dynamic_part_select/forloop_select.v
parentc6b5b18a30278637dcea4f9867631540b818716c (diff)
parentd68a8f9e2b20d9c4120a69e1a632a2d86250be86 (diff)
downloadyosys-cf67e6a3977410e039d62a1e9f6c49c42cb97b08.tar.gz
yosys-cf67e6a3977410e039d62a1e9f6c49c42cb97b08.tar.bz2
yosys-cf67e6a3977410e039d62a1e9f6c49c42cb97b08.zip
Merge pull request #2133 from dh73/nodev_head
Adding latch tests for shift&mask AST dynamic part-select enhancements
Diffstat (limited to 'tests/various/dynamic_part_select/forloop_select.v')
-rw-r--r--tests/various/dynamic_part_select/forloop_select.v16
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/various/dynamic_part_select/forloop_select.v b/tests/various/dynamic_part_select/forloop_select.v
index 8260f3186..926fb3133 100644
--- a/tests/various/dynamic_part_select/forloop_select.v
+++ b/tests/various/dynamic_part_select/forloop_select.v
@@ -1,13 +1,14 @@
+`default_nettype none
module forloop_select #(parameter WIDTH=16, SELW=4, CTRLW=$clog2(WIDTH), DINW=2**SELW)
- (input clk,
- input [CTRLW-1:0] ctrl,
- input [DINW-1:0] din,
- input en,
+ (input wire clk,
+ input wire [CTRLW-1:0] ctrl,
+ input wire [DINW-1:0] din,
+ input wire en,
output reg [WIDTH-1:0] dout);
-
- reg [SELW:0] sel;
+
+ reg [SELW:0] sel;
localparam SLICE = WIDTH/(SELW**2);
-
+
always @(posedge clk)
begin
if (en) begin
@@ -16,4 +17,3 @@ module forloop_select #(parameter WIDTH=16, SELW=4, CTRLW=$clog2(WIDTH), DINW=2*
end
end
endmodule
-