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

barrier problem

$
0
0
Hi all ,

I use one barrier(CLK_LOCAL_MEM_FENCE) in kernel function.

When I use the command (
aoc -v --board de5net_a7 X.cl X.aocx ) to compile the cl file ,
it will show the compile warning like
Compiler Warning: Threads might reach barrier out-of-order: at most 2 concurrent workgroups are allowed.
Although it is a warning message , but it will fail in following step :
"
aoc: Compiling Quartus project.
Error: Quartus compilation FAILED.
Refer to quartus_sh_compile.log for the output log.
"

So how to solve the problem or is there a method to make sure that there are 2 workgroups ?

Thanks :)

From opencl Kernel to IO ports or VGA

$
0
0
Hi,

I am working on opencl applications : i am doing some image processing in opencl with DE1SOC board (cyclone V+ARM). I would like to implement
physical IO ports of the board directly in opencl kernel. Per example, i would like to send RBG value to the VGA ports from an opencl kernel but i searched
in given documentation from Altera website : i found that we can implement streaming interface (ethernet) with channels but i don't know how to implement others physical
IO ports of the board. Is it possible to have Memory Mapped peripherals from Qsys design and we communicate to these peripherals from kernel or from the Host (Arm)?
After compilation of an opencl kernel (with aoc command), i opened the Quartus project and Qsys project that were generated : i am not able to find the Host (the processor HPS ARM)
i find only modules related to the Kernels : a main module called "acl_interface" with Memory Mapped Master. So if even, i add a memory mapped peripheral, i don't know where to connect it.
(Normally it should be the HPS Arm processor).

Thanks by advance.
Ganesh

FIR II MegaCore strange output

$
0
0
Hi,
I generated a FIR Megacore from the IP catalog, and ran the generated simulation script to check its functionality.
Here is what I got:



Well, it looks very similar to the impulse response, but I noticed breaks between samples...
when I changed back to binary representation I got this:



There are zeros in-between samples!
Can you explain this whether it is normal behavior or wrong usage (bearing in mind that I didn't change anything... it's the original script and testbench)
Attached Images

About Floating Point Performance and New Accelerator Cards

$
0
0
Hi everyone,

I read the TDFIR Optimization Guide provided with the TDFIR opencl example, which mentioned the performance of floating point functions to be arround 500~300Mhz depends on type of operation. But it also mentioned that some ALUTs are required to implement each floating point function. Since the FPGA itself only runs at 2xxMhz speed, does that mean the floating point operations are all capped at 2xxMhz? Also, for Add/Sub operations the guide did not list usage of 27x27 Multipliers. Does that means for Stratix V, floating point Add/Sub can only be implemented by "soft" logic, not the DSP?

In addition, I am just wondering if anybody know what is the typical power usage of a Arria 10 OpenCL accelerator card? Is it similar to the Stratix V A7 (~25W) or Stratix V D8 (~75W) or something in between?

Thanks!

Ryan

Altera VIP - Cores with Parallel Pixel Option

$
0
0
Hi

Can someone explain how to take advantage of the latest version of Altera VIP suite where cores support multiple pixels in parallel? Previously (ie. Quartus 13.1 or earlier) only supported Avalon-ST with 1 pixel.

Also, since the parallel pixel option is supported with only some of the cores, how do we interface between cores with single pixel versus cores with multiple pixel? A clock-crossing bridge?

Thanks!

Modified *.dts for custom driver to *.dtb conversion

