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

GAL16v8 initialize Low state after power ON.
http://forum.6502.org/viewtopic.php?f=10&t=7595
Page 1 of 1

Author:  gregorio [ Mon May 08, 2023 5:22 pm ]
Post subject:  GAL16v8 initialize Low state after power ON.

Hello everyone. This is my first topic here. I'm starting to get to know winCupl and I have a question. How in GAL16V8 to initialize the Low state on the trigger output after turning on the power.
Reset signal is available

Attachments:
Untitled.png
Untitled.png [ 1.89 KiB | Viewed 4409 times ]

Author:  gregorio [ Mon May 08, 2023 8:12 pm ]
Post subject:  Re: GAL16v8 initialize Low state after power ON.

I wrote this code and under winCUPL it seems to work.
The SYN pin is attached to the CLK pin.
Code:
PIN 1=CLK;
PIN 4=A0;
PIN 2=CE;
PIN 12=Q2;
PIN 19=Q4;
PIN 8=RST;
PIN 15=SYN;

    Q4.D = !A0&Q4;
      Q2.D = (A0&RST)&!Q4;
   SYN=CE$RST;

Author:  gfoot [ Thu Jul 20, 2023 6:51 pm ]
Post subject:  Re: GAL16v8 initialize Low state after power ON.

It looks like you worked around it by using separate "reset" logic within your PLD file, which seems fine as an option given such a reset signal exists and is guaranteed to last at least one clock tick. But regarding making a pin actually default to a different state, I don't believe this is possible with the ATF16V8. The flipflops in the macrocells always default to the "off" state, and their sense is inverted by an output driver on the way to the pin in a way that's not programmable, meaning the pins always default to high output level.

Attachment:
16v8_reg_output_cell.png
16v8_reg_output_cell.png [ 42.27 KiB | Viewed 3585 times ]


It is possible to influence the logical default state for the pin as far as the rest of the PLD file is concerned though - which is useful if you're using the macrocell only for feedback logic and the electrical state of the physical pin doesn't matter to you (e.g. not connected). For one of my designs recently I had a two-bit "lock" state that's internal to the PLD, and I wanted it to default to "00". To do this I added inversion to the pin definition as below:

Code:
/* outputs */
pin 19 = !SHAD;                       /* Shadow-active state */
pin [ 17, 18 ] = [ !LOCK0, !LOCK1 ];  /* Lock state */


As the flipflop defaults to being "off", and thus the pin defaults to being "on", and my lock state is the opposite of the pin, my lock state bits both default to "off" as desired. Cupl enables the XOR gate and adjusts any expressions using my lock bits to have the opposite sense.

SHAD here is similar but this one is an actual electrical output, and I want SHAD to be off by default, so the electrical output has to be "!SHAD". The electrical output will again default high, so then SHAD is "off" as desired, and the rest of the circuit needs to cope with this signal being inverted.

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