[benchmark] add a new benchmark to enhance the tests for wire-lut features in repacker

This commit is contained in:
tangxifan 2022-09-29 14:23:17 -07:00
parent f7a02422b5
commit df1ae7ba2a
2 changed files with 41 additions and 0 deletions

View File

@ -0,0 +1,18 @@
# Use a FF with constant input to connect a clock signal (frequency divided by 2) from a global network to datapath
# Use an external signal to enable the clock signal
.model clk_gate
.inputs clk_i data_i
.outputs data_o
.names $true
1
.names $true ff_i
1 1
.names ff_o data_i data_o
11 1
.latch ff_i ff_o re clk_o 0
.end

View File

@ -0,0 +1,23 @@
/////////////////////////////////////////
// Functionality: Use clock to gate the output of an AND2 gate
// This is to test if LUTs can be mapped as wires
// Author: Xifan Tang
////////////////////////////////////////
`timescale 1ns / 1ps
module clk_gate(
clk_i,
data_i,
data_o);
input wire clk_i;
input wire data_i;
output wire data_o;
reg q;
always @(posedge clk_i) begin
q <= 1;
end
assign data_o = data_i & q;
endmodule