Files
OllaInterface/sim/stimulus_gen_tb.sv

66 lines
1.2 KiB
Systemverilog

`timescale 1ns / 1ps
//////////////////////////////////////////////////////////////////////////////////
// Company:
// Engineer:
//
// Create Date: 02/16/2026 05:49:17 PM
// Design Name:
// Module Name: stimulus_gen_tb
// Project Name:
// Target Devices:
// Tool Versions:
// Description:
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
//////////////////////////////////////////////////////////////////////////////////
`define CLK_HALF_PERIOD 2
module stimulus_gen_tb(
);
logic CLK;
logic RST;
logic ACK;
logic REQ;
logic [4:0] ADDR;
wire END_SIG;
initial begin
CLK = 1'b0;
forever #(`CLK_HALF_PERIOD) CLK = ~CLK;
end
initial begin
RST = 1'b1;
#(4 * `CLK_HALF_PERIOD);
RST = 1'b0;
#(20 * `CLK_HALF_PERIOD);
end
always_ff @(posedge CLK)
begin
if (REQ) begin
ACK <= 1'b1;
end else begin
ACK <= 1'b0;
end
end
stimulus_gen #() ut (
.CLK_I(CLK),
.RST_I(RST),
.REQ_O(REQ),
.ACK_I(ACK),
.ADDR_O(ADDR),
.END_O(END_SIG)
);
endmodule