Hello Tamas, thank you very much for those links. SCL is really similar to VHDL. Now, I can write my own real testbench, which will read the data from the file and simulate the radiomodem. :-) Best regards PavelK > -----Original Message----- > From: piclist-bounces@mit.edu = > [mailto:piclist-bounces@mit.edu] On Behalf Of Tamas Rudnai > Sent: Wednesday, September 20, 2006 11:14 AM > To: Microcontroller discussion list - Public. > Subject: Re: [PIC] MPLAB, Stimulus file and problem > = > = > SCL is pretty much the same as VHDL. With an unknown reason = > Microchip does not document it, all they say is to use the = > click-and-go style generator which not always meets the = > needs. You can find some info by people reversing / expoiting = > it on the Microchip forum: > = > http://direct.forum.microchip.com/tm.aspx?m=3D109149 > http://forum.microchip.com/tm.aspx?m=3D111255 > = > I think if you remove the wait commands (not the 'wait for = > xyz us' but the ones without parameters) would solve the = > problem, but also you can put the whole into one larger = > process instead of having small ones for every actions. > = > Tamas > = > = > = > On 20/09/06, Pavel Ko=F8ensk=FD wrote: > > > > Hi Tamas, > > > > enclosed is the .SCL file generated by MPLAB. > > I already looked at the file and it seems OK. > > > > Actually, I would also prefere to write the file myself in the text = > > editor (I know how to write testbench files for Verilog = > and/or VHDL), = > > but I do not have any description of the SCL language. > > > > > > PavelK > > > > > -----Original Message----- > > > From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu] On = > > > Behalf Of Tamas Rudnai > > > Sent: Wednesday, September 20, 2006 2:44 AM > > > To: Microcontroller discussion list - Public. > > > Subject: Re: [PIC] MPLAB, Stimulus file and problem > > > > > > > > > Hi Pavel, > > > > > > Could you attach the SCL file, so that it might show us = > what could = > > > be the problem. > > > > > > BTW: SCL is a quite powerful language actually that is not = > > > documented by Microchip. Usually I found easier to write the SCL = > > > file by a text editor or even better, convert a WAV file = > into an SCL = > > > using a small dirty tool I wrote > > > -- it looks something like this: > > > > > > // > > > // PWM_strait_1.5.SCL > > > // Generated by WAV2SCL.PL > > > // Thu Jan 1 00:00:00 1970 > > > // > > > configuration for "pic12f675" is > > > end configuration; > > > > > > testbench for "pic12f675" is > > > begin > > > process is > > > begin > > > report "Stimulus actions INIT GP3 to LOW for 2ms"; > > > GP3 <=3D '0'; > > > wait for 2 ms; > > > > > > loop > > > // overall of 22 ms frame rate > > > > > > report "STATE:HIGH for 1.5ms"; > > > GP3 <=3D '1'; > > > wait for 1.5 ms; > > > > > > report "STATE:LOW for 20.5ms"; > > > GP3 <=3D '0'; > > > wait for 20.5 ms; > > > > > > end loop; > > > end process; > > > end testbench; > > > > > > Change the processor type for that you have, and pin names etc to = > > > whatever that processor uses, then 'ms' to 's' or 'us' = > accordingly, = > > > basically that's it... > > > > > > Tamas > > > > > > > > > > > > On 20/09/06, Pavel Ko=F8ensk=FD wrote: > > > > > > > > Hello, > > > > > > > > I have a problem with stimulus file in MPLAB 7.30. > > > > > > > > I am debugging software where PIC is receiving packets = > from simple = > > > > radiomodem (868 MHz, AM, OOK). The transmitting side works > > > OK, and I > > > > am trying to debug the receiver. I used the SCL generator > > > in MPLAB and > > > > I created the stimulus file which should drive the = > receiving pin = > > > > of the PIC in MPSIM. In the SCL generator, the whole = > thing looks = > > > > like: > > > > > > > > Time units us > > > > > > > > Time RB0 > > > > > > > > 0 0 > > > > 5000000 1 > > > > 5004000 0 > > > > > > > > and so on > > > > > > > > It means that at time 0, the RB0 pin is low. After 5 > > > seconds, the RB0 > > > > goes high (start of the transmittion), after 4 ms, RB0 goes > > > low (first > > > > start bit) etc. > > > > > > > > But, when I generate the SCL file and when I attach it to the = > > > > simulation, MPLAB react correctly to the first event (RB0 > > > going high > > > > after 5 seconds), but the simulator ignore the rest of the > > > file. RB0 > > > > never goes low after 4 ms and the rest of the file (the whole = > > > > simulated > > > > transmittion) is ignored. > > > > > > > > Anyone have some idea where I am wrong ? > > > > > > > > Thx for your help > > > > > > > > Best regards > > > > > > > > PavelK > > > > > > > > -- > > > > http://www.piclist.com PIC/SX FAQ & list archive = > View/change your = > > > > membership options at = > > > > http://mailman.mit.edu/mailman/listinfo/piclist > > > > > > > > > > > > > > > > -- > > > unPIC -- The PIC Disassembler > > > http://unpic.sourceforge.net > > > -- > > > http://www.piclist.com PIC/SX FAQ & list archive View/change your = > > > membership options at = > > > http://mailman.mit.edu/mailman/listinfo/piclis> t > > > > > > > > > -- > > http://www.piclist.com PIC/SX FAQ & list archive > > View/change your membership options at = > > http://mailman.mit.edu/mailman/listinfo/piclist > > > > > > > > > = > = > -- = > unPIC -- The PIC Disassembler > http://unpic.sourceforge.net > -- = > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at = > http://mailman.mit.edu/mailman/listinfo/piclis> t > = -- = http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist