Giter Site home page Giter Site logo

galasm's Introduction


                                GALasm 2.1

                          Portable GAL Assembler
                 Copyright (c) 1998-2003 Alessandro Zummo
        Original sources Copyright (c) 1991-96 Christian Habermann
                            All Rights Reserved

                   Commercial use is strictly forbidden


Introduction
------------

GALasm was created simply because there were no other
open source GAL assemblers. The assembler core
is basically the one of GALer, a GAL development
environment for the Amiga platform. I was unable
to get in touch with his author to get the permission to 
do the port, so if he complains i'll have to 
stop the development.


Copyright
---------

GALasm is Copyright (c) 1998-2003 by Alessandro Zummo
but any bug and any piece of code taken from the original GALer
sources is still Copyright (c) 1991-96 by Christian Habermann.


Disclaimer
----------

The authors can not be made responsible for any damage caused
by a fault of GALasm. In other words: use it at your own risk.
Even if i've ported it, i've not fully understood every
aspect of the assembler core.


Sources
-------

The sources are written in ANSI-C, so it should
be possible to compile them on any platform.
The sources have been successfully compiled
with SAS/C on the Amiga platform and with gcc
on Debian GNU/Linux.


About GALs
----------

Some kind of GALs are not reprogrammable and some others,
especially the one i belong to, are even not programmable at all...
ok, just kidding. The original GALer documentation
is a very well written, so if you want to know
how to write down a GAL equation, run your favorite
browser and load galer/main.html. All the non-Amiga
related sections are still valid for GALasm.


GALasm
------

If you type GALasm -h you should obtain the following text:

GALasm 2.1, Portable GAL Assembler
Copyright (c) 1998-2003 Alessandro Zummo. All Rights Reserved
Original sources Copyright (c) 1991-96 Christian Habermann

Usage:
GALasm [-scfpa] <filename>
-s Enable security fuse
-c Do not create the .chp file
-f Do not create the .fus file
-p Do not create the .pin file
-a Restrict checksum to the fuse array only

I think it's self explanatory, but if you've
any trouble, drop me a note. 


Author
------

 The author (me) can be contacted at [email protected]
 while the GALasm support page is located at
 http://www.towertech.it/azummo/

 If you have a bug report, a comment or anything else, 
 feel free to write me. 
 Donations are also welcome 8-) .

galasm's People

Contributors

apoloval avatar daltona avatar daveho avatar jlusiardi avatar pjdennis avatar sharkcz avatar skiselev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

galasm's Issues

Not open source

You preface your introduction by saying that the reason GALasm was created is because there are no other open source GAL assemblers. At the same time right above that statement, is a prominent restriction specifying that "Commercial use is strictly forbidden". These two parts of the readme file contradict each other. Under every accepted definition of "open source" and "free software" one of the core liberties is the ability to use the software without restriction for any purpose. I can cite specific documents if you wish, but a quick look around fsf.org and opensource.org should convience you of the facts.

