Quantcast
Channel: Altera Forums
Viewing all 19390 articles
Browse latest View live

Board Trace Model and Advanced I/O Timing

$
0
0
Does the board trace model affect I/O timing during compilation or is it just used for post-compile analysis (TimeQuest and SSN Analyzer)? I can't seem to find a clear answer to that question anywhere in the docs.

Thanks,
Bob

How to fix QFP-144 package if you forgot the bottom ground pad on PCB.....

$
0
0
Our circuit board layout person forgot the mandatory ground pad underneath a Cyclone III EQFP-144 pin package. As a result, the JTAG byteblaster would not connect until it is grounded. None of the ground pins on the chip seem to be connected to that pad. Rather than drill a hole thru the bottom of the circuitboard and somehow solder to the ground pad (shorting out layers in between), we found a better solution....

At each corner of the package, the ground pad is connected to a part of the lead frame, the tiny end part of it is barely visible on the corner of the package. We used a tiny .0225 drill bit from Harbor Freight's tiny drill bit assortment and holding it parallel to the plane of the board dug in at a 45 degree angle until we could see more of that corner part of the lead frame. Next, we simply soldered a wire to it and ran it to ground. The chip now is recognized by JTAG and everything works! (See attached photos)
We successfully saved all 10 of our prototype boards with this method and it only takes a few minutes to do.

The only thing I was worried about is that ground pad on the package could short out un-tented vias and traces underneath the chip, but it seems the pins on the chip are slightly taller holding it up a tiny bit above the board, so everything seems to be OK.
Attached Images

VGA sync circuit

$
0
0
Can some one please tell me how this code increments the v_count_reg and h_count_reg?? because I just don't see it. Also what do they mean the output is buffered exactly? thanks in advanced

Code:





library IEEE;
use IEEE.STD_LOGIC_1164.ALL;




use IEEE.NUMERIC_STD.ALL;






entity vgaController is
    Port ( clk : in  STD_LOGIC;
                          reset : in STD_LOGIC;
          hsync : out  STD_LOGIC;
          vsync : out  STD_LOGIC;
          video_on : out  STD_LOGIC;
          p_tick : out  STD_LOGIC;
          pixel_x : out  STD_LOGIC_VECTOR (9 downto 0);
          pixel_y : out  STD_LOGIC_VECTOR (9 downto 0));
end vgaController;


architecture Behavioral of vgaController is
-- VGA 640 -by - 480 sync  p a r a m e t e r s
constant HD: integer:=640; --horizontal display area
constant HF: integer:=16 ; --h. front porch
constant HB: integer:=48 ; --h. back porch
constant HR: integer:=96 ; --h. retrace "Sync Pulse"
constant VD: integer:=480; -- vertical display area
constant VF: integer:=10 ; -- v. front porch
constant VB: integer:=33 ; -- v. back porch
constant VR: integer:=2  ; -- v. retrace "sync pulse"
-- mod-2 counter
signal mod2_reg, mod2_next : std_logic;--mod-2 counter to generate the 25-MHz enable tick
-- sync counters,  two counters for the horizontal and vertical scans
signal v_count_reg, v_count_next : unsigned(9 downto 0);
signal h_count_reg, h_count_next : unsigned(9 downto 0);


--To remove
--potential glitches, output buffers are inserted for the hsync and vsync signals. This leads
--to a one-clock-cycle delay. add a similar buffer for the rgb signal in the pixel
--generation circuit to compensate for the delay.
-- output buffer
signal v_sync_reg, h_sync_reg: std_logic;
signal v_sync_next ,h_sync_next : std_logic;
--status signal
signal h_end , v_end , pixel_tick: std_logic;


