Forum Discussion
Altera_Forum
Honored Contributor
13 years agoInterfacing FPGA with real hardware
Hello
I'm newbee with FPGA and CPLD and start using them since the beginning of the year. I've finished an hardware for my old 8bit computer and all work well (interface CF) I've put a 27128 on the PCB for the bios but I really like to include it in the Cyclone II. I've created a megafuction ROM-1port filled with my rom. Now the problem is how to do that. I need /OE /CE to interface to the computer. Anyone can help me please ?9 Replies
- Altera_Forum
Honored Contributor
IIRC the megafunction ROM has a rden (read enable) input.
Then, you must provide simple glue logic to interface /OE /CE signals coming from external processor. A single AND with negated inputs (namely active high OE, CE) could be enough: rden = OE AND CE You also need to tristate the FPGA-ROM data output when /OE il high, to avoid bus contention. The megafunction ROM also requires a clock. Use any clock available in fpga. Take care it has a period shorted than the processor read cycle; if you can't accomplish this, your processor should add wait states for ROM reads. - Altera_Forum
Honored Contributor
Oh no :(
rden is only available with Cyclone III - Altera_Forum
Honored Contributor
It's OK, you just need to add some logic yourself to achieve the desired behavior.
Are you using HDL or schematic entry? - Altera_Forum
Honored Contributor
schematic entry
- Altera_Forum
Honored Contributor
Do not worry about the "rden" port. What it does is disable the ROM read logic to save a bit of power. It does not put the ROM's outputs in high impedance, as you need.
In fact, FPGAs only truly support high impedance in the pins' output buffers, so no internal logic blocks actually use tri-state. So, what you need to do is to add a ROM block, then connect the ROM blocks to tri-state output buffers (alt_outbuf_tri?) and those to the pin. Add a bit of logic to tri-state the buffers when /OE or /CE is "1". And you're done. - Altera_Forum
Honored Contributor
Thanks for your help
I've done this : https://www.alteraforum.com/forum/attachment.php?attachmentid=7035 I have a 275023 error :width mismatch in D7[7..0] I can't change node to bus in the alt_outbuf_tri. - Altera_Forum
Honored Contributor
--- Quote Start --- I have a 275023 error :width mismatch in D7[7..0] --- Quote End --- The only problem I see is that the bus has the same name at both sides of the buffer which can't work. - Altera_Forum
Honored Contributor
Can't help there, I'm clueless about Quartus schematic entry.
I strongly recommend you learn to use an HDL for your designs. - Altera_Forum
Honored Contributor
--- Quote Start --- I can't change node to bus in the alt_outbuf_tri. --- Quote End --- Double click the bus conduit on the left of alt_outbuf and modify the name.