FPGA Intellectual Property
PCI Express*, Networking and Connectivity, Memory Interfaces, DSP IP, and Video IP
6526 Discussions

Problem in ALTASMI IP quartus ver 12.1 with ECPS device

Altera_Forum
Honored Contributor II
960 Views

The current IP ALTASMI parallel is not working with ECPS64 in quartos ver 12.1, windows 64 bit, Cyclone iV. 

 

The problem is that your IP sample the data at negedge of the clock and it should sample at posedge of the clock. 

After the correction it work OK 

 

Please look at the different at attach files. My change start at “//MN start” and end at “//MN” 

 

Another issue: 

The clk to the ASMI chip is never stop even when I push the reset line to hi. 

It should be stop at reset, since this IP consume a lot of power while it is in reset mode.
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
263 Views

The observed behaviour, sampling of serial flash data output at falling DCLK edge has been preserved in the recent ALTASMI IP. But apparently it doesn't usually cause problems. According to the datasheet specification, all EPCS respectively M25Pxx devices have 0 ns minimal output hold time. But you still have sufficient FPGA DCLK output and DATA0 input delay to read valid data.  

 

There may be problem because the clock output is directly connected to ALTASMI clkin. So in special cases, the ALTASMI registers might undergo a larger routing delay than DCLK, eating up the positive slack created by the IO delay. Timing constraints can avoid this situation. 

 

But I agree that the serial flash interface is slow enough to switch from late to center MISO sampling, as apparently achieved in the suggested mod by michanisani. 

 

The other point, unwanted continuous DCLK demands for code modification anyway. A possible fix is gating logic for DCLK, as in the below VHDL snippet. It's designed in a way that not glitches during nCS activation occur. As a side effect, DCLK will be delayed so that the need for changing the sampling edge has been probably obsoleted.  

 

clkin_gated <= clkin_wire OR (scein_wire AND scein_delayed); process (clkin_wire, reset) begin if reset = '1' then scein_delayed <= '1'; elsif rising_edge(clkin_wire) then scein_delayed <= scein_wire; end if; end process; cycloneii_asmiblock2 : cycloneii_asmiblock PORT MAP ( data0out => wire_cycloneii_asmiblock2_data0out, dclkin => clkin_gated, --originally clkin_wire, oe => oe_wire, scein => scein_wire, sdoin => wire_cycloneii_asmiblock2_sdoin ); 

 

If you don't want to edit the ALTASMI code, you can also connect the EPCS pins explicitely and put the gating logic between ALTASMI and the external pins.
0 Kudos
Reply