$
0
0
Thanks in advance.
I'm working with Quartus 14.1 and linux kernel 3.9.0 with the Altera SoC Cyclone V Dev Board and the Golden Design.
I've successfully created a new project that has added a pll and a simple custom ip.
I need a driver for the simple custom ip. In the olden days with the NiosII and MMU system I'd generate a *.dts and
then modify the *.dts to have my driver information.
So, what I've done is created a *.dts using the:
sopc2dts -i filename.sopcinfo -o out.dts --type dts -b soc_system_board_info.xml -b ... (AS PER ROCKBOARD INSTRUCTIONS - don't have it in front of me)
When I generate the *.dts I get that my custom IP and the pll are unknown. In the olden days of MMU NiosII I used to modify the:
compatible= "unknown,unknown-1.0" in the *.dts file and then created a *.dtb from that.
And, what do I do with the new pll?
So, now what do I use to go from this modified *.dts to the *.dtb that I need?
Or can I use an *.xlm file to define this and go straight from the *.sopcinfo to the *.dtb?
Is there more than one option to generate the *.dtb I need and if so
what is recommended.

DE1SOC Running HPS Control LED example

$
0
0
Hello:
I have been trying to run the HPS Control LED and HEX program but given the MSEL setting of 01010 or 01110 both turn up to hang at boot stage as the altera_load : Failed with error code -4. The only MSEL where it works is 00000, but the documentation calls for not using that setting.

Why is uboot failing to load this image. I have the standard linaro ubuntu image from the website.

If anyone has successfully run this, or managed to load their own rbf on this system, would you please point me in the correct direction.

Thanks,
gate_keeper

Allegro PCB Editor Pad Stacks for Device Footprints

$
0
0
I'm trying to do the layout for a circuit using a cyclone 5 device with the ugba484 footprint. I was able to download the .dra and .psm files for the device (from the device_family_footprint.zip' file located on the Altera website, but I cannot find the corresponding .pad files that are required by Allegro to use the footprint. Help will be much appreciated! Cheers.

Converting RBF file back to sof file

$
0
0
Hi All,

Can we convert the RBF file back to the sof file format? Is there any tool needed for that?

Thanks,
CG6991

Programming Cyclone II by using matlab

$
0
0
Hello, I'd like to know if it is possible to program Cyclone II device on DE1 board, by usign matlab coder (VHDL, C/C++) and if there is a good tutorial available.
Thanks
AG

Why does the fitter generate a counter with a reversed bit order?

$
0
0
Hi All,

I am working on a controller for a 32x32 RGB matrix using the DE0 Nano. So far I have successfully manage to display a still image using a pair of 2-port RAM modules to store the top and bottom half of the display.

The design uses three counters, one keeps track of the column data and LED on time, another keeps track of how many times the row is re-drawn to achieve an 8-bit resolution of brightness (24-bit colour) in a PWM fashion, and the final counter keeps track of the row. The counters are cascaded, starting with the column counter, then the PWM and finally the row counter:



The first two counters, 7-bit and 8-bit, are inferred by the fitter as expected. However the 4-bit row counter is inferred with a reversed bit order, as shown in the following screenshot:



The row counter needs to be connected to a physical 4-bit MUX on the 32x32 matrix. At the moment the design works fine if I connect the LSB of the MUX to the pin that joins the MSB of the row counter, i.e. in a reversed order, row_counter[0] to the D pin of the MUX and row_counter[3] to the A pin of the MUX. The codes for all the counters are very basic, and identical with the exception of the number of bits in each. Also the current code for the 4-bit counter has the carry flag removed, however this makes no difference to the bit order chosen by the fitter.


Code:

module counter_4(

clk,
counter_out

);

input reg clk;
output reg [0:3]counter_out = 0;

always @ (posedge clk) begin

    counter_out <= counter_out + 1;

end

endmodule


Although everything is working great, this feels like a bit of a 'work around' and I would like to understand why the fitter is reversing the bit order!

Many thanks

Simon

memory collision between NiosII and HPS Linux

$
0
0
Dear all,

Would you please give me some suggestion?

Now, I could accessing DDR of HPS and already create a NiosII to touch the same memory via Pipeline bridge and address extender.
I could dump memory from NiosII side and HPS Linux side.

My question is,
If these two cores want to access the same memory, how should I do?
Should I just Put the mutex core between them for protection?

My experiment is as below,

NiosII dump section1+2 memory and read/write data to section-1 of memory via DMA.
Linux dump section1+2 and read/write data to section-2 of memory.

If Linux only dump memory and not write data. the DMA of NiosII works well.
If Linux write memory of section-2 , the DMA of NiosII could transmitted fine but data is not correct.

Brian

Achieving Timing Closure on Source Synchronous DDR Input

$
0
0
Hi I am looking for some help achieving timing closure in a design.

I am using a TI ADS4149 EVM Board and connecting it to a Terasic C5 SoC Dev Board.

The ADC outputs Source Synchronous DDR LVDS Centre Aligned data. I am capturing data from the ADC using a DDIO register in the FPGA. I take the clock output from the ADC and using a pll in source synchronous mode connect it to clock the ddio register. The sampling frequency for the ADC is currently at 160MHz but I am looking to push this up to as near to 250MHz as I can.

I have constrained my design using:

Code:

#create virtual clock latching data @ source
create_clock -name vir_clk_adc    -period 6.250

#create clock that is received @ pin (90 degree shift)
create_clock -name clk_adc        -period 6.250 -waveform {1.563 4.688} [get_ports {HSMC_CLKIN}]

#create generated clock output from pll
create_generated_clock -name clk_adc_pll -source    [get_pins {adc_lvds_pll|pll_lvds_inst|altera_pll_i|general[0].gpll~PLL_REFCLK_SELECT|clkin[*]}] [get_pins {adc_lvds_pll|pll_lvds_inst|altera_pll_i|general[0].gpll~PLL_OUTPUT_COUNTER|divclk}]

derive_clock_uncertainty

# set input constraint using setup and hold wrt virtual clock
# max = Tperiod/4 - Tsu
# min = Th - Tperiod/4
set_input_delay -clock vir_clk_adc -max 0.463    [get_ports {HSMC_RX[*]*}]
set_input_delay -clock vir_clk_adc -min -1.163  [get_ports {HSMC_RX[*]*}]
set_input_delay -clock vir_clk_adc -max 0.463    [get_ports {HSMC_RX[*]*}] -clock_fall -add_delay
set_input_delay -clock vir_clk_adc -min -1.163  [get_ports {HSMC_RX[*]*}] -clock_fall -add_delay

#false path double data rate edges
set_false_path -setup    -rise_from    {vir_clk_adc} -fall_to {clk_adc_pll}
set_false_path -setup    -fall_from    {vir_clk_adc} -rise_to {clk_adc_pll}
set_false_path -hold    -rise_from    {vir_clk_adc} -rise_to {clk_adc_pll}
set_false_path -hold    -fall_from    {vir_clk_adc} -fall_to {clk_adc_pll}


When I perform timing analysis I am getting setup and hold violations on paths from the RX Pins to the DDIO register. (please see attached jpegs)

I am looking to close timing and am stuck as to what to do next.

Analysing the waveforms they look to have the correct relationship. There are no large interconnect delays, the DDIO has a large cell delay but I dont believe I can change this?

Analysing the data arrival path for the setup of the top failing path, the data is received at the pin, goes through an IO buffer into the DDIO cell, I cant affect this path as far as i am aware. looking at the data required path the clock is received at the pin, goes to the PLL onto a global clock and then to the DDIO pins. Looking at the hold path (it is for a different pin but they are all essentially the same) the data arrival and data required paths are the same as the setup.

I dont know what I can do to achieve timing closure. Assuming my constraints are valid (please let me know if not) and as far as I can tell my design is about as simple as it can get, what would be the next step? The only option that I have is to remove the PLL which I am going to test next.

Help would be appreciated

Thanks

James
Attached Images

Communication PC-DE0 Nano using UART

$
0
0
Hello everyone,

I'm trying to connect my FPGA with my laptop using the serial protocol. For that purpose, I implemented the UART protocol on the FPGA side.

The connection between the FPGA and the Laptop is done with the UART-TTL to USB converter. I Get the wrong frame on the Laptop side.
Thus, I analyse my frame continuously using a logic analyzer, I observed that the frame sent wasn't stable, i.e sometimes a wrong frame is received instead of the one sent.

Thanks for you help.

please find attached the source code for the Serial code(TX.vhd) and the control unit (UART.vhd)

Best regards,
Attached Files

When will Altera Abandon AHDL?

$
0
0
Hello, I'm using Quartus 14.1 and I'm still seeing some of the megafunctions using AHDL. I'm using a Cyclone V Native IP Core and some of the files it generates are AHDL and I'm not able to do an RTL simulation only a Functional simulation. Does anyone know when Altera will rid itself of this dead HDL?

Signal Tab Sample Depth

$
0
0
Hi,

Is there any way to increase the size of sample_depth in signal tab with is 128 K maximum ?

I appreciate your help.

Thanks.

Stratix V FPGA kit card only running at Gen3 pre-set 7

$
0
0
When I run compliance testing on the Stratix V FPGA card, with the LeCroy PERT and Wavemaster scope, I only get it running Gen3 at pre-set 7.

Can anyone say what causes that constraint ?

To pass PCI SIG compliance I believe the card / device has to pass at atleast 3 pre-sets.

Best Regards, Bob.

Simulink matrix block using as input before altera blocksets but data not passing .

$
0
0
I am new in altera i am using Simulink matrix block as input to the altera blocksets design but data incompatibility problem arises plz someone suggest what to do?...............:):)

Cyclone V DDR3 termination resistor

$
0
0
Hello,

I am currently working on the design of a Cyclone V SE board with 2 DDR3 memory chips.
I am wondering if it is necessary to have the termination resistors for the adress / command signals ?

The developpement kit have termination resistors, but when i look at others microcontroller reference board, it appears not to be necessary.

Is it mandatory with the Cyclone V, or is it related to the number of chips, or the layout ?

I had developped many electronic boards, but the DDR3 challenge is new for me.

Thanks in advance,
Regards,
Alex

nios2-flash-programmer error code 1

$
0
0
Hi guys. I am new to FPGA world and seems like I am having some difficulties with the flash programmer that I cannot understand. Its giving me an error code 1 which I am unable to find a reference to.

Purpose of the implementation: test out different functionality of the DE2-115 board. The FPGA part of the program includes SW, KEY, LED, and lcd, all of which is connected to the nios system generated from Qsys

Qsys: includes clk, cpu, onchip memory, jtag uart, sysid, epcs flash controller and a bunch of PIOs.

Here is what I did:
1. set cpu reset vector to epcs.
2. export externals of epcs flash controllers. it gives me the following input/outputs:
Code:

epcs_flash_controller_external_dclk  => CONNECTED_TO_epcs_flash_controller_external_dclk,  -- epcs_flash_controller_external.dclk           
epcs_flash_controller_external_sce  => CONNECTED_TO_epcs_flash_controller_external_sce,  --                              .sce
epcs_flash_controller_external_sdo  => CONNECTED_TO_epcs_flash_controller_external_sdo,  --                              .sdo
epcs_flash_controller_external_data0 => CONNECTED_TO_epcs_flash_controller_external_data0  --


3. apply terisic patch. as suggested in their manuals to include nios-2-flash-override
Code:

[EPCS-010216] #EPCS64N(lead-free)sector_size = 65536
sector_count = 128
[EPCS-012018] #EPCS128N(lead-free)
sector_size = 262144
sector_count = 64

3. import some predefined pin assignments given by terasic.
4. On the Dual-purpose pins page (Assignments > Devices > Device and Pin Options), thefollowing pins are assigned to "Use as regular I/O": Data[0], Data[1], DCLK = Use as regular I/O, FLASH_nCE/nCS0
5. perform port map
Code:

        u0 : component test_niosqsys        port map (
            clk_clk                            => CLOCK_50,                            --                        clk.clk
            lcd_external_RS                    => LCD_RS,                        --                lcd_external.RS
            lcd_external_RW                    => LCD_RW,                      --                            .RW
            lcd_external_data                  => LCD_DATA,                  --                            .data
            lcd_external_E                    => LCD_EN,                          --                            .E
            pio_key_external_connection_export => KEY,                -- pio_key_external_connection.export
            pio_sw_external_connection_export  => SW,                  --  pio_sw_external_connection.export
            poi_led_external_connection_export => dataop,              -- poi_led_external_connection.export
            reset_reset_n                      => KEY(0),                            --                          reset.reset_n
            epcs_flash_controller_external_dclk  => DCLK,                -- epcs_flash_controller_external.dclk
            epcs_flash_controller_external_sce  => FLASH_nCE,    --                              .sce
            epcs_flash_controller_external_sdo  => DATA1,                --                              .sdo
            epcs_flash_controller_external_data0 => DATA0  --                              .data0
                            --                      reset.reset_n
        );

Code:

Node                Direction                        Fitter Location
Data0              Input                PIN_AA14
Data1              Output                PIN_V1
dclk                Output                PIN_AG12
FLASH_nCE    Output                PIN_AD14

6. program the fpga.
7. open nios IDE, select BSP Editor from where all components of Settings->Advanced->hal->linker we disabled
8) built the program and select run as NIOS II hardware. At this point the program is correctly loaded and starts execution. however, upon pressing nios 2 reset key, the program stops since the epcs has not been flashed.

9. open up nios ii flash programmer from nios2 ide. confirmed timestamp and system id to be a match. add the sof and elf files with default settings. ... press start; and end up with an error saying
Code:

elf2flash --input="/media/rash-ed-u/ubuntu/altera/workspace/nios_cpu/software/prog/prog.elf" --output="/media/rash-ed-u/ubuntu/altera/workspace/nios_cpu/flash/prog_epcs_flash_controller.flash" --epcs --after="/media/rash-ed-u/ubuntu/altera/workspace/nios_cpu/flash/nios_test2_epcs_flash_controller.flash" --verbose

nios2-flash-programmer "/media/rash-ed-u/ubuntu/altera/workspace/nios_cpu/flash/prog_epcs_flash_controller.flash" --base=0x81000 --epcs --sidp=0x82040 --id=0x0 --timestamp=1425416806 --device=1 --instance=0 '--cable=USB-Blaster on localhost [3-1]' --program --verbose

Error: Error code: 1 for command: nios2-flash-programmer "/media/rash-ed-u/ubuntu/altera/workspace/nios_cpu/flash/nios_test2_epcs_flash_controller.flash" --base=0x81000 --epcs --sidp=0x82040 --id=0x0 --timestamp=1425416806 --device=1 --instance=0 '--cable=USB-Blaster on localhost [3-1]' --program --verbose



any idea what might be wrong with what i am doing?

Thanks

Cheers
Rashed
Viewing all 19390 articles
Browse latest View live


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