module stimulus; // Set up variables reg A; reg Cword, Cwrite; wire out; reg Clk; // Always declared so can simulate based on clock integer handle3, desc3; //You need to define these variables as integers // Instantiate the cell cell C1(out, Cword, Cwrite, Clk, A); // Setup the clock to toggle every 1 time units initial begin Clk = 1'b1; forever #5 Clk = ~Clk; end initial begin handle3 = $fopen("test.out"); $shm_open("shm.db",1); // Opens a waveform database $shm_probe("AS"); // Saves all signals to database #45 $shm_close(); // Closes the waveform database #1 $finish; end always begin desc3 = handle3; #1 $fdisplay(desc3, $time," A= %b, out=%b, Clk=%b, word=%b, write=%b", A, out, Clk, Cword, Cwrite); end // Stimulate inputs initial begin A = 1'b0; Cword = 1'b1; Cwrite = 1'b1; #10 A = 1'b0; Cwrite = 1'b0; #10 A = 1'b1; Cwrite = 1'b1; #10 A = 1'b1; Cwrite = 1'b0; end endmodule