As it stands, unfortunately, GALasm is not open source, nor free software. Would you mind lifting that restriction, so we can finally have an open source GAL assembler? (assuming there are no others, I didn't check yet). Ideally please also select a common open source/free software license, and release your software under those terms.

Feature request: warning on too many pins in product terms

This might not really be a bug, but it is somewhat inconvenient and less than helpful.

If a line in a .pld file contains too many pins in a product term, the extra's are silently ignored.

This in contrast with the count of product terms which is checked.

The following .pld file defines six outputs, each defined with a single product term containing nine pins. The last one is silently ignored. Assuming the code knows about the maximum number of terms per device, a warning would be helpful for the user.

	GAL16V8    ; Address decode
	ADDRDC4  ;
	
	;1    2     3     4     5     6     7     8     9     10
	NC  /IORQ  /WR   A0    A1    A2    A3    A4    A5    GND
	NC   Q0    Q1   Q2    Q3    Q4    Q5    A6    A7     VCC
	;11  12    13   14    15    16    17    18    19     20
	
	Q0 = /A0 * /A1 * /A2 * IORQ * WR * A3 * A4 * A5 * A6
	Q1 =  A0 * /A1 * /A2 * IORQ * WR * A3 * A4 * A5 * A6
	Q2 = /A0 *  A1 * /A2 * IORQ * WR * A3 * A4 * A5 * A6
	Q3 =  A0 *  A1 * /A2 * IORQ * WR * A3 * A4 * A5 * A6
	Q4 = /A0 * /A1 *  A2 * IORQ * WR * A3 * A4 * A5 * A6
	Q5 =  A0 * /A1 *  A2 * IORQ * WR * A3 * A4 * A5 * A6
	
	DESCRIPTION

But when a pin is defined with too many product terms, like the attached file, GALasm throws an error:

	Error in line 54: too many product terms

Simplyfied versions of attached file did compile, but the GAL didn't work, this might be related with the issue described above, or I don't really understand registered mode (the latter is most likely).

RINCREMENTER1.pld.txt

Unexpected inversion when using inverted registered outputs

Consider this example:

GAL22V10
PS2

CLK  A    B    NC   NC   NC   NC   NC   NC   NC   NC   GND
/CS  Q1   Q2   NC   NC   NC   NC   NC   NC   NC   NC   VCC

/Q1.R = A * B
/Q2.R = /Q1

DESCRIPTION
t

If I invert Q1 and Q2 in pin definitions as such:

< /CS  Q1   Q2   NC   NC   NC   NC   NC   NC   NC   NC   VCC
---
> /CS /Q1  /Q2   NC   NC   NC   NC   NC   NC   NC   NC   VCC

...I can observe the following difference in fuses:

132c132
< Pin 15 = Q2           S0 = 0   S1 = 0
---
> Pin 15 = /Q2          S0 = 1   S1 = 0
134c134
< 112  ---- ---- ---- ---- ---- ---- ---- ---- ---- --x- ----
---
> 112  ---- ---- ---- ---- ---- ---- ---- ---- ---- ---x ----
145c145
< Pin 14 = Q1           S0 = 0   S1 = 0
---
> Pin 14 = /Q1          S0 = 1   S1 = 0

I would expect only the S0 bit to change. However, the actual column is also getting changed (from true to inverted).

I checked the datasheet (http://web.mit.edu/6.115/www/document/gal22v10.pdf). On page 4 in the top section (S1=0) it's stated that the feedback originates from /Q while the pin itself is driven by Q, so pin inversion does not have any influence on the feedback since it's driven by a separate driver.
This means that S0=0,S1=0 and S0=1,S1=0 should only change the behavior of the physical output, not the matrix. In other words, inverting a pin in the definition section should only change the S0 flag.
Is this a bug or am I misunderstanding something?

equation parse going wrong

ok, I only been at this 3 days, but I think its not behaving right.

I have the following config
GAL16V8
main
A B C NC NC NC NC NC NC GND
NC NC NC NC NC NC X Y Z VCC

X = A * B * C
Y = /A * B * C + A * /B * C + A * B * /C
Z = /A * /B * /C + /A * /B * C + /A * B * /C + A * /B * /C

DESCRIPTION
X is active with 3 inputs high
Y is active with two inputs high
X is active with less than 2 inputs high

X is ok, but the other two channels aren't working correctly. There are no assemble errors. Its just not working right.
Tried to make heads of tails of how the formulas are parsed, but this could be a lot faster for someone else more familiar with the code.

too many terms??

Combinatorial Output with Feedback Configuration for Simple Mode (mode 1) is not supported

According to GAL16V8 datasheet pages 8 and 9, it should be possible to have feedback from an output pin in simple mode (galasm mode 1).
Unfortunately, it looks that galasm does not allow this.
If such configuration is attempted, it will switch to mode 2 (complex mode).

Here is a simple example showing this issue:

GAL16V8         ; first line : used GAL
FEEDBACK        ; second line: any text (max. 8 char.)

A       B       NC      NC      NC      NC      NC      NC      NC      GND
NC      NC      NC      NC      NC      NC      NC      D       C       VCC

C = /A
D = B * C


DESCRIPTION

This example shows a bug in galasm

According to GAL16V8 datasheet, it should be possible to have feedback
from an output pin in mode 1, but galasm does not allow this, and
will switch to mode 2 (complex mode) if it encounters any pin with feedback

Checksum Ok for GAL16V8 but not for GAL22V10

INCREMENTER5.pld.zip
A GAL16V8 .pld file assembled to .jed is accepted by the https://gitlab.com/DavidGriffith/minipro programmer software and the GAL appears to work as expected. But my GAL22V10 .pld file is not. The problem appears to be a wrong file checksum. The checksum in the GAL16V8 file is four hex digits, but in the GAL22V10 file is five digits. Replacing the value by the one suggested by the minipro software results in a accepted .jed file, which can be programmed. As an experimental test, a quick hack in jedec.c:FileChecksum() truncating the checksum to 4 digits appears to be working to:

checksum = checksum & 0xFFFF;

On the minipro gitlab site is a link to a .jed file specification (http://www.pldtool.com/pdf/fmt_jedec.pdf), and it indeed specifies a four digit file checksum.

Greetings,
Fred Jan

Edit: Attached the offending pld file.

Feature Request. More Flexibility in Pin Naming

I was wondering if there would be any logical reason why we could not implement a bit more flexibility in the Pin Naming conventions. For example being able to name pins with names such as /ROM_EN etc.

Example code could be

#define isalpha IsALPHA_E

and

  int IsALPHA_E(char chr){
         if ((chr >= 'a' && chr <= 'z') || (chr >= 'A' && chr <= 'Z') || chr == '_')
           return(1);
        else
           return(0);
   }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.