6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Nov 23, 2024 3:06 am

All times are UTC




Post new topic Reply to topic  [ 14 posts ] 
Author Message
 Post subject: VHDL / CPLD / Macrocells
PostPosted: Wed Jul 07, 2021 4:46 pm 
Offline

Joined: Wed Jun 02, 2021 1:23 am
Posts: 25
Hi guys,

Working on a Rev 2 of my board going SMD and wanted to trim down the chip count on my logic side so I decided to leverage a CPLD (ATF1504AS-7AX100). So far I have all of my glue logic working beautifully, but running into some issues adding some extra features for the clock.

At the bottom is my VHDL, it compiles into 40 macrocells in it's displayed state, when I switch the source of the sCLK1 in these two lines

Code:
   --sCLK1 <= sClkTmp;
   sCLK1 <= sCLK0;


It goes up to 90 macrocells. A fix would be cool, but resources to help me to better understand what will become a macrocell and the IO limitations of how many input/outputs they can have would be great. I did run into some previous issues with too many I/O's into a macrocell and through brute force discovered that splitting the processes and turning everything into a signal in and out of my processes helped this significantly, but I don't really entirely understand why.


Code:
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
use ieee.numeric_std.all;


entity TEST6502 is
   port(
      pCLK0: in std_logic;
      pCLK1: out std_logic;
      pClkSel: in std_logic_vector(1 downto 0);
      pRST: in std_logic;
      pRW: in std_logic;
      pOELO: out std_logic;
      pAddrBus: in std_logic_vector(15 downto 0);
      pDataBus: in std_logic_vector(7 downto 0);
      pBnkMux: out std_logic_vector(5 downto 0);
      
      pRoEn: out std_logic;
      pRaEn: out std_logic;
      pV0En: out std_logic;
      pV1En: out std_logic;
      pE0En: out std_logic;
      pE1En: out std_logic;
      pE2En: out std_logic;
      pE3En: out std_logic;
      pE4En: out std_logic;
      pE5En: out std_logic;
      pE6En: out std_logic;
      
      pHRa0En: out std_logic;
      pHRa1En: out std_logic;
      pHRa2En: out std_logic;
      pHRa3En: out std_logic;
      
      pLED0: out std_logic;
      pLED1: out std_logic;
      pLED2: out std_logic
      
   );
end TEST6502;
   
architecture rtl of TEST6502 is
   Signal sCLK0: std_logic;
   Signal sCLK1: std_logic;
   Signal sClkSel: std_logic_vector(1 downto 0);
   Signal sRST: std_logic;
   
   Signal sAddrHi: std_logic_vector(7 downto 0);
   Signal sAddrLo: std_logic_vector(7 downto 0);
   Signal sDataBus: std_logic_vector(7 downto 0);
   
   Signal sRaBnk: std_logic_vector(5 downto 0);
   signal sRaEnc: std_logic_vector(1 downto 0);
   Signal sRoBnk: std_logic_vector(5 downto 0);
   Signal sBnkMux: std_logic_vector(5 downto 0);
   
   Signal sZP: std_logic;
   Signal sIO: std_logic;
   Signal sRoEn: std_logic;
   Signal sHRa: std_logic;
   Signal sRaEn: std_logic;
   Signal sBnkSto: std_logic;
   
   Signal sHRa0En: std_logic;
   Signal sHRa1En: std_logic;
   Signal sHRa2En: std_logic;
   Signal sHRa3En: std_logic;
   
   Signal sV0En: std_logic;
   Signal sV1En: std_logic;
   Signal sE0En: std_logic;
   Signal sE1En: std_logic;
   Signal sE2En: std_logic;
   Signal sE3En: std_logic;
   Signal sE4En: std_logic;
   Signal sE5En: std_logic;
   Signal sE6En: std_logic;
      
   Signal sClkTmp: std_logic;
   Signal sClkDivisor: integer:=0;
   Signal sClkCnt: integer:=0;
   
