Forum Discussion

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

Qsys and tristate bridge

Hi,

I found the following anomaly with Qsys:

I was trying to convert one of my SOPC designs to Qsys. Many of the Altera development kits have a shared SSRAM and Flash interface on a shared bus. When converting the SOPC design to Qsys, the tool converts all interfaces including a Tri State Conduit Bridge, Tri State Conduit Pin Sharer and the generic Tri State controllers.

Also, on the HDL example tab an example is generated for the (VHDL) instantiation of the Qsys system for usage in your toplevel.

For some weird reason signals that in fact are std_logic signals are shown as std_logic_vector with size 1.

The problem occurs when synthesizing the design. Although you could choose to interface to the pins of the FPGA as std_logic_vectors with size 1 (in fact a std_logic_vector(0 downto 0), it seems that the synthesis tools connects these toplevel pins to GND.

For my system this resulted in output enables, write enables and chip enables being tied to ground instead of proper connection to the wires of the Tri State Conduit Bridge.

The problem is probably caused by the fact that Qsys marks these signals as std_logic_vector(0 downto 0) while the corresponding generated Verilog code of the qsys system shows clearly single wire definitions.

I was able to solve this issue at the toplevel at the component instantiation of my qsys system by declaring these wires as std_logic.

This solver my problem and now the system runs ok again with SSRAM operating at 100+ MHz again..

Hope this info is useful for others

5 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I believe they intentionally set signals to std_logic_vector with a size of 1 to be consistent with the way they are indexed in Verilog. But the fact that these get tied to 0 instead of to their proper signals seems odd... Do you have access to file a service request at www.altera.com/mysupport? Sounds like Altera engineering should hear this one, and getting a copy of your example design would help!

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi,

    Please add your experience to Qsys Altera Wiki page at:

    http://www.alterawiki.com/wiki/new_qsys_issues

    Altera is monitoring the page so filing the issue here would certainly make them aware of it, and it would be good for other users too. I have added several issues I've encountered during the last couple of days.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi Steve,

    Yes, i will post a support request to Altera.

    Although Altera intentionally did it this way to remain compatible with verilog it is quite unconvenient.

    For example... some of the signals of the memory interfaces are not shared (for example the chip select lines). All the shared and unshared signals become available at the toplevel through the Tri-State conduit bridge.

    The strange thing is that all the signals are then also defined as inout bidirectional signals. Sounds strange to me for output signals that are not shared.

    Anyway.. it seems to be a synthesis issue which can only be discovered if you very thoroughly walk through the tremendous list of warnings. Then you will see that the synthesis tool connected these lines to GND.

    regards!
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi all,

    Thanks for posting this, though it doesn't appear to be on the wiki. Have found it quite by chance, but it's exactly the same problem I've encountered today with v11.0sp1! So your SR clearly did not produce any useful results. Am recompiling now and hopefully it will be fixed - had discovered that my ce_n and control signals weren't connected to the external pins anymore but hadn't until reading your post worked out why.

    Cheers,

    Simon