VOGONS


First post, by rainhenry

User metadata
Rank Newbie
Rank
Newbie

Hello, everyone!
I am using CUPL4.0a under the DOS system to try compiling its built-in example code - keyboard.pld.

List of executed commands:

c:
cd c:\cupl\examples
cupl -ja keyboard

It will generate this error:
-----------------------------------------------
CUPL: Universal Compiler for Programmable Logic
Version 4.0a Serial# MD-40A-8249
Copyright (C) 1983,1990 Logical Devices, Inc.
Licensed to XXXXX

cuplx
time: 3 secs
cupla
[0015ca] out of memory: parsing
time: 6 secs
total time: 9 secs

Fatal CUPL errors encountered ... program aborted!
-----------------------------------------------

I used the same method to compile other example codes and the code I wrote myself, and it worked fine. I also downloaded the generated jed file to the chip and it worked properly.
But for the keyboard.pld code, it seems that the problem is that it cannot request enough memory from the DOS system?
I have also tried to get the same error message in dosbox 0.74-3 and on real physical machines (80486+dos622), etc
May I ask which friend has encountered this problem before and how to solve it?
Thank you. We look forward to your reply

Reply 1 of 9, by rainhenry

User metadata
Rank Newbie
Rank
Newbie

In the screenshot in my attachment, there is a detailed description of the [0015CA] error code, but it does not provide a specific solution

Reply 2 of 9, by myne

User metadata
Rank Oldbie
Rank
Oldbie

best guesses

1) Too much memory and the tiny buffer counting it is overflowing. Reduce VM to... say 4mb.
2) Not enough conventional memory. Run MEM and/or memmaker.

I built:
Convert old ASUS ASC boardviews to KICAD PCB!
Re: A comprehensive guide to install and play MechWarrior 2 on new versions on Windows.
Dos+Windows 3.11+tcp+vbe_svga auto-install iso template
Script to backup Win9x\ME drivers from a working install
Re: The thing no one asked for: KICAD 440bx reference schematic

Reply 3 of 9, by rainhenry

User metadata
Rank Newbie
Rank
Newbie

I have modified some memory related configurations in the dosbox configuration file, but the same issue persists. The log output of the mem command is as follows:

Memory Type        Total  =   Used  +   Free
---------------- ------- ------- -------
Conventional 640K 6K 634K
Upper 64K 3K 61K
Reserved 384K 384K 0K
Extended (XMS) 15,296K 128K 15,168K
---------------- ------- ------- -------
Total memory 16,384K 521K 15,863K

Total under 1 MB 704K 9K 695K

Total Expanded (EMS) 16,384 (16,777,216 bytes
Free Expanded (EMS) 15,168 (15,532,032 bytes

Largest executable program size 634K (648,736 bytes)
Largest free upper memory block 61K (62,336 bytes)
MS-DOS is resident in the high memory area.

Reply 4 of 9, by myne

User metadata
Rank Oldbie
Rank
Oldbie

Ok, now try the first suggestion

I built:
Convert old ASUS ASC boardviews to KICAD PCB!
Re: A comprehensive guide to install and play MechWarrior 2 on new versions on Windows.
Dos+Windows 3.11+tcp+vbe_svga auto-install iso template
Script to backup Win9x\ME drivers from a working install
Re: The thing no one asked for: KICAD 440bx reference schematic

Reply 5 of 9, by rainhenry

User metadata
Rank Newbie
Rank
Newbie
myne wrote on 2025-05-23, 07:36:

Ok, now try the first suggestion

I have almost tried most common specifications of memory and DOS versions, and on real physical devices. The memory specifications range from 512KB, 1MB, 2MB, 4MB, 8MB, and 16MB. DOS versions have been tested from 3.3 to 7.1, and without exception, all have the same error message.

Reply 6 of 9, by rainhenry

User metadata
Rank Newbie
Rank
Newbie

And 16MB RAM

Reply 7 of 9, by rainhenry

User metadata
Rank Newbie
Rank
Newbie

I speculate that early versions of CUPL may not support extended memory (such as EMS, XMS, etc.), which would result in it only being able to use 640KB of standard memory. However, parsing and simplifying logical expressions themselves is a very memory and computationally intensive operation. If it's just the keyboard in the example that can't be used, it's okay. I'm currently working on a project where I need to integrate a logical expression of thousands of lines into an SPLD chip. If it's a CPLD, it can be fully integrated using more advanced software such as Verilog based Maxplus II, Quartus II, or ISE. But I need to use SPLDs with fewer pins to do it, which is really a spacing task.

Reply 8 of 9, by rainhenry

User metadata
Rank Newbie
Rank
Newbie

I have also tried using other versions of CUPL software, such as CUPL3.2B and CUPL4.0A, but when parsing large CUPL language source files, they reported an error of insufficient memory. Although CUPL3.2B can integrate the keyboard program in the example normally, it still cannot integrate my program. At the same time, I also tried using CUPL on early Windows platforms, such as wincupl4.8a. During testing, I found that this version had removed many traditional device libraries, which means it no longer supports some old devices. Even if WinCupl can integrate normally, it is impossible for me to generate the final JED file written to the target chip because the new version of WinCupl no longer supports old devices.

Reply 9 of 9, by myne

User metadata
Rank Oldbie
Rank
Oldbie
rainhenry wrote on 2025-05-26, 06:47:
myne wrote on 2025-05-23, 07:36:

Ok, now try the first suggestion

I have almost tried most common specifications of memory and DOS versions, and on real physical devices. The memory specifications range from 512KB, 1MB, 2MB, 4MB, 8MB, and 16MB. DOS versions have been tested from 3.3 to 7.1, and without exception, all have the same error message.

Hmm
It's all xms. No ems.
Maybe that program requires ems

Thenumberofproducttermsgeneratedisovertwelvethousand(4096x3+1). Thisnumberofproduct termswouldprobablyproducean“outofmemory”errormessagebecauseCUPLcannotholdthismany producttermsinmemoryatonetime.

https://ece-classes.usc.edu/ee459/library/doc … L_Reference.pdf

Selecting Compiling options
This item allows you to select items specifically for compilations
Under the Options menu, choose the "Compiler Options" item.

The Logic Minimization drop down box allows you to select what minimization level you want.
This selection can be overridden on specific outputs by using the MIN statement.
Quine McCluskey is the best optimization method, but it is slow and more prone to run out of memory than the other methods. Use this only if necessary.

https://pages.uoregon.edu/torrence/432/docs/CUPL.html

0015ca out of memory: “condition” Fatal. CUPLA has used all available RAM memory which has been allocated by the operating system. Decrease the number of intermediate variables, fields, or numbers in order to reduce the size of the symbol table.

https://www.google.com/url?sa=t&source=web&rc … 5hX3ffhghY8TuB_

I built:
Convert old ASUS ASC boardviews to KICAD PCB!
Re: A comprehensive guide to install and play MechWarrior 2 on new versions on Windows.
Dos+Windows 3.11+tcp+vbe_svga auto-install iso template
Script to backup Win9x\ME drivers from a working install
Re: The thing no one asked for: KICAD 440bx reference schematic