From 2bd8ef2af92c21190abe5774b78d37c446a6f3a2 Mon Sep 17 00:00:00 2001 From: tangxifan Date: Sat, 20 Mar 2021 21:00:53 -0600 Subject: [PATCH] [Benchmark] Patch boundtop.v with missing SPRAM module --- .../benchmarks/vtr_benchmark/boundtop.v | 28 ++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/openfpga_flow/benchmarks/vtr_benchmark/boundtop.v b/openfpga_flow/benchmarks/vtr_benchmark/boundtop.v index a749b99d0..0a2dd03ce 100755 --- a/openfpga_flow/benchmarks/vtr_benchmark/boundtop.v +++ b/openfpga_flow/benchmarks/vtr_benchmark/boundtop.v @@ -1656,7 +1656,33 @@ single_port_ram new_ram( endmodule - +//--------------------------------------- +// A single-port 1024x32bit RAM +// This module is tuned for VTR's benchmarks +//--------------------------------------- +module single_port_ram ( + input clk, + input we, + input [9:0] addr, + input [31:0] data, + output [31:0] out ); + + reg [31:0] ram[1023:0]; + reg [31:0] internal; + + assign out = internal; + + always @(posedge clk) begin + if(wen) begin + ram[addr] <= data; + end + + if(ren) begin + internal <= ram[addr]; + end + end + +endmodule