begin
   sCLK0 <= pCLK0;
   pCLK1 <= sCLK1;
   sClkSel <= pClkSel;

   pOELO  <= not pRW;
   sRST <= pRST;
   sAddrHi <= pAddrBus(15 downto 8);
   sAddrLo <= pAddrBus(7 downto 0);
   sDataBus <= pDataBus;
   pBnkMux <= sBnkMux;
   pRoEn <= sRoEn;
   
   pLED0 <= not sRoEn;
   pLED1 <= not sV1En;
   pLED2 <= not sHRa0En;
   
   
   --sCLK1 <= sClkTmp;
   sCLK1 <= sCLK0;
   
   sClkDivisor <= 1 when sClkSel = "00" else
                  2 when sClkSel = "01" else
                  4 when sClkSel = "10" else
                  8;
   
   clockDivider: process(sRST,sCLK0,sClkDivisor)
   begin
      if sRST = '0' then
         sClkTmp <= '0';
         sClkCnt <= 0;
      elsif rising_edge(sCLK0) then
         sClkCnt <= sClkCnt+1;
         if sClkCnt > sClkDivisor then
            sClkCnt <= 0;
         elsif sClkCnt = sClkDivisor then
            sClkTmp <= not sClkTmp;
            sClkCnt <= 0;
         end if;
      end if;
   end process clockDivider;
   
   
   
         
   sBnkMux <= sRaBnk when sHRa = '0' else
              sRoBnk;

   HRaEnCtrl: process(sHRa,sRaEnc)
   begin
      if sHRa = '0' and sRaEnc = "00" then
         sHRa0En <= '0';
      else
         sHRa0En <= '1';
      end if;
      
      if sHRa = '0' and sRaEnc = "01" then
         sHRa1En <= '0';
      else
         sHRa1En <= '1';
      end if;
      
      if sHRa = '0' and sRaEnc = "10" then
         sHRa2En <= '0';
      else
         sHRa2En <= '1';
      end if;
      
      if sHRa = '0' and sRaEnc = "11" then
         sHRa3En <= '0';
      else
         sHRa3En <= '1';
      end if;
   end process HRaEnCtrl;
   
   pHRa0En <= sHRa0En;
   pHRa1En <= sHRa1En;
   pHRa2En <= sHRa2En;
   pHRa3En <= sHRa3En;
   
   

   RaBankControl: process(sRST,sBnkSto,sAddrLo(0),sDataBus,sCLK1)
   begin
      if sRST = '0' then
         sRaBnk <= "000000";
      elsif falling_edge(sCLK1) then
         if sBnkSto = '0' and sAddrLo(0) = '0' then
            sRaBnk <= sDataBus(5 downto 0);
            sRaEnc <= sDataBus(7 downto 6);
         end if;
      end if;
   end process RaBankControl;
   
   
   RoBankControl: process(sRST,sBnkSto,sAddrLo(0),sDataBus,sCLK1)
   begin
      if sRST = '0' then
         sRoBnk <= "000000";
      elsif falling_edge(sCLK1) then
         if sBnkSto = '0' and sAddrLo(0) = '1' then
            sRoBnk <= sDataBus(5 downto 0);
         end if;
      end if;
   end process RoBankControl;
   

   AddrCtrl: process(sAddrHi,sRoEn,sHRa,sIO)
   begin
      if sAddrHi = x"00" then
         sZP <= '0';
      else
         sZP <= '1';
      end if;
      
      if sAddrHi >= x"C0" then
         sRoEn <= '0';
      else
         sRoEn <= '1';
      end if;
      
      if sAddrHi >= x"A0" and sAddrHi <= x"BF" then
         sHRa <= '0';
      else
         sHRa <= '1';
      end if;
      
      if sAddrHi = x"9F" then
         sIO <= '0';
      else
         sIO <= '1';
      end if;
      
      if sIO = '1' and sHRa = '1' and sRoEn = '1' then
         sRaEn <= '1';
      else
         sRaEn <= '0';
      end if;
      
   end process AddrCtrl;

   pRaEn <= sRaEn;
   
   
   IOCtrl: process(sIO,sAddrLo,sZP)
   begin
      if sZP = '0' and sAddrLo <= x"01" then
         sBnkSto <= '0';
      else
         sBnkSto <= '1';
      end if;
   
      if sIO = '0' and sAddrLo >= x"00" and sAddrLo <= x"0F" then
         sV0En <= '0';
      else
         sV0En <= '1';
      end if;
      
      if sIO = '0' and sAddrLo >= x"10" and sAddrLo <= x"1F" then
         sV1En <= '0';
      else
         sV1En <= '1';
      end if;
      
      if sIO = '0' and sAddrLo >= x"20" and sAddrLo <= x"3F" then
         sE0En <= '0';
      else
         sE0En <= '1';
      end if;
      
      if sIO = '0' and sAddrLo >= x"40" and sAddrLo <= x"5F" then
         sE1En <= '0';
      else
         sE1En <= '1';
      end if;
      
      if sIO = '0' and sAddrLo >= x"60" and sAddrLo <= x"7F" then
         sE2En <= '0';
      else
         sE2En <= '1';
      end if;
      
      if sIO = '0' and sAddrLo >= x"80" and sAddrLo <= x"9F" then
         sE3En <= '0';
      else
         sE3En <= '1';
      end if;
      
      if sIO = '0' and sAddrLo >= x"A0" and sAddrLo <= x"BF" then
         sE4En <= '0';
      else
         sE4En <= '1';
      end if;
      
      if sIO = '0' and sAddrLo >= x"C0" and sAddrLo <= x"DF" then
         sE5En <= '0';
      else
         sE5En <= '1';
      end if;
      
      if sIO = '0' and sAddrLo >= x"E0" and sAddrLo <= x"FF" then
         sE6En <= '0';
      else
         sE6En <= '1';
      end if;
   
   end process IOCtrl;
   
   pV0En <= sV0En;
   pV1En <= sV1En;
   pE0En <= sE0En;
   pE1En <= sE1En;
   pE2En <= sE2En;
   pE3En <= sE3En;
   pE4En <= sE4En;
   pE5En <= sE5En;
   pE6En <= sE6En;
   
