6502.org
http://forum.6502.org/

WinCupl SIM and Code Help
http://forum.6502.org/viewtopic.php?f=10&t=6438
Page 1 of 1

Author:  pladi [ Tue Jan 05, 2021 9:01 pm ]
Post subject:  WinCupl SIM and Code Help

Can someone have a look at this set up and tell me why it does not generate a simulation file ?

The compiler is throwing no errors or warnings.

The simulation throws an error but no description. I cant tell what is wrong at all. I know very little about this software or PALs.

The program is a simple INPUT-OUTPUT table. For 8 inputs and 7 outputs.

Thank you in advance.

Name BLDC Commutation ;
PartNo 00 ;
Date 12/10/2020 ;
Revision 01 ;
Designer Plad ;
Company Curtiss ;
Assembly None ;
Location New ;
Device g16v8a ;

/* *************** INPUT PINS *********************/
PIN 1 = CLK ; /* */
PIN 2 =HB ; /* */
PIN 3 =HC ; /* */
PIN 5 =DIR ; /* */
PIN 4 =INH ; /* */
PIN 6 =HE ; /* */
PIN 7 =HR ; /* */
PIN 8 =BRK ; /* */

/* *************** OUTPUT PINS *********************/
PIN 15 = A ; /* */
PIN 12 = AN ; /* */
PIN 16 = B; /* */
PIN 13 = BN ; /* */
PIN 17 = C ; /* */
PIN 14 = CN ; /* */
PIN 19 = F ; /* */

FIELD INPUT = [CLK,HB,HC,DIR,INH,HE,HR,BRK] ;
FIELD OUTPUT = [A,AN,B,BN,C,CN,F];

TABLE INPUT => OUTPUT {
'b'10000100 => 'b'0110000;
'b'11000100 => 'b'0100100;
'b'01000100 => 'b'0001100;
'b'01100100 => 'b'1001000;
'b'10100100 => 'b'1000010;
'b'00000100 => 'b'0010010;
'b'10000010 => 'b'1001000;
'b'11000010 => 'b'1000010;
'b'01000010 => 'b'0010010;
'b'01100010 => 'b'0110000;
'b'00100010 => 'b'0100100;
'b'10100010 => 'b'0001100;
'b'00001000 => 'b'0000000;
'b'00000001 => 'b'0101010;
'b'00000000 => 'b'0000001;
'b'00000010 => 'b'0000000;
'b'00010100 => 'b'0000000;
'b'00000000 => 'b'0000001;
'b'11100000 => 'b'0000001;}

Author:  Shawn Odekirk [ Tue Jan 19, 2021 1:37 am ]
Post subject:  Re: WinCupl SIM and Code Help

My experience with WinCupl is that it doesn't like spaces in file paths or names.
My advice:
    Make sure the path to your WinCupl program does not contain spaces
    Make sure the path to your WinCupl project does not contain spaces
    Make sure the name of your WinCupl project does not contain spaces
    Make sure the "Name" line in your .pld file matches the name of your .pld file

I created a directory named D:\Dev\Test\BLDC and created the file BLDC.pld in that directory. I copied your source and pasted it into the BLDC.pld file. I then changed the first line from "Name BLDC Commutation ;" to "Name BLDC ;"
Here is the result of my simulation.
Let me know if this helps.

Shawn

Attachments:
File comment: BLDC Simulation
BLDC.png
BLDC.png [ 17.34 KiB | Viewed 1141 times ]

Author:  8BIT [ Tue Jan 19, 2021 4:51 pm ]
Post subject:  Re: WinCupl SIM and Code Help

Everything Shawn said plus, the file name should start with a letter, not a number. When I converted the 65SPI project over, I had to rename the file to a65spi.pld, as it would not work with 65spi.pld

Daryl

Author:  BigDumbDinosaur [ Tue Jan 19, 2021 6:23 pm ]
Post subject:  Re: WinCupl SIM and Code Help

Also, be careful with the names you assign to signals, pin nodes, etc. Although the WinCUPL manual says such names are case-sensitive, that is not so. RESET, ReSet, Reset, reset, etc., in the same design file will give you some grief, as I discovered some time ago.

WinCUPL is actually pretty junky software that has not been maintained for many years. It originated in MS-DOS and was "windows-fied" around 1996. The last significant "improvement" to it appears to have been around 2003. That said, it is free, so no matter what, you will be getting your money's worth. :D

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/