6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Apr 27, 2024 9:28 pm

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Mon May 08, 2023 5:22 pm 
Offline

Joined: Tue Feb 07, 2023 12:27 pm
Posts: 19
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 3782 times ]
Top
 Profile  
Reply with quote  
PostPosted: Mon May 08, 2023 8:12 pm 
Offline

Joined: Tue Feb 07, 2023 12:27 pm
Posts: 19
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;


Top
 Profile  
Reply with quote  
PostPosted: Thu Jul 20, 2023 6:51 pm 
Offline

Joined: Fri Jul 09, 2021 10:12 pm
Posts: 741
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 2958 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.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron