Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
12 years ago

Interfacing 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's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored 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's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored 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's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored 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's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored 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's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored 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's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored 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.