`timescale 1ns/1ps module prod2u_p4_normal_v3_top_tb; reg sys_clk = 1'b0; reg host_uart_rx = 1'b1; wire host_uart_tx; wire [7:0] ptc_pwm_out; wire [3:0] fan_pwm_out; wire motor_en_n; wire x_step, x_dir, y_step, y_dir, z_step, z_dir; reg x_limit_ls = 1'b0; reg x_limit_hs = 1'b0; reg y_limit_ls = 1'b0; reg y_limit_hs = 1'b0; reg z_limit_ls = 1'b0; reg z_limit_hs = 1'b0; tri temp_scl; tri temp_sda; always #1 sys_clk = ~sys_clk; prod2u_p4_normal_v3_top dut ( .sys_clk(sys_clk), .host_uart_rx(host_uart_rx), .host_uart_tx(host_uart_tx), .ptc_pwm_out(ptc_pwm_out), .fan_pwm_out(fan_pwm_out), .motor_en_n(motor_en_n), .x_step(x_step), .x_dir(x_dir), .y_step(y_step), .y_dir(y_dir), .z_step(z_step), .z_dir(z_dir), .x_limit_ls(x_limit_ls), .x_limit_hs(x_limit_hs), .y_limit_ls(y_limit_ls), .y_limit_hs(y_limit_hs), .z_limit_ls(z_limit_ls), .z_limit_hs(z_limit_hs), .temp_scl(temp_scl), .temp_sda(temp_sda) ); initial begin repeat (1100) @(posedge sys_clk); if (host_uart_tx !== 1'b1) $fatal(1, "UART TX is not idle"); if (ptc_pwm_out !== 8'd0) $fatal(1, "PTC outputs are not off"); if (fan_pwm_out !== 4'hF) $fatal(1, "FAN outputs are not inactive"); if (motor_en_n !== 1'b1) $fatal(1, "motor enable is not permanently high"); $display("prod2u_p4_normal_v3_top_tb PASS"); $finish; end endmodule