4 ms·
This was quite common. You only decode out as much as you need and if that results in phantom appearances of devices or ROM as long as it doesn't interfere with
by jacquesm 6y ago
This was quite common. You only decode out as much as you need and if that results in phantom appearances of devices or ROM as long as it doesn't interfere with the operation of the device that is perfectly ok. Memory map aesthetics are important but sometimes circuit simplicity is more important.
- yjftsjthsd-h 6y agoThat's fair; I hesitated to call it buggy, because a well-understood bug that's documented and easy to work around or ignore and which nets you some benefit is only barely a bug at all.
- mng2 6y agoI'd classify it under "hack that is fine if you know what you're doing". Fancier 68K systems would use a PAL for address decoding, primitive programmable logic.
- jacquesm 6y agoPALs are expensive and required programming '138s and '154s were cheap and work out of the box.
- noone_youknow 6y agoI used to feel that way, until I replaced about ten 7400 series in my address decoder with one 16v8 that costs around a dollar and frees me from propagation delay concerns... YMMV of course :)
- kiwidrew 6y agoYes but how long is Microchip going to continue producing the 16V8? They're the only remaining manufacturer. At least with 74xx138 decoders you have several suppliers available -- not to mention the choice of multiple logic families to select from. If you're willing to accept address aliasing (i.e. chips appearing at more than one memory address) you can simply use multiple '138 decoders in parallel to make a 1-of-24 or 1-of-32 decoder. In fact that's precisely why the '138 has so many enable inputs: the one active high (G1) and two active low (~G2A and ~G2B)enable inputs let you build a 1-of-24 decoder using three '138 chips and zero additional glue.
- LIV2 6y agoDoesn't matter too much for hobby projects though, even if they go EOL there's still plenty on eBay.
- noone_youknow 6y agoFair point, but I happen to have a few thousand ATF16V8BQLs in stock, so I'm not worried for the time being :) Originally (on breadboard) the project didn't use any programmable logic, but board space dictated that I switch to them when I did the first PCB.
- jacquesm 6y agoThat's the difference between doing it professionally and doing it on a hobby budget.
- Taniwha 6y agoI think it's still 'buggy' if the result is a bus fight (that might actually damage chips)
- jacquesm 6y agoIt shouldn't, normally unless you designed the map wrong. That would be a real fault. In some systems it was possible to use dynamic map changes to position ROM over RAM and then to do weird things like getting the CPU to write to ROM but I've never heard of that actually damaging anything though speculation that in a tight loop that should be possible was rampant. We sure tried ;) But when decoding banks of addresses you'd typically decode just one chip at the time, but possibly in multiple locations, otherwise vacant.
- TomVDB 6y agoThey are probably using A[19] as chip select for one device, A[18] for a different one, etc. So if you read from 0x000c0000, you get a conflict. I wouldn't call it a bug if it's done deliberately to save some gates. :-)
- jacquesm 6y agoHeh, clever. But you'd be even smarter to hook A19 to ~CS and A18 to ~EN to get the same effect without the conflict.
- compiler-guy 6y agoThat would require two additional NOT gates, which, in turn, would require an additional chip, which given the layout of the board, would require additional board space. But what would the benefit be, other than a somewhat cleaner address space? You don't get to actually use the space that isn't mapped in this scenario--RAM, or whatever, doesn't magically appear there. You also end up having to worry about additional gate delay. So, from the software's perspective, you go from, "Don't use these addresses, unpredictable things will happen." to "Don't use these addresses, nothing will happen." Either way, code that uses these addresses is buggy. So you are paying extra hardware for very minimal benefit.
- userbinator 6y agoPartial decoding, causing aliases, is indeed common and mostly not a problem. What this system appears to have is overlapping decoding. I can't say I've seen any system until now that was deliberately designed that way.