begin
        --register
        process(clk,reset)
                begin
                        if (reset='1') then
                                mod2_reg    <='0';
                                v_count_reg  <=(others=>'0');
                                h_count_reg  <=(others=>'0');
                                v_sync_reg  <='0';
                                h_sync_reg  <='0';
                        elsif(clk'event and clk='1')then
                                mod2_reg    <=mod2_next;
                                v_count_reg  <=v_count_next;
                                h_count_reg  <=h_count_next;
                                v_sync_reg  <=v_sync_next;
                                h_sync_reg  <=h_sync_next;
                        end if;
        end process;
       
        --mod-2 circuit to generate 25 MHz enable tick
        mod2_next <= not mod2_reg;
        -- 25 MHz pixel tick
        pixel_tick <= '1' when mod2_reg = '1' else '0';
       
        --status
        h_end <= --end of horizonal counter
                '1' when h_count_reg = (HD+HF+HB+HR-1) else --799
                '0';
        v_end <= --end of vertial counter
                '1' when v_count_reg = (VD+VF+VB+VR-1) else --524
                '0';
       
        -- mod-800 horizontal sync counter
        process(h_count_reg,h_end,pixel_tick)
                begin
                        if (pixel_tick='1') then --25 MHz tick
                                if h_end='1' then
                                        h_count_next <= (others=>'0');
                                else
                                        h_count_next <= h_count_reg+1;
                                end if;
                        else
                                h_count_next <= h_count_reg;
                        end if;
        end process;
       
        -- mode-525 vertical sync counter
        process(v_count_reg,h_end,v_end,pixel_tick)
                begin
                        if (pixel_tick='1' and h_end='1') then
                                if (v_end='1') then
                                        v_count_next <= (others=>'0');
                                else
                                        v_count_next <= v_count_reg+1;
                                end if;
                        else
                                v_count_next <= v_count_reg;
                        end if;
        end process;
       
        -- horizontal and vertial sync, buffered to avoid glitch
        h_sync_next <=
                '1' when (h_count_reg >= (HD+HF))  --656
                          and (h_count_reg <= (HD+HF+HR-1)) else --751
                '0';
               
        v_sync_next <=
                '1' when (v_count_reg >= (VD+VF))  --490
                    and (v_count_reg <= (VD+VF+VR-1)) else --491
                '0';
               
        --video on/off
        video_on <= '1' when (h_count_reg < HD) and (v_count_reg < VD) else '0';
       
       
        --output signals
        hsync <= h_sync_reg;
        vsync <= v_sync_reg;
        pixel_x <= std_logic_vector(h_count_reg);
        pixel_y <= std_logic_vector(v_count_reg);
        p_tick <= pixel_tick;
end Behavioral;


sorry for the rather stupid question.

TTTL finder / output and input

$
0
0
Hello,I want to create a circuit which has two inputs a clock and an enable and three outputs. What I want this circuit to do is that it has a variable (cont) that goes from "00" to "11" and two of the outputs (sal_1 and sal_2) take the values of cont(0) and cont(1) and go to the inputs of a ttl ic (AND , OR, XOR) and then the output of the ttl ic goes back to the circuit and is saved (results) after that, the vector that is created from the differents results of the ttl ic ouputs is compared with vectors already predefined and find the one that matches it and returns the value.I have a hard time with the output and then input times, it seems that there is a special way to do this.Here is my code:
Code:

library IEEE;use IEEE.std_logic_1164.all;use IEEE.numeric_std.all;use IEEE.std_logic_unsigned.all;use IEEE.std_logic_arith.all;entity ttl_finder is  port( clk, ena, sal_ttl : in  std_logic;      sal_1, sal_2      : out std_logic;      sal_f          : out std_logic_vector(3 downto 0));end entity;architecture ttl_tester of ttl_finder issignal cont : std_logic_vector(1 downto 0) := "00";signal results : std_logic_vector(3 downto 0) := "0000";beginprocess(clk, ena)variable c : std_logic;variable d : std_logic;variable e : std_logic;beginif ena = '1' then  if cont < "11" then    sal_1 <= cont(0);    sal_2 <= cont(1);    if rising_edge(clk) then      results(conv_integer(cont)) <= sal_ttl;    end if;    cont <= cont + 1;  else    sal_1 <= cont(0);    sal_2 <= cont(1);    if rising_edge(clk) then      results(conv_integer(cont)) <= sal_ttl;    end if;    cont <= "00";  end if;end if;end process;sal_f <= results;end ttl_tester;

Qsys DDR2 simulation with memory model - I'm missing something simple....

$
0
0
Hi all,

I'm moving into using DDR and DDR2 memory so I thought I would get myself up to speed by creating the simplest DDR2 simulation I could in qsys. Pity I couldn't get it to work....


Simulation Without a Memory Model



You don't get much simpler than this. A DDR2 controller with its AMM slave exported. I ran a simulation of this successfully with the DDR2 controller attempting to initialise the memory. However, as there is no memory model, it doesn't initialise properly as expected. However, so far so good.

Simulation With a Memory Model

The next stage is to add the memory model. To do this, I used some of methods used in this tutorial: http://www.altera.com/education/demo...line-demo.html
In particular, I asked qsys to produce a test bench by adding BFM modules to the i/o.

This process produces a new qsys model with BFM modules added. This includes DDR2 memory model connected to the DDR2 controller.

Unfortunately, when I try and compile this, it doesn't like the memory model.
Quote:

Error: sdram_my_partner: Altera DDR2 Memory Model for UniPHY does not support the QUARTUS_SYNTH fileset
Error: sdram_my_partner: An error occurred
while executing
"error "An error occurred""
(procedure "_error" line 8)
invoked from within
"_error "[get_module_property DESCRIPTION] does not support the QUARTUS_SYNTH fileset""
(procedure "generate_synth" line 2)
invoked from within
"generate_synth alt_mem_if_ddr2_mem_model_top_mem_if_dm_pins_en"

Now the DDR2 controller uses ALTMEMPHY as I'm on cyclone III and UniPHY isn't an option. However, the memory model is for UniPHY. This might be the cause of the issue.

Any other ideas?

I'm targeting the Cyclone III as I had problems simulating with the Cyclone IV. I might try Cyclone V with the UniPHY as I think this is an option. I hit the same problem with Quartus 13.0 and 13.1.
Attached Images

rise time measurement for refclk input

$
0
0
This is a board designer question - please help if you know the answer.
Stratix V datasheet specifies max rise time for transceiver refclk as 250ps.
The clock is differential
It also specifies min-max peak to peak for the refclk as 200mV to 1600mV.

My question:
Let us say the input I give to this pin on my board has peak-to-peak = 1600mV
Let us say I measure the rise time from -800mV to +800mv as 500ps.
Does this fail the above spec?

My argument is that it does not - because the input does not need 1600mV to see the transition, it needs only 200mV
Therefore, I need to measure the rise time of only that part of my waveform that swings from -100mV to 100mV.
If the rise time measured from -100mV to 100mV is <250ps, I would say I passed the spec!

Please help if you know the answer.

Thanks,
Krishna

Programming MAX10 with JTAG

LCD Procedure code

$
0
0
I need a procedure to write a word in the lcd that I can call any time, so i thought of something like this:

procedure write1 is
variable cont1: integer range 0 to 18;
begin
for cont1 in 0 to 18 loop
case cont1 is
when 0 =>lcd_rs<='0';
lcd_data<=x"C0";
when 1 =>lcd_e<='1';
when 2 =>lcd_e<='0';
when 3 =>lcd_rs<='1';
when 4 =>lcd_data<=x"4C"; --L
when 5 =>lcd_e<='1';
when 6 =>lcd_e<='0';
when 7 =>lcd_data <=x"49"; --I
when 8 =>lcd_e<='1';
when 9 =>lcd_e<='0';
when 10 =>lcd_data <=x"4B"; --K
when 11 =>lcd_e<='1';
when 12 =>lcd_e<='0';
when 13 =>lcd_data <=x"45"; --E
when 14 =>lcd_e<='1';
when 15 =>lcd_e<='0';
when 16 =>lcd_rs<='0';
lcd_data<=x"80";
when 17 =>lcd_e<='1';
when 18 =>lcd_e<='0';
lcd_rs<='1';
end case;
end loop;
end write1;

I want to use it like this in a fsm:

if(w1='1' and w2= '0' and w3 = '0') then
write1;
elsif(w1='0' and w2 = '1' and w3 = '0') then
write2;
elsif(w1='0' and w2 = '0' and w3 = '1') then
write3;
elsif(w1 = '0' and w2 = '0' and w3 = '0') then
clearline2;
end if;



But it seems i got all wrong, can someone explain what i should do?

Weird half-word swapping with SRAM @ Generic Tri-State Controller

$
0
0
Hi,

I am experiencing this weird behavior with the Tri-State Controller connected to an SRAM: When I do a master_read_32 via the system console, both half-words are swapped! Single-byte reads or even individual half-word reads are fine (and in little endian order as I expected). Writing with master_write_32 is fine as well!

  • I am using the Generic Tri-State Controller and the Tri-State Conduit Bridge
  • The device's address width is 17bits
  • The Device's data width is 16bits
  • The Address width in The Tri-State Controller is thus set to 18 with a bytenable width of 2 as well as 2 bytes per word.
  • I am discarding the LSB of the byte address that I get out of the conduit by not hooking it up to the SRAM at all.


This thing doesn't make sense to me at all. I can read and write to my onchip memory on the same bus without problems. This is my first take with that component, so I might be overlooking something. Anyone has a clue what it might be?

Cheers, Peter

Code compiling errore

$
0
0
Hellow every bidy;
I faced an errore during compilation of my code on modelsim. the errore displayed " Cannot index the result of a type conversion. ". and the errore apears in this line

if std_logic_vector(conv_unsigned(ref, 3))(2) = '0' then

How can I solve this problem?
Thanks.

MAX 7000S Series LifeCycle

$
0
0
I just wanted to know if the MAX 7000S series is nearing the end of its life cycle. I can't get to the series page on the Altera website, which makes me suspicious of its lasting ability. I just need to know if it will be around for the next 5 years. Specifically, EPM7128STC100-15N. If not, is there planned replacement?

TimeQuest Timing Analyzer - control signal marked as clocks

$
0
0
I was creating a constraint file which consists of two clocks, but errors were generated complaining about certain control signals be identified as clocks. For example, the SS signal (Slave Select) was designated by Timequest as a clock signal. First question: What is it about certain signals that TimeQuest will designate them as a clock signal ? Why wasn't MOSI or MISO marked as a clock signal that needs clock constraints identified? What should I do to satisfy TimeQuest to move forward (i.e, applying periods to signals that are aperiodic)
Attached Images

What is the function of clock frequency of clock source in Qsys?

$
0
0
When we make a design in qsys, at beginning there is always a clock source module. I try to check the document of this IP but it seems there is no document available. It looks like this module is just passing the external clock to the qsys system. It doesn't not do any changes in the clock frequency or phase. In this case, what is the mean of configuration "clock frequency"? What will be difference if I set the clock frequency or I just not set, but input the same clock frequency?

Thanks in advance.

Two questions about ddr2 memory controller and DMA

$
0
0
1)
I have an qsys project consisting nios2, custom module and ddr2 controller all connected through avalon bus, transmitting data between custom module and ddr2 is done through c-program in nios2, although it is easy to use but it costs unnecessary resource and creates extra latency. Now I want to remove nios2 and instrantiate ddr2 controller directly in the custom module.


Although I can see the timing schedule of I/O signals of the ddr2 controller by running the example design that is generated automatically, but I'm not sure I can figure out the correct timing schedule for various operations like writing, burst writing, reading etc. It will be nice to have a datasheet that includes the timing schedule for the operations. Could anyone suggest where I can find information about that?

2)
It seems one ddr2 memory only has one data port and one address port, so it is not possible to do writing and reading at the same time like what we can do on fpga embedded 2-ports RAM block, right?

Disabling PLL for Cyclone III

$
0
0
I am working to design a Cyclone III FPGA powered off of a 1.5 V battery. As I research powering all different parts of the FPGA, it looks like most output/input buffers etc. are receptive to this lower voltage logic (LVCMOS). However, from what I've gathered, the analog PLL must be connected to 2.5 V even if I am not using it. Is this true, or is there an easy workaround for either powering everything from the 1.5 V battery or bypassing the PLL so that it is not necessary to provide it power?

Thanks!

Single-port RAM output timing issue

$
0
0
I'm using ArriaGX, i found the single-port ram timing waveforms as below. The output should be valid in the next clock cycle.


And in one of my projects, it works as above timing waveform, the signaltap image as below

Above ram is small, and implemented by one M4K block. I have another project, which include a big ram that implement by 2 M-RAMs and several M4K. This big ram's output latency is more than above small RAM. It needs to wait one more clock cycle, as below


