Boosting STFM: 16MHz bus, 64MHz Shifter

Blogs & guides and tales of woo by forum members.
User avatar
exxos
Site Admin
Posts: 2887
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Re: Boosting STFM: 16MHz bus, 64MHz Shifter

Post by exxos » Wed Mar 07, 2018 12:50 pm

can you add some delay to the cpu clock and try ?
4MB STFM 1.44 FD- VELOCE+ 020 STE - 4MB STE 32MHz - STFM 16MHz - STM - MEGA ST - Falcon 030 CT60 - Atari 2600 - Atari 7800 - Gigafile - SD Floppy Emulator - PeST - HxC - CosmosEx - Ultrasatan - various clutter

https://www.exxoshost.co.uk/atari/ All my hardware guides - mods - games - STOS
https://www.exxoshost.co.uk/atari/last/storenew/ - All my hardware mods for sale - Please help support by making a purchase.

troed
Posts: 237
Joined: Mon Aug 21, 2017 10:27 pm

Re: Boosting STFM: 16MHz bus, 64MHz Shifter

Post by troed » Wed Mar 07, 2018 2:00 pm

troed wrote:
Wed Mar 07, 2018 12:14 pm
(I have of course tried with two different drives ;))
... but why not assume that a drive suddenly went bad and then another drive also had gone bad?

Just brought down another one of my 1040 STFM to once and for all see the clocks, exactly, when in stock. Opened it up and it was the exact same motherboard revision with SMT MMU and GLUE. Nice! I had no drive in it so I moved over the one from the modded STFM and ... it didn't work. The floppy, that is.

So I fetched yet another one of my drives from the pile and that one did. So, starting to suspect the most horrible of all scenarios, I took that drive and put into the modded STFM ...

... and it worked.

GAH. I've probably had floppy working for ages without knowing it, since both of the drives I tested with were bad :/

wrong: In any case. With the clocks synced on the falling edge I now have the exact same floppy issue (still) as I had when I used the F161, where they were also synced on the falling edge. Sometimes it works to read floppy content, often it doesn't (and produces corrupt data etc). This I solved then with adding some skew.

edited: No, I remembered wrong. The floppy issues are the same as when I _didn't_ use the F161. They were solved when I started using it. So this is very strange since the GAL and F161 both produce clocks synced on the falling edge. Hmm.

Will play around with it. Also, when in stock mode (where all clocks should be exactly as original) for some reason my Unicorn USB adapter didn't see the USB flashdrive - which it did in the one boot I managed to do in "mode 2" (original Stefan-mod as described with Shifter normally clocked).

So, for the first time since I started out on this quest, here's the original "2x with normal ST resolutions" result ;)

(I did have the wrap-around issue to the left, this will also be interesting to see what the proper solution is for. Should have a better chance of solving it with the GAL controlling the clocks)
stefan_gembench.png
stefan_gembench.png (108.17 KiB) Viewed 431 times

troed
Posts: 237
Joined: Mon Aug 21, 2017 10:27 pm

Re: Boosting STFM: 16MHz bus, 64MHz Shifter

Post by troed » Wed Mar 07, 2018 3:24 pm

troed wrote:
Wed Mar 07, 2018 2:00 pm
The floppy issues are the same as when I _didn't_ use the F161. They were solved when I started using it. So this is very strange since the GAL and F161 both produce clocks synced on the falling edge. Hmm.
Ah, no, there is a difference. With the F161, all _derived_ clocks are synced on the falling edge, on the rising edge of the F161 itself. That one I clocked with the same clock as the MMU got. I.e, with the F161 all downstream clocks were skewed compared to the MMU.
new_clocks.png
new_clocks.png (138.53 KiB) Viewed 426 times
This is where I later clocked the CPU with the MMU output instead of the F161-derived clock instead, causing a skew towards both MMU and GLUE, to get to 200% RAM boost instead of 100%.

The GAL however produces clocks that are _all_ in sync on the falling edge. So this is indeed a difference.

I'll switch to the stock STFM now and see exactly what the stock clocks look like on my LA (and maybe scope) and then replicate that first for stock and see what if any changes need to be done in the boosted modes.

troed
Posts: 237
Joined: Mon Aug 21, 2017 10:27 pm

Re: Boosting STFM: 16MHz bus, 64MHz Shifter

Post by troed » Wed Mar 07, 2018 4:19 pm

So here's what my LA sees when I look at the unmodified STFM. Clocks taken from Shifter (32MHz), MMU (16), CPU/GLUE/etc (8MHz) and MFP (4)

(I capture at threshold value 2.8V)
stock_clocks.png
stock_clocks.png (289.13 KiB) Viewed 421 times

User avatar
exxos
Site Admin
Posts: 2887
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Re: Boosting STFM: 16MHz bus, 64MHz Shifter

Post by exxos » Wed Mar 07, 2018 5:25 pm

ah right, so this could be why there was a inverter? between the shifter and MMU clock.. I did wonder if the inverter was actually needed, I think I replaced with a buffer and I think it was just there to add some clock delay. As if you delay the 32mhz to the MMU by some ns then it would appear to sync to the falling edge of the clock instead. Though that could be a issue with just 1 GAL as I don't think you can daisy chain delays in a GAL like you can with normal LS series stuff :roll:

I'm a bit confused as to what is working with what timings currently... does it work with all the clocks generated from the GAL and in sync ?
4MB STFM 1.44 FD- VELOCE+ 020 STE - 4MB STE 32MHz - STFM 16MHz - STM - MEGA ST - Falcon 030 CT60 - Atari 2600 - Atari 7800 - Gigafile - SD Floppy Emulator - PeST - HxC - CosmosEx - Ultrasatan - various clutter