end rtl;


Top
 Profile  
Reply with quote  
PostPosted: Wed Jul 07, 2021 4:56 pm 
Offline

Joined: Wed Jun 02, 2021 1:23 am
Posts: 25
For fun;

An image of Rev 1 of my board with a Dual UART jumped over on a bread board through it's failed expansion card. And a picture of my Breadboard 6502 running a memory bank test on the aforementioned CPLD and code.


Attachments:
20210707_094856.jpg
20210707_094856.jpg [ 3.78 MiB | Viewed 2044 times ]
20210707_095038.jpg
20210707_095038.jpg [ 3.32 MiB | Viewed 2044 times ]
Top
 Profile  
Reply with quote  
PostPosted: Wed Jul 07, 2021 5:46 pm 
Offline

Joined: Wed Jun 23, 2021 8:02 am
Posts: 166
This should give you some information:

https://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-0950-CPLD-ATF1504AS(L)-Datasheet.pdf

There are 4 dedicated input pins on the 1504 and either 32 or 64 pins capable of being used as either input or output, depending on the package the chip comes in (44 pin package = 32 I/O, 84 pin package = 64 I/O). Each of the I/O pins is associated with a specific macrocell. You need at least one macrocell for every pin used as an output.
Each macrocell consists of a bundle of combinatorial logic and one flip flop. Thus you need at least one macrocell for every flip flop used in your design.
The 64 macrocells are organised as 4 logic array blocks (LABs) with 16 macrocells in each one. The inputs available to a macrocell are:

(i) 16 signals equal to the complement of one of the product terms generated in each of the 16 macrocells in the same LAB
(ii) True and complement versions of 40 signals imported into the LAB from the global interconnect

Each macrocell has 5 product terms which can AND any selection of the above signals. Some of these can be ORed and then XORed in the usual logic tree, the output of which can either drive the flip flop input (D input, T input or latch control), or can be directed to the output pin. The signal from the pin and the flip flop output are fed back separately to the global interconnect, so it is possible to have a macrocell output driven by a combinatorial function but still use the flip flop for buried logic.
Separate single product terms (which must be allocated from the 5 available) can be used to drive the following with custom signals:

(i) The output enable for the output pin
(ii) The asynchronous set signal of the flip flop
(iii) The asynchronous reset signal of the flip flop; alternatively, the global reset signal GCLR can be used for this and in this case the signal is universally available without having to be imported from the global interconnect (so without taking up one of your 40 slots for the LAB)
(iv) Either the clock enable or the clock of the flip flop. If one of the global clocks is used to clock the flip flop, the clock enable is made available as a separate signal; if a custom clock is used, the CE is held high.

The global interconnect contains the following signals:
(i) The 4 dedicated inputs
(ii) Pin states for all I/O pins
(iii) For each macrocell, either the flip flop output or the main combinatorial logic tree output
Each LAB can pick at most 40 of these signals to use.

Typically you will need 1 macrocell for each flip flop, plus one for each output which is generated by a combinatorial function rather than directly as the output of a flip flop. However you may need more if you have complex combinatorial functions (lots of product terms needed) or very high connectivity between parts of the device.

