aboutsummaryrefslogtreecommitdiffstats
path: root/tests/arch/xilinx/bug1460.ys
diff options
context:
space:
mode:
authorN. Engelhardt <nak@symbioticeda.com>2020-01-03 12:28:48 +0100
committerN. Engelhardt <nak@symbioticeda.com>2020-01-03 12:28:48 +0100
commit341fd872b59e8f95aa14afd9f17225d2c03a4283 (patch)
tree21802e73ca767d124971d43d3f78d9f4cf7d62e2 /tests/arch/xilinx/bug1460.ys
parentc8bc1793a4e8230c29fca4a34862414e8ab8722b (diff)
parentf8d5920a7e61f78873b7bf49dd7e8f3a83f7adf3 (diff)
downloadyosys-341fd872b59e8f95aa14afd9f17225d2c03a4283.tar.gz
yosys-341fd872b59e8f95aa14afd9f17225d2c03a4283.tar.bz2
yosys-341fd872b59e8f95aa14afd9f17225d2c03a4283.zip
Merge branch 'master' of https://github.com/YosysHQ/yosys into abc_scratchpad_script
Diffstat (limited to 'tests/arch/xilinx/bug1460.ys')
-rw-r--r--tests/arch/xilinx/bug1460.ys34
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/arch/xilinx/bug1460.ys b/tests/arch/xilinx/bug1460.ys
new file mode 100644
index 000000000..09935ccd8
--- /dev/null
+++ b/tests/arch/xilinx/bug1460.ys
@@ -0,0 +1,34 @@
+read_verilog <<EOT
+module register_file(
+ input wire clk,
+ input wire write_enable,
+ input wire [63:0] write_data,
+ input wire [4:0] write_reg,
+ input wire [4:0] read1_reg,
+ input wire [4:0] read2_reg,
+ input wire [4:0] read3_reg,
+ output reg [63:0] read1_data,
+ output reg [63:0] read2_data,
+ output reg [63:0] read3_data
+ );
+
+ reg [63:0] registers[0:31];
+
+ always @(posedge clk) begin
+ if (write_enable == 1'b1) begin
+ registers[write_reg] <= write_data;
+ end
+ end
+
+ always @(all) begin
+ read1_data <= registers[read1_reg];
+ read2_data <= registers[read2_reg];
+ read3_data <= registers[read3_reg];
+ end
+endmodule
+EOT
+
+synth_xilinx -noiopad
+cd register_file
+select -assert-count 32 t:RAM32M
+select -assert-none t:* t:BUFG %d t:RAM32M %d