[benchmark] add a new benchmark to enhance the tests for wire-lut features in repacker
This commit is contained in:
parent
f7a02422b5
commit
df1ae7ba2a
|
@ -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
|
|
@ -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
|
Loading…
Reference in New Issue