What software package are you using to compile your VHDL into a JEDEC file you can program onto the 1504?
If you're using Quartus plus POF2JED, it doesn't optimize very well for the 1504 because the 7064 which is the "equivalent" doesn't allow such a flexible allocation of resources - for example it doesn't allow separate output enables per macrocell, and it doesn't allow separate use of the flip flop for macrocells whose output is combinatorial.


Top
 Profile  
Reply with quote  
PostPosted: Wed Jul 07, 2021 6:39 pm 
Offline

Joined: Wed Jun 02, 2021 1:23 am
Posts: 25
kernelthread wrote:
This should give you some information:

https://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-0950-CPLD-ATF1504AS(L)-Datasheet.pdf

There are 4 dedicated input pins on the 1504 and either 32 or 64 pins capable of being used as either input or output, depending on the package the chip comes in (44 pin package = 32 I/O, 84 pin package = 64 I/O). Each of the I/O pins is associated with a specific macrocell. You need at least one macrocell for every pin used as an output.
Each macrocell consists of a bundle of combinatorial logic and one flip flop. Thus you need at least one macrocell for every flip flop used in your design.
The 64 macrocells are organised as 4 logic array blocks (LABs) with 16 macrocells in each one. The inputs available to a macrocell are:

(i) 16 signals equal to the complement of one of the product terms generated in each of the 16 macrocells in the same LAB
(ii) True and complement versions of 40 signals imported into the LAB from the global interconnect

Each macrocell has 5 product terms which can AND any selection of the above signals. Some of these can be ORed and then XORed in the usual logic tree, the output of which can either drive the flip flop input (D input, T input or latch control), or can be directed to the output pin. The signal from the pin and the flip flop output are fed back separately to the global interconnect, so it is possible to have a macrocell output driven by a combinatorial function but still use the flip flop for buried logic.
Separate single product terms (which must be allocated from the 5 available) can be used to drive the following with custom signals:

(i) The output enable for the output pin
(ii) The asynchronous set signal of the flip flop
(iii) The asynchronous reset signal of the flip flop; alternatively, the global reset signal GCLR can be used for this and in this case the signal is universally available without having to be imported from the global interconnect (so without taking up one of your 40 slots for the LAB)
(iv) Either the clock enable or the clock of the flip flop. If one of the global clocks is used to clock the flip flop, the clock enable is made available as a separate signal; if a custom clock is used, the CE is held high.

The global interconnect contains the following signals:
(i) The 4 dedicated inputs
(ii) Pin states for all I/O pins
(iii) For each macrocell, either the flip flop output or the main combinatorial logic tree output
Each LAB can pick at most 40 of these signals to use.

Typically you will need 1 macrocell for each flip flop, plus one for each output which is generated by a combinatorial function rather than directly as the output of a flip flop. However you may need more if you have complex combinatorial functions (lots of product terms needed) or very high connectivity between parts of the device.

What software package are you using to compile your VHDL into a JEDEC file you can program onto the 1504?
If you're using Quartus plus POF2JED, it doesn't optimize very well for the 1504 because the 7064 which is the "equivalent" doesn't allow such a flexible allocation of resources - for example it doesn't allow separate output enables per macrocell, and it doesn't allow separate use of the flip flop for macrocells whose output is combinatorial.



Thanks for your prompt reply, just got into this, so it's going to take me a minute to absorb and wrap my head around that. To answer your question, Yes I'm using Quartus plus POF2JED and Yes I'm using the 7064 'equivalent' in Quartus. I think Atmel's solution you to request an evaluation? I didn't really want to pay for the software. I did slap down the cash for the Atmel programmer, but apart from that and them having the only current 5v CPLD's I'm not confining myself to them.


Top
 Profile  
Reply with quote  
PostPosted: Wed Jul 07, 2021 10:40 pm 
Offline
User avatar

Joined: Sat Sep 29, 2012 10:15 pm
Posts: 904
May I suggest avoiding quoting very large posts in entirety, especially immediately after?

_________________
In theory, there is no difference between theory and practice. In practice, there is. ...Jan van de Snepscheut


Top
 Profile  
Reply with quote  
PostPosted: Thu Jul 08, 2021 2:22 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8507
Location: Midwestern USA
jbaum81 wrote:
Yes I'm using Quartus plus POF2JED and Yes I'm using the 7064 'equivalent' in Quartus.

