Recent Content
Altera TSE driver and example program for lwIP (1.3.2)
After many many requests and complaints about lack of support and/or documentation for support of lwIP for the Altera TSE, I have developed a drop-in TSE driver and example program and made this available to the NIOS II community. This was done for NIOS II 8.1 SP0.01. I don't expect difficulty with version 9.x. This is for the latest version of lwIP (the latest is as of this post) for a minimal program and HTTP server based on the http server in the lwIP contrib folder. The lwIP TSE driver uses the altera_avalon_tse driver and SGDMA as-is. There is a complete (as in 41-step) set of instructions on creating the project and example program. More information and the link to the driver is available here: http://lwip.wikia.com/wiki/available_device_drivers#lwip_1.3.2 Please direct any questions, changes for NIOS II 9.1, or comments to this thread. 12-16-2010 update: This example works with NIOS Version 10.0 with some tweaks to the procedure to create the project. Also, a lwIP 1.4 release candidate has been out for a while and it drops into this example (in place of 1.3) without changes. Bill41KViews0likes257CommentsTutorial: Using the USB-Blaster as an SOPC/Qsys Avalon-MM master
Hi all, I've put together a tutorial on how to use the Altera JTAG-to-Avalon-MM master and Altera Verification IP Avalon-MM BFM Master under both SOPC builder and Qsys. http://www.ovro.caltech.edu/~dwh/correlator/pdf/altera_jtag_to_avalon_mm_tutorial.pdf (http://www.ovro.caltech.edu/%7edwh/correlator/pdf/altera_jtag_to_avalon_mm_tutorial.pdf) http://www.ovro.caltech.edu/~dwh/correlator/pdf/altera_jtag_to_avalon_mm_tutorial.zip (http://www.ovro.caltech.edu/%7edwh/correlator/pdf/altera_jtag_to_avalon_mm_tutorial.zip) The tutorial walks the user through the creation of an SOPC or Qsys system design, and provides scripts that automate the re-generation of the system. The tutorial shows how to simulate using Modelsim-ASE, and shows how to communicate with the hardware using System Console, quartus_stp, and then how to run a TCP/IP server under System Console or quartus_stp, and then communicate with that server from client code written in Tcl/Tk (a simple GUI) and a command-line C interface. Let me know if you like it, or have feedback/suggestions on how to improve the document. Cheers, Dave27KViews0likes119CommentsIs anybody else completely dissatisfied with this new forum?
This used to be a robust forum, lots of new questions everyday and, most impotantly, lots of responses. This new forum is clunky and time consuming to navigate. Nobody seems interested anymore. I used to check-in everyday to see what's new. Not any more.40KViews15likes119Comments- 18KViews0likes107Comments
Simple Socket Server on DE2 w/Davicom DM9000A
updated. Altera's Simple Socket Server demo running on a DE2 board with the Davicom DM9000a driver. here it is....zipped downloaded project source for sss on the de2 board. download link currently unavailable. Includes: - Hardware design (TLD in schematic block diagram format) - Programmable .SOF (time-limited, as developed in Quartus Web Edition v9.2) - SOPC builder system file - DM9000A driver for Nichestack TCP/IP stack / Altera HAL environment (courtesy of Columbia Uni) - Simple socket server software Simply... - (1) Download the .SOF in Quartus Programmer - (2) Open the software workspace in the "/software" directory in Nios II Build Tools (Eclipse IDE) - (3) Open Run >> Run Configurations. Delete the current configuration. Create a new launch configuration selecting the project name under the Project Tab. Ensure your DE2 board is plugged into USB. Check the target connection tab and make sure it is present. - (4) Plug into your local network (DHCP is enabled, or app will default to static IP) - (5) View the Nios II console for debugging information (via JTAG UART) - (6) Telnet into the board from a pc: telnet <ip address> 30. Enjoy the simple socket server demo from Altera! Questions/comments? Fire away below!12KViews0likes98CommentsLinux with MMU on NEEK
Hi, all. I'm testing Linux MMU version, on my NEEK. http://www.nioswiki.com/linux It works fine and I can use "bash" shell. This is the evident proof that we are using the true 'fork' instead of 'vfork'. May be this will depends on the version, but TSE driver claims an error and doesn't work on this design. The error is ERROR: altera_tse.c:1666: request_mem_region() failed I think that this error is caused by misunderstanding of the usage for the function request_mem_region(). Inside of the request_mem_region(), the function __request_region() is called. If the resource has been already registered, this function returns a non-NULL value, that is the pointer for its resource. But the resource 'sgdma_rx_base' is already registered in the initialization process, so this function returns the 'conflict' and if (!request_mem_region(sgdma_rx_base, sgdma_rx_size, "altera_tse")) { is always true. So I made a dirty patch, if (!request_mem_region(sgdma_rx_base, sgdma_rx_size, "altera_tse")) { reg_resource = __request_region(&iomem_resource, sgdma_rx_base, sgdma_rx_size, "altera_tse", 0); if (reg_resource != NULL && reg_resource->flags & IORESOURCE_BUSY) { printk(KERN_ERR "ERROR: %s:%d: request_mem_region() failed\n", __FILE__, __LINE__); ret = -EBUSY; goto out_sgdma_rx; } } Moreover, the author is forgetting that the DMA is working in the physical address world, so we need to set the pointers of descripters like // desc->source = read_addr; desc->source = virt_to_phys(read_addr); // desc->destination = write_addr; desc->destination = virt_to_phys(write_addr); // desc->next = (unsigned int *)next; desc->next = (unsigned int *)((unsigned long)next & 0x1fffffffUL); and so on. Also the frame buffer fb0 will not work well, because the driver 'altfb.c' is not implemented for Linux with MMU version. So I put some codes for altfb_mmap(), like /* We implement our own mmap to set MAY_SHARE and add the correct size */ static int altfb_mmap(struct fb_info *info, struct vm_area_struct *vma) { unsigned long phys_addr, phys_size; unsigned long addr; unsigned long size = vma->vm_end - vma->vm_start; unsigned long offset = vma->vm_pgoff << PAGE_SHIFT; // vma->vm_flags |= VM_MAYSHARE | VM_SHARED; // vma->vm_start = info->screen_base; // vma->vm_end = vma->vm_start + info->fix.smem_len; /* check range */ if (vma->vm_pgoff > (~0UL >> PAGE_SHIFT)) return -EINVAL; if (offset + size > altfb_fix.smem_len) return -EINVAL; vma->vm_flags |= VM_IO | VM_RESERVED; addr = vma->vm_start; phys_addr = altfb_fix.smem_start + offset; if ((offset + size) < altfb_fix.smem_len) phys_size = size; else phys_size = altfb_fix.smem_len - offset; vma->vm_page_prot = __pgprot(_PAGE_PRESENT|_PAGE_READ|_PAGE_WRITE); if (remap_pfn_range(vma, addr, phys_addr >> PAGE_SHIFT, phys_size, vma->vm_page_prot)) return -EAGAIN; return 0; } and rewrite the DMA descripters like desc->next = (void *)virt_to_phys((desc + 1)); So now, I can evoke telnetd and control NEEK through ethernet, and use Nano-X on Linux MMU version, but can't enter ftp session, because 'getservbyname()' function will not work well. I don't know the directory that the souce of 'getservbyname()' is included. Would anyone please tell me where is it? Thank you, in advance.5.5KViews0likes95CommentsDE2_UDP example for download here free (feedbacks are wellcomed)
Hi all. My goal is to get about 3Mbytes/sec data transfer rate from my DE2 board to PC. Here in this example I get about 1.2 Mbytes/sec. I'll accept comments about, how to speed up this, as well as suggests to improve the code, and some feedback from people that have interest in this theme. Could be in this thread or private. You can download the full project from: http://www.btxsistemas.com.ar/net2.zip I've used Quartus II 7.2 full suite. And the Wireshark software (http://www.wireshark.org/) like a net sniffer, but also, I've included in the main project folder, a UDP reciever to test the comunication between the DE2 board and the PC, if you wont to download the wireshark. Don't forget to specify your IP address and your MAC address in the NIOS hello_word "C" code to get it work properly. The main project is a modification of the DE2_NET demostration code that comes with the DE2 board. Have fun, and I'll be waiting for some comments.10KViews0likes94Commentscontinuous averaging using VHDL
I have a question related to VHDL programming. I want to calculate the continuous average. My example code is: process (clk, reset) begin if (reset = '1') then state<=idle; out-val=0; elsif(rising_edge(clk)) then case state is when idle => if req='1' then state= out-1; end if; when out-1 => if done='1' then out-val<=data-in (11 downto 0) state <= done-st; endif; when done-st => ack <='1'; state <= idle; when others => state <= idle; end case; end if; end process; On every positive edge of clock, the value of "out-val" changes. I want to continuously take the average of "out-val". I want to take average of 32 values continuously. Is there a way where I can take average of 32 values continuously till the clock is running. Kindly let me know how can I do that. You can modify the above code as well. Many Thanks,18KViews0likes90Comments
Featured Places
Community Resources
Check out the support articles on personalizing your community account, contributing to the community, and providing community feedback directly to the admin team!Tags
- troubleshooting10,347 Topics
- fpga dev tools quartus® prime software pro4,236 Topics
- FPGA Dev Tools Quartus II Software3,160 Topics
- stratix® 10 fpgas and socs1,535 Topics
- agilex™ 7 fpgas and socs1,433 Topics
- arria® 10 fpgas and socs1,354 Topics
- stratix® v fpgas1,314 Topics
- arria® v fpgas and socs1,226 Topics
- cyclone® v fpgas and socs1,053 Topics
- Configuration977 Topics
Recent Blogs
This post explores a practical shift from a fixed-function ASSP to a programmable FPGA platform in response to evolving system requirements. As bandwidth demands, protocol diversity, and feature complexity increased, limitations in a 400G optical transport ASSP and uncertainty in vendor roadmap made continued reliance difficult. The team transitioned to an FPGA-based approach, enabling customization of protocols and features while aligning the system more closely with real usage needs. The article also highlights benefits such as design reuse, reduced hardware variants, simplified inventory management, and greater control over long-term system evolution.
3 days ago0likes
This post explains how the definition of mid-range FPGAs has evolved from logic density to system-level capability. It highlights how Agilex 5 FPGAs address modern embedded and edge requirements by integrating compute, AI acceleration, memory, connectivity, and security into a single platform. The article also covers how Agilex 5 D-Series extends mid-range performance with higher logic density, increased bandwidth, and enhanced AI capabilities, enabling more complex and data-intensive workloads while maintaining efficiency and design simplicity.
3 days ago0likes
This post demonstrates how F-Tile Dynamic Reconfiguration in Agilex 7 FPGAs enables real-time switching between 400G and 4×100G Ethernet without system downtime. It explains how predefined configuration profiles, system-level data path reconfiguration (MAC, PCS, FEC, PMA), and software control enable predictable, production-ready transitions. The article also highlights support for multi-rate Ethernet, protocol flexibility, and continuous traffic validation, showing how FPGA-based systems can adapt dynamically to changing network conditions.
3 days ago0likes
This post demonstrates a 200G-4 Ethernet link running on Agilex 7 FPGAs using F-Tile transceivers. It walks through the full link bring-up process, including Auto-Negotiation and Link Training, followed by stable high-speed data transmission using 53.125G PAM4 lanes over QSFP-DD. The demo provides real-time visibility into link status, signal integrity, and error metrics, and evaluates performance across loopback configurations and varying cable lengths. The result highlights reliable link initialization, consistent throughput, and robust operation under practical system conditions.
3 days ago0likes
Quartus Prime Pro 26.1 improves FPGA development with faster performance, a new drag-and-drop design tool (Visual Designer Studio), better power/thermal analysis, and expanded IP support and debugging—making design workflows simpler and more efficient.
10 days ago0likes