3
\$\begingroup\$

I'm building a system in Quartus according to this question

How to upgrade a Quartus II project from SOPC to QSys?

Now a part of the problem is how to assign clock/reset pins to my sram. In Quartus I don't have the options.

enter image description here

enter image description here

Can you help me?

Update

The suggested changes did not work for me as Quartus displays error messages that I can't interpret:

enter image description here

Update 18:07 130828

Now I only have 1 error left in the component editor:

Error: reset_sink: Synchronous edges DEASSERT requires associated clock

What does it mean?

enter image description here

\$\endgroup\$
2
  • 1
    \$\begingroup\$ Can you paste what is shown on the signals view? One of them must be incorrectly assigned as you do not have any clocks to choose from. \$\endgroup\$
    – shuckc
    Aug 27, 2013 at 14:52
  • \$\begingroup\$ @shuckc Thanks for the info, I pasted the signals view that is suspect. \$\endgroup\$ Aug 27, 2013 at 21:05

1 Answer 1

2
+50
\$\begingroup\$

You need to add clock and reset signals to the source code (VHDL) for this block. Then refresh the ports list in Component Editor and set the Interface type to be Clock Sink and Reset Sink for those signals. It looks like SOPC Builder would let you design a totally combinatorial block and ignore the warnings about no clock specified on the Avalon-MM interface, QSYS requires it.

library ieee;
use ieee.std_logic_1164.all;
entity de2_sram_controller is
port (
signal clock : in std_logic;
signal reset : in std_logic;
signal chipselect : in std_logic;
signal write, read : in std_logic;
signal address : in std_logic_vector(17 downto 0);
signal readdata : out std_logic_vector(15 downto 0);
signal writedata : in std_logic_vector(15 downto 0);
signal byteenable : in std_logic_vector(1 downto 0);
signal SRAM_DQ : inout std_logic_vector(15 downto 0);
signal SRAM_ADDR : out std_logic_vector(17 downto 0);
signal SRAM_UB_N, SRAM_LB_N : out std_logic;
signal SRAM_WE_N, SRAM_CE_N : out std_logic;
signal SRAM_OE_N : out std_logic
);
end de2_sram_controller;
architecture dp of de2_sram_controller is
begin
SRAM_DQ <= writedata when write = '1'
else (others => 'Z');
readdata <= SRAM_DQ;
SRAM_ADDR <= address;
SRAM_UB_N <= not byteenable(1);
SRAM_LB_N <= not byteenable(0);
SRAM_WE_N <= not write;
SRAM_CE_N <= not chipselect;
SRAM_OE_N <= not read;
end dp;

Then configure as follows:

QSYS Component

enter image description here

\$\endgroup\$
3
  • \$\begingroup\$ Thak you but I'm getting new incomprehesnible error messages and the input text for the clock turned red. It's not working and I'm stuck. \$\endgroup\$ Aug 28, 2013 at 12:01
  • 1
    \$\begingroup\$ On interfaces, click "Remove interfaces with no signals". Also I've edited the answer as should be clock sink and reset sink (not source) \$\endgroup\$
    – shuckc
    Aug 28, 2013 at 13:07
  • \$\begingroup\$ Very good to reduce the errors, now I don't think that I got any more component errors and only 2 errors left when I want to build the system: electronics.stackexchange.com/questions/80835/… \$\endgroup\$ Sep 5, 2013 at 3:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.