vlsibank

Log in or Sign up.
Main EDA Embedded Systems ASIC FPGA VHDL Verilog CMOS Semiconductors DSP Mixed Signal Architecture Miscellaneous

<-- Previous Next -- > TOPIC: Unable to simulate a waveform
Posted by: junie     9/26/2008 2:57:10 AM     Category: Verilog
Questions posted: 6         Comments Posted: 0
hi there.
i've been writing the verilog program using modelsim v6.1g. and everytime i got a warning and my waveform can't be display. and often, the systm will hang and sometimes, i can't re-simulate the program. May i know what could the problem is?
The warning display after simulation:# Loading work.SPI_try4_tb
# Loading work.SPI_RR4
# ** Warning: (vsim-3009) [TSCALE] - Module 'SPI_RR4' does not have a `timescale directive in effect, but previous modules do.
#         Region: /SPI_try4_tb/SPItb

------------------------------------------
And following is the program i wrote, hopefully someone could point out the mistake i code.

module SPI_RR4(input wire SYS_CLK,input wire RESET,
              input wire SI,output reg SCK,output reg MISO);
             
  assign CPOL=1;
 
  initial
  begin
      if(CPOL==1)
     SCK=1;
     else if(CPOL==0);
     SCK=0;
  end
 
  always @ (posedge SYS_CLK or negedge SYS_CLK)
  begin
       #10 SCK=~SCK;
  end  

endmodule
-------------------------------------------------

Thanks alot:)

Posted by: abhilashvlsi     8/12/2010 3:24:44 AM
Comments Posted:5       

while going to "start simulation", a window will be opened.In that dont forget to disable the optimization.

I am using modelsim 6.4.......i tried your code..no compilation error. Got simulation as per your code which do not mentioning about "output reg MISO". No SYS_CLK is generated there.
Try to correct your code and go for simulation.


Posted by: kumarshravan     7/26/2010 7:30:13 AM
Comments Posted:8       

U can write posedge and negedge in single always statement try it in different always blocks and #10 is not synthesiable change trying ur code




You have to be logged in to be able to post a comment. To login click here. First time? Sign up. It just takes a few minutes to sign up.

Login to access the site

  Username:
  Password:
   Signup Forgot Password?    

Users with most replies

   User
 No. of Replies
100
86
77
76
70
66
61
57
54