From 2838cad2e5e88a68c3bf173cf827bc9c72bfcb8d Mon Sep 17 00:00:00 2001 From: John McMaster Date: Wed, 10 Oct 2018 14:47:26 -0700 Subject: [PATCH] bram minitest: show data coverage clearly Signed-off-by: John McMaster --- minitests/bram_basic/top.v | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/minitests/bram_basic/top.v b/minitests/bram_basic/top.v index df84a4af..c346f647 100644 --- a/minitests/bram_basic/top.v +++ b/minitests/bram_basic/top.v @@ -5,6 +5,10 @@ ROM32X1: 32-Deep by 1-Wide ROM ROM64X1: 64-Deep by 1-Wide ROM */ +`ifndef ROI +`define ROI +`endif + module top(input clk, stb, di, output do); localparam integer DIN_N = 256; localparam integer DOUT_N = 256; @@ -26,10 +30,16 @@ module top(input clk, stb, di, output do); assign do = dout_shr[DOUT_N-1]; + //`ROI + //sweep through these three values to see small config vs data changes //roi_bram0 //roi_bram1 - roi_bram_inv + //roi_bram_inv + + //sweep through to see all data bits toggle to get idea of size + //roi_bram36_0s + roi_bram36_1s roi ( .clk(clk), .din(din), @@ -64,12 +74,7 @@ module roi_bram1(input clk, input [255:0] din, output [255:0] dout); r0(.clk(clk), .din(din[ 0 +: 8]), .dout(dout[ 0 +: 8])); endmodule -//too much churn to be useful to compare vs above -module roi_bram36(input clk, input [255:0] din, output [255:0] dout); - ram_RAMB36E1 #(.LOC("RAMB36_X0Y20"), .INIT0(1'b0), .INIT({256{1'b0}})) - r0(.clk(clk), .din(din[ 0 +: 8]), .dout(dout[ 0 +: 8])); -endmodule - +//ram_RAMB36E1 too much churn to be useful to compare vs above //instead lets change something more subtle // ERROR: [DRC REQP-1931] RAMB18E1_WEA_NO_CONNECT_OR_TIED_GND: roi/r0/ram programming // per UG473 requires that for SDP mode the WEA bus must be unconnected or tied to GND. @@ -83,6 +88,16 @@ module roi_bram_inv(input clk, input [255:0] din, output [255:0] dout); r0(.clk(clk), .din(din[ 0 +: 8]), .dout(dout[ 0 +: 8])); endmodule +module roi_bram36_0s(input clk, input [255:0] din, output [255:0] dout); + ram_RAMB36E1 #(.LOC("RAMB36_X0Y20"), .INIT0({256{1'b0}}), .INIT({256{1'b0}})) + r0(.clk(clk), .din(din[ 0 +: 8]), .dout(dout[ 0 +: 8])); +endmodule + +module roi_bram36_1s(input clk, input [255:0] din, output [255:0] dout); + ram_RAMB36E1 #(.LOC("RAMB36_X0Y20"), .INIT0({256{1'b1}}), .INIT({256{1'b1}})) + r0(.clk(clk), .din(din[ 0 +: 8]), .dout(dout[ 0 +: 8])); +endmodule + /* One BRAM per tile */