https://www.exxoshost.co.uk/atari/ All my hardware guides - mods - games - STOS
https://www.exxoshost.co.uk/atari/last/storenew/ - All my hardware mods for sale - Please help support by making a purchase.

troed
Posts: 237
Joined: Mon Aug 21, 2017 10:27 pm

Re: Boosting STFM: 16MHz bus, 64MHz Shifter

Post by troed » Wed Mar 07, 2018 5:58 pm

exxos wrote:
Wed Mar 07, 2018 5:25 pm
I'm a bit confused as to what is working with what timings currently... does it work with all the clocks generated from the GAL and in sync ?
Currently I have GLUE offset from CPU similar to what I did with the F161 to get 200% RAM boost. Will test with all in sync as well.

However, I think at the moment it's much more stable with the LA connected to all clocks than without. I'm only using 33 Ohm resistors in series, I'm thinking to up that to 100. Or add some capacitance. Not sure why the GAL output has ringing clocks ... I think it's finally time to test out my scope ;)

tl;dr: Floppy runs fine in all modes, _with_ the LA attached. The Unicorn (ACSI device) is _only_ working as it should in the boosted modes, not with stock clocks for some reason.

User avatar
rpineau
Posts: 282
Joined: Thu Aug 17, 2017 6:08 pm
Location: USA
Contact:

Re: Boosting STFM: 16MHz bus, 64MHz Shifter

Post by rpineau » Wed Mar 07, 2018 6:56 pm

If you feed an output of the gal to one if its input and so on you can add the delay. This of course doesn't work if you do that internally in the equations. The issue is that it takes more pins.

troed
Posts: 237
Joined: Mon Aug 21, 2017 10:27 pm

Re: Boosting STFM: 16MHz bus, 64MHz Shifter

Post by troed » Wed Mar 07, 2018 7:31 pm

Yeah I've already used all the outputs of a 16V8/20V8 :)

Combinatorial:
1) System Clock (wired to GAL clock input)
2) Shifter clock
3) MMU DE

Registered (clocked):
4) MMU clock
5) CPU clock
6) GLUE clock
7) MFP clock
8) 2MHz (used internally for DE AND expression)

Inputs:
1) 64.000MHz
2) 32.08MHz
3) DE
4) Switch 1
5) Switch 2

The delay I have to play with in the output expressions is the MMU cycle. I'll post the complete GAL code once I'm satisfied with the clock relationships.

User avatar
exxos
Site Admin
Posts: 2887
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Re: Boosting STFM: 16MHz bus, 64MHz Shifter

Post by exxos » Wed Mar 07, 2018 9:44 pm

troed wrote:
Wed Mar 07, 2018 5:58 pm
However, I think at the moment it's much more stable with the LA connected to all clocks than without. I'm only using 33 Ohm resistors in series, I'm thinking to up that to 100. Or add some capacitance. Not sure why the GAL output has ringing clocks ... I think it's finally time to test out my scope ;)
I've had issues that once I "split" the 8mhz clock and ran it via a GAL instead, the GLUE screws up... The 8mhz line (at least on the boards I work with) depend on the "load" of the GLUE etc. So I actually resorted to adding 50pF onto the 8Mhz line to "load" it like the GLUE did to clamp down on some ringing.

The problem with these MHz speeds, when you start getting over 33R the voltages soon start to fall.. So you need to be careful and check with a scope to see what is going on while increasing the resistance values.

Ringing in general is a huge problem, mostly why I do 4 layer PCB's now and use whole layers for 5V and 0V to help stop ground bounce which is a main cause of ringing on outputs. To give you a idea, I had 2V "bounce" in just 1cm of track length on a earlier V2 prototype! I documented it a couple of times. It made the GAL outputs appear to be 7V+ :twisted:
4MB STFM 1.44 FD- VELOCE+ 020 STE - 4MB STE 32MHz - STFM 16MHz - STM - MEGA ST - Falcon 030 CT60 - Atari 2600 - Atari 7800 - Gigafile - SD Floppy Emulator - PeST - HxC - CosmosEx - Ultrasatan - various clutter

https://www.exxoshost.co.uk/atari/ All my hardware guides - mods - games - STOS
https://www.exxoshost.co.uk/atari/last/storenew/ - All my hardware mods for sale - Please help support by making a purchase.

User avatar
exxos
Site Admin
Posts: 2887
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Re: Boosting STFM: 16MHz bus, 64MHz Shifter

Post by exxos » Wed Mar 07, 2018 9:52 pm

rpineau wrote:
Wed Mar 07, 2018 6:56 pm
If you feed an output of the gal to one if its input and so on you can add the delay. This of course doesn't work if you do that internally in the equations. The issue is that it takes more pins.
IIRC when I tried it, it didn't work. I tried to buffer the 8MHz clock via a GAL, got about 10ns delay first IO chain, then I linked IO pins in series to gain a bank of 10ns per "gate" and it didn't work. Delays were always 10ns total even though I was going in and out of 8 IO pints. I think there might have been 1ns extra delay, but I didn't spend much time investigating it. I could have messed something up..

@troed maybe you can try a series delay and see what happens ?
4MB STFM 1.44 FD- VELOCE+ 020 STE - 4MB STE 32MHz - STFM 16MHz - STM - MEGA ST - Falcon 030 CT60 - Atari 2600 - Atari 7800 - Gigafile - SD Floppy Emulator - PeST - HxC - CosmosEx - Ultrasatan - various clutter

https://www.exxoshost.co.uk/atari/ All my hardware guides - mods - games - STOS
https://www.exxoshost.co.uk/atari/last/storenew/ - All my hardware mods for sale - Please help support by making a purchase.

Post Reply