Congrats! That's so cool to see the packet, what a great feeling. I want to say I really appreciate all the documentation and explanations you've put in your source code. For someone with only software knowledge, it's been quite enlightening.
Thanks! Don't put too much stock in what I have to say, at least until I get the whole thing working!
The commenting might be a little bit on the excessive side but I find that it helps a lot in the process of wrapping my head around what's going on. I'd like to turn it into a more structured writeup some day, but I'm not a Websites Person and the idea of setting up a blog is actually kind of intimidating to me!
I just realised that I'd forgotten to push the last few day's worth of changes up to Github, so there's a little bit more to peruse there (mostly just some refactoring, plus my quick 'n dirty memory test/benchmark tool).
I hadn't realized CLKOUT defaulted to 4 MHz. That means your timings must 'work' (even slowly) at 4 MHz so that the CPU can reprogram COCON to generate the 25 MHz clock, I suppose? Annoying chicken-and-egg problem
It seems to work well enough; it's stable at 4MHz (with a whopping 500ns DSACK delay), and there's a noticeable speedup when I bump it up to 25MHz for the optimal 80ns delay. The scope trace in my previous post shows the ENC624J600's chip select on the top, and my wait-state output on the bottom (high = suppress /DSACK, low = enable /DSACK). Haven't seen any glitches.
The IIfx PDS will run at an apparent 20 MHz when using a pseudo-slot device in $E. It's a weird design.
Theoretically, you can alternatively use $7 ("fast slot space area") to get all the signals at 'native' speed of 40 MHz. I don't know of any design doing that, one of the reason being the IIfx doesn't expose it's 40 MHz clock, only the 20 MHz one... But your design currently doesn't need the CPU clock. So you might be able to try 40 MHz bus operation to see if it improves performance (assuming you can improve timings a bit, perhaps pusing CLKOUT to 33 MHz to get finer tuning).
Downside is, $7 is not enumerated by the Slot Manager. So either the driver need to trust the hardware is here, or you could just have a DeclRom in $E declaring a device in $7.
Huh, interesting! The IIfx was really an incidental target since I had the machine lying around and realised that it'd be a lot less hassle to get to the card than in the SE/30. I'd read up on the 20MHz pseudoslot-$E operation, but I hadn't thought about fast slot space at all. I'm not stranger to the 'slow the CPU down for different address spaces' trick though - my last couple of
hardware projects have been for the 8-bit BBC/Acorn systems, which employ that strategy in a brute-force way by stretching the CPU clock! Makes for all sorts of fun dealing with the timing ambiguities and control-line glitches that result from it.
I think with the ENC624J600's timing requirements (75ns from selection to data-ready on read, must remain unselected for 40ns after a write), it's probably not going to see much benefit from going any faster, but it has got me thinking about how to optimize things in the next CPLD-based revision where I'll have more gates to play with. Right now I'm delaying /DSACK by 80ns for all accesses, but that could be skipped for writes. Much to think about.
It'll be very interesting to compare actual ethernet performance with my NuBus ethernet card, too. I wonder what a good test methodology would be; I found an early predecessor to
iperf that can build and run under A/UX, but most people would probably be more interested in performance on Mac OS. I'm sure there must be some network-benchmark tools out there, anyone aware of any?
I might also have to recruit some SE/30 owners with other ethernet cards to compare against!
An so you should be
Very, very well done. :-D This is really cool.
That's incredibly encouraging to hear that from both of you! Your hardware projects and writeups have been inspirational and informative and I certainly don't think I'd have been brave enough to embark on this project without having seen what you've done.
Also, just to add, I haven't forgotten about the SE board either! My SE suffered a very unfortunately-timed hard disk failure last week and it's out of commission until I get a drive emulator for it.