BTW, these two rams are implement by same setting, except the port-width&depth difference. Is this because of M-RAM need longer latency than other small RAM cell (eg.. M512&M4K)?
Attached Images

Problem when compiling project in Quartus 13.0

$
0
0
Hi everyone!
I encounter a problem when I compile project in Quartus, namely Fitter was unsuccessful
Following picture is sub message from Compilation report of Quartus

Please help me solve this problem!
Thank you so much!
Attached Images

implicit declaration of function 'epcs_read_buffer' warning

$
0
0
hi,
i study an458 for boot loader.
i build advanced_boot_copier, but not working.

waring is implicit declaration of function 'epcs_read_buffer'

code is

epcs_read_buffr(epcs_controller_base, epcs_contoller_register_offset, (int)src, (alu_u8*)dest, (int)num);

that is right? or worng?

plz, help me.

Migrate to new Spansion SPI NOR Flash for AS configuration

$
0
0
Hi,

I've found Spansion app note which give S25FL064P replacement part for EPCS64. Unfortunatly, this device doesn't exist in SO8 (208mil) and i wan't to "size upgrade" a EPCS16 device in SO8 package. Has anyone experienced S25FL164K that seems to be compatible ? (or other SO8 serial flash suppliers like micron).

Thanks.

Best Regards.

CYCLON V + DDR3 RAM reset/clock problems within BeMicro CV board

$
0
0
Hello everyone,
I am using the BeMicro CV Development Kit board which is based on a Cyclone V
Device 5CEFA2F23C8N. I am using Quartus II 64-Bit Version 13.1.0 Build 162
( problem also occurs with Version 14.0 ) and I am hanging in 2 problems:
1) sometimes after downloading the elf file: Note: The problem occurs always
if an external PLL is used:
Verifying 08000000 ( 0%)
Verify failed between address 0x8000000 and 0x800D71F
Leaving target processor paused
2) Reset problem: the reset does not work at all even though I followed the instructions
http://www.altera.com/support/kdb/so...072011_71.html
The board will be dead if I press the reset button.
Enclosed, please find all the referece files. The myload.sh script in the flash directory
will load and start the test programm to the BeMicro CV board. I have testet 5 boards already
with the same result. Can anyone confirm that there is a problem in the CYCLONE V which is
clock/PLL related. If yes, is there a fix available ? or did I make a mistake in my qsys design?
Many thanks in advance
Reinhard
Attached Files
Viewing all 19390 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>