Altera_Forum
Honored Contributor
16 years agoBus mux issues
Hi all,
Im new to this forum and fairly new to CPLDS, so please bear with me I have got by with schematic entry so far, and hope to keep doing so for the time being. Anyway my issue is I am designing a full shadowing prom emulator using 2 srams, its not a conventional design as the a 16bit address and data bus is multiplexed into 8 data lines and 3 control lines but am using standard parallel bus srams. Ive managed to implement all the functions required except the bidirectional data bus. I need the host bus to connect to the 2 sram data buses and be bidirectional and have implemented them with lpm_bustri. The attached image shows how Ive done it. The Select Line should switch between the 2 and the Dir line controls the direction. When I test it the host bus is always tristate, its not driven at all, now if I take the two bottom and gates out and ground the 2 inputs to the tribus i can read data back from the sram, if I deassert the DIR line the bus goes tristate as expected. So it works in 1 direction from the ram to the host. Have I implemented it compleatly wrong ? Is it ok to tie the result and data togeather like I have done, if not how should I implement this ? Thankyou Andrew