📄 iobarrier
字号:
README on the IOBARRIER for CardEngine IO=========================================Due to an unfortunate oversight when the Card Engines were designed,the signals that control access to some peripherals, most notably theSMC91C9111 ethernet controller, are not properly handled.The symptom is that some back to back IO with the peripheral returnsunreliable data. With the SMC chip, you'll see errors about the bankregister being 'screwed'.The cause is that the AEN signal to the SMC chip does not transitionfor every memory access. It is driven through the CPLD from the CS7line of the CPU's static memory controller which is optimized toeliminate unnecessary transitions. Yet, the SMC requires a transitionfor every write access. The Sharp website has more information aboutthe effect this power-conserving feature has on peripheralinterfacing.The solution is to follow every write access to the SMC chip with anaccess to another memory region that will force the CPU to release thechip select line. It is important to guarantee that this accessforces the CPU off-chip. We map a page of SDRAM as if it were anuncacheable IO device and read from it after every SMC IO writeoperation. SMC IO BARRIER IOOnly this sequence is important. It does not matter that there is noBARRIER IO before the access to the SMC chip because the AEN latchonly needs occurs after the SMC IO write cycle. The routines thatimplement this work-around make an additional concession which is todisable interrupts during the IO sequence. Other hardware devices(the LogicPD CPLD) have registers in the same the physical memoryregion as the SMC chip. An interrupt might allow an access to one ofthose registers while SMC IO is being performed.You might be tempted to think that we have to access another deviceattached to the static memory controller, but the empirical evidenceindicates that this is not so. Mapping 0x00000000 (flash) and0xc0000000 (SDRAM) appear to have the same effect. Using SDRAM seemsto be faster. Choosing to access an undecoded memory region is notdesirable as there is no way to know how that chip select will be usedin the future.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -