Altera_Forum
Honored Contributor
16 years agoUsing Verilog Testbenches
Hello everybody,
I am trying to simulate my desing using a verilog testbench, excerpts as follows at the end of my message. Although I have checked that the testbench is included; logfiles show me that it has been included the post simulaiton results will not allow me to add any nodes to my resulting waveforms. Any ideas what I need to do ? Thanks a bunch in advance for your answers - Eric Hueckel`timescale 1ns/1ns
module test_pwm_fail_detect;
reg clk_i;
reg pwm0_i;
reg pwm1_i;
reg pwm2_i;
reg pwm3_i;
reg global_enable_i;
wire pwm_fail_o;
// instantiate the pwm failure detector
pwm_fail_detect m1 (clk_i,
pwm0_i,
pwm1_i,
pwm2_i,
pwm3_i,
global_enable_i,
pwm_fail_o);
// $monitor($time, ,"clk_i=%b ,pwm0_i=%b,",
// clk_i,pwm0_i );
// initial# 1200 $stop;
initial
begin
clk_i = 1'b0; //set clock and reset low initially
global_enable_i = 1'b0;
pwm0_i = 1'b0;
pwm1_i = 1'b0;
pwm2_i = 1'b0;
pwm3_i = 1'b0;
end
always# 38 clk_i = ~clk_i; //toggle clk_i every 38 ns = 13.157 mhz
initial
begin# 5 global_enable_i = 1'b1;
$stop; $finish;
end
endmodule