You likely will get better results if you use WinCUPL to program your CPLD. WinCUPL is free for the downloading. It can be a bit of a pain to use at times, and is somewhat touchy about syntax, strange characters in source files, etc. However, WinCUPL intimately understands the features unique to the 150x CPLDs, especially logic doubling, which can often make a design fit in cases where it normally would not.

If you decide to use WinCUPL, start out by only assigning pin numbers to your clock and reset signals. Your clock signal should come in on GCLK1, and reset should come in on GCLR. All other pins should be declared without pin numbers. During the fit phase of compiling your design, the fitter will assign pin numbers for you in a way that will distribute use of macrocells to achieve least usage. You can manually assign pin numbers but may exceed the maximum number of PTs per macrocell, in which case your design will not fit. The .FIT file will contain the details of how your design was fitted to the device, as well as a summation of resource usage. At the end of the .FIT file, you will see DESIGN FITS if all went well.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Thu Jul 08, 2021 3:48 am 
Offline
User avatar

Joined: Tue Mar 05, 2013 4:31 am
Posts: 1385
I've been using WinCUPL, but so far, only simple decode logic using the ATF22V10 and ATF16V8. Fortunately, I've had success with these and I plan to continue using single glue logic going forward. With my last Mouser order, I picked up a couple AT15xx devices (PLCC-44) and their programmer. My goal is to use these for my next Pocket SBC, which is yet more integration.

So... I'm wondering if you would have some sample code for WinCUPL that can be used to show how the fitter selects the pins automatically and hopefully with the additional code for the simulator. I'd certainly prefer to attempt learning the more complex devices by someone else's examples :wink:

_________________
Regards, KM
https://github.com/floobydust


Top
 Profile  
Reply with quote  
PostPosted: Thu Jul 08, 2021 12:37 pm 
Offline
User avatar

Joined: Wed Aug 05, 2020 8:41 pm
Posts: 47
Location: Montreal, QC, Canada
I would definitely love to learn how to program CPLDs. I already know the basics of SPLDs like the 22v10 using WinCUPL. Any definitive guide you recommend?

_________________
Fred Segard
A.K.A. The Micro Hobbyist
https://6502sbc.blogspot.com/


Top
 Profile  
Reply with quote  
PostPosted: Thu Jul 08, 2021 3:19 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8507
Location: Midwestern USA
fredericsegard wrote:
I would definitely love to learn how to program CPLDs. I already know the basics of SPLDs like the 22v10 using WinCUPL. Any definitive guide you recommend?

What you have already learned with the 22V10 can be applied to a CPLD. Fundamentally, the devices are similar, supporting both combinatorial and registered logic. Where the CPLD has the advantage is, of course, in more resources and more I/O pins. Also, CPLDs can have buried logic and internal feedback paths that don't use actual pins as nodes (refer to PINNODE in CUPL). Using buried logic, it is possible to configure a state machine that can do things such as act as a blitter or a DMA controller.

You may find the CUPL programming manual to be useful. The attached copy was OCRed from the original published by Logical Devices in the 1990s, so it may have some defects, such as missing images. However, it can be considered authoritative.

Attachment:
cupl_reference.pdf [814.53 KiB]
Downloaded 97 times

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Thu Jul 08, 2021 3:27 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8507
Location: Midwestern USA
floobydust wrote:
So... I'm wondering if you would have some sample code for WinCUPL that can be used to show how the fitter selects the pins automatically and hopefully with the additional code for the simulator. I'd certainly prefer to attempt learning the more complex devices by someone else's examples :wink:

Here's the code from something on which I am currently working. Note that most of the declared I/O pins do not have numbers assigned. The fitter takes care of that.


Attachments:
File comment: CPLD Logic File
logic.txt [7.76 KiB]
Downloaded 93 times

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!
Top
 Profile  
Reply with quote  
PostPosted: Thu Jul 08, 2021 4:47 pm 
Offline

Joined: Fri Dec 21, 2018 1:05 am
Posts: 1120
Location: Albuquerque NM USA
floobydust wrote:
So... I'm wondering if you would have some sample code for WinCUPL that can be used to show how the fitter selects the pins automatically and hopefully with the additional code for the simulator. I'd certainly prefer to attempt learning the more complex devices by someone else's examples :wink:


Daryl's 65SPI is written in WinCUPL and it is quite sophisticated. I have converted it to Altera schematic here. viewtopic.php?f=4&t=1265&hilit=65spi&start=75#p81413

I think 65SPI is a good example of complicated design with buried registers and state machine using WinCUPL. I don't know how Daryl did it, but if I'm forced to design in WinCUPL, I'll draw out the schematic in Quartus and simulate it and then convert the netlist to WinCUPL.

On second thought, there may be a netlist output for Quartus schematic that can be post processed into WinCUPL files...
Bill


Top
 Profile  
Reply with quote  
PostPosted: Fri Jul 09, 2021 4:37 am 
Offline

Joined: Wed Jun 02, 2021 1:23 am
Posts: 25
BigDumbDinosaur wrote:

You likely will get better results if you use WinCUPL to program your CPLD. WinCUPL is free for the downloading. It can be a bit of a pain to use at times, and is somewhat touchy about syntax, strange characters in source files, etc. However, WinCUPL intimately understands the features unique to the 150x CPLDs, especially logic doubling, which can often make a design fit in cases where it normally would not.


I started out doing my PALs in WinCUPL, didn't know it did the 1504's, it doesn't use VHDL though does it? The reference material isn't exactly clear.

P.S. I see your name come up all the time and have referenced several of your posts, I'm getting the impression your somewhat of a legend; Thank you for your contributions, and your direct help.




fredericsegard wrote:
I would definitely love to learn how to program CPLDs. I already know the basics of SPLDs like the 22v10 using WinCUPL. Any definitive guide you recommend?


Attached is the pretty much the exact same logic contained within my original post, but done in WINCUPL over 2x F22LV10C's, the latching is and decoding on the $00 and $01 addresses are done through a couple resettable flipflops. both sets of code work at nearly 16mhz, my rom being my speed limiter.


Attachments:
JB6502 PALs.zip [1.09 KiB]
Downloaded 68 times
Top
 Profile  
Reply with quote  
PostPosted: Fri Jul 09, 2021 6:24 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8507
Location: Midwestern USA
jbaum81 wrote:
BigDumbDinosaur wrote:

You likely will get better results if you use WinCUPL to program your CPLD. WinCUPL is free for the downloading. It can be a bit of a pain to use at times, and is somewhat touchy about syntax, strange characters in source files, etc. However, WinCUPL intimately understands the features unique to the 150x CPLDs, especially logic doubling, which can often make a design fit in cases where it normally would not.

I started out doing my PALs in WinCUPL, didn't know it did the 1504's, it doesn't use VHDL though does it? The reference material isn't exactly clear.

CUPL has no relationship to VHDL. All of the Atmel PLDs can be programmed with CUPL. Originally, CUPL was a DOS program, but was "Windowized" sometime around the late 1990s. The "Windowizing" likely introduced some of the bugs that are encountered.

Quote:
P.S. I see your name come up all the time and have referenced several of your posts, I'm getting the impression your somewhat of a legend; Thank you for your contributions, and your direct help.

I dunno about the "legend" part. But thanks for the recognition. Every once in a while I have some lucid thoughts and manage to put them onto "paper." :D

Quote:
Attached is the pretty much the exact same logic contained within my original post, but done in WINCUPL over 2x F22LV10C's, the latching is and decoding on the $00 and $01 addresses are done through a couple resettable flipflops. both sets of code work at nearly 16mhz, my rom being my speed limiter.

In your code, I see:

Code:
BNK = !A15 & !A14 & !A13 & !A12 & !A11 & !A10 & !A9 & !A8 & ZPI;
!ROM    = A15 & A14 ;
!HIRAM = A15 & !A14 & A13;
!IO = A15 & !A14 & !A13 & A12 & A11 & A10 & A9 & A8;

...snip...

!CLKWR = CLK & !RW;
!OELOW = RW;

...snip...

!RST = ARST;

When you have nothing better to do, try declaring the above pins as low-true, e.g., PIN 23 = !RST, rewrite the equations to use positive logic, e.g. RST = !ARST, recompile and then examine the fitter log (<project>.FIT). You may see a reduction in the number of PTs used to fit your design to the GAL.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Sun Jul 11, 2021 12:49 am 
Offline

Joined: Wed Jun 02, 2021 1:23 am
Posts: 25
Haha always something todo. Just fixed my expansion card, was totally fine, just a crap quality plcc socket with crushed pins. Also just finally got my monitor program running so i can now view and write memory addresses which has now allowed me to start talking to my fpga withou having to swap out roms. Very exciting progress last few days


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 42 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: