From 3e454e617c67184af75cb7e8fd6b22fa869703c1 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Sat, 23 May 2020 18:00:23 +0200 Subject: testsuite/synth: add a test for #1318 --- testsuite/synth/issue1318/ram1.v | 10 +++++++++ testsuite/synth/issue1318/ram2.v | 15 +++++++++++++ testsuite/synth/issue1318/ram_blk.vhdl | 41 ++++++++++++++++++++++++++++++++++ testsuite/synth/issue1318/testsuite.sh | 11 +++++++++ 4 files changed, 77 insertions(+) create mode 100644 testsuite/synth/issue1318/ram1.v create mode 100644 testsuite/synth/issue1318/ram2.v create mode 100644 testsuite/synth/issue1318/ram_blk.vhdl create mode 100755 testsuite/synth/issue1318/testsuite.sh diff --git a/testsuite/synth/issue1318/ram1.v b/testsuite/synth/issue1318/ram1.v new file mode 100644 index 000000000..a5939c0e2 --- /dev/null +++ b/testsuite/synth/issue1318/ram1.v @@ -0,0 +1,10 @@ +(* RAM_STYLE="BLOCK" *) +reg [7:0] lineMem [0:31]; + +reg [15:0] column_data = 0; +reg [ADDR_BITS - 1:0] line_mem_read_address = 0; + +always @(posedge clk) begin + column_data[7:0] <= lineMem[line_mem_read_address]; + column_data[15:8] <= data_in; +end diff --git a/testsuite/synth/issue1318/ram2.v b/testsuite/synth/issue1318/ram2.v new file mode 100644 index 000000000..c8f99f80a --- /dev/null +++ b/testsuite/synth/issue1318/ram2.v @@ -0,0 +1,15 @@ +`default_nettype none +module memory #(parameter W=8, D=64) + (input wire clk, wr_en, + input wire [W-1:0] wr_addr, rd_addr, + input wire [D-1:0] din, + output reg [D-1:0] dout); + + (*ram_style = "block"*) + reg [D-1:0] mem [(1<