diff options
author | diego <diego@symbioticeda.com> | 2020-04-16 13:31:05 -0500 |
---|---|---|
committer | diego <diego@symbioticeda.com> | 2020-04-16 13:31:05 -0500 |
commit | 87910732f15c900cbd752158258a8af12720d277 (patch) | |
tree | b4e9eec2b14a1f93315e9869b5413c2832eacd6c /tests/arch/common/dynamic_part_select/reversed.v | |
parent | e86ba3b94d7285ded20b4280ad52821cbca504fc (diff) | |
download | yosys-87910732f15c900cbd752158258a8af12720d277.tar.gz yosys-87910732f15c900cbd752158258a8af12720d277.tar.bz2 yosys-87910732f15c900cbd752158258a8af12720d277.zip |
Adding tests for dynamic part select optimisation
Diffstat (limited to 'tests/arch/common/dynamic_part_select/reversed.v')
-rw-r--r-- | tests/arch/common/dynamic_part_select/reversed.v | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/arch/common/dynamic_part_select/reversed.v b/tests/arch/common/dynamic_part_select/reversed.v new file mode 100644 index 000000000..6ef0e10be --- /dev/null +++ b/tests/arch/common/dynamic_part_select/reversed.v @@ -0,0 +1,13 @@ +module reversed #(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[(1024-ctrl*sel)-:SLICE] <= din; + end +endmodule + |