Confused about my behavioral simulation under ISE 9.1

Gang

I created a module, downloaded it to my dev board and ran it. The LED's changed as I expected.

I decided to run a behavioral simulation to prove to myself that signals were changing the way I expected them to.

So I created a verilog test bench. Here is my code.

module tob_tb_v;

// Inputs reg clk; reg rst;

// Outputs wire [7:0] leds;

// Instantiate the Unit Under Test (UUT) Top uut ( .clk(clk), .rst(rst), .leds(leds) );

initial begin // Initialize Inputs

// Wait 100 ns for global reset to finish #100;

$display("At time %t", $time); #10;

$display("At time %t", $time);

// Add stimulus here

end

always @(posedge clk) begin end

endmodule

I am really confused. I have done simulations before on simple modules that didn't have clock inputs. This one as you can see does. When I go to simulation window, I am not seeing a periodic clock signal. Without it, I don't know how to evaluate the state of my other signals.

What am I doing wrong?

Thanks for helping. I am running ISE 9.1 Webpack with SP3, under Windows XP with SP2, 2GB of RAM, 200GB of free disk space.

Bob

Reply to
bob.zigon
Loading thread data ...

You have to drive the clk signal either in your code or by using a command provided by your simulator.

---Matthew Hicks

Reply to
Matthew Hicks

In particular ... add something like following :

parameter clk_100mhz_half_period = 5;

// regs and wires reg clk_100mhz, cr_rst;

// clock initial clk_100mhz = 1'b0; initial cr_rst = 1'b1; always #clk_100mhz_half_period clk_100mhz = ~clk_100mhz;

initial begin repeat(100) begin @(posedge clk_100mhz); end cr_rst = 1'b0; end //

-- Regards, John Retta Owner and Designer Retta Technical Consulting Inc.

email : snipped-for-privacy@rtc-inc.com web :

formatting link

Reply to
John Retta

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.