Forum Discussion
Altera_Forum
Honored Contributor
12 years agoStratix V Development board with QSFP ports
Hi,
We have just bought a Bittware S5-PCIe-HQ development board which has a Stratix V FPGA. On the board are 2 QSFP+ ports. We wish to use these ports to transmit and receive data to and from the FPGA (probably using an Ethernet interface) but we don't know where to start. I don't have too much of knowledge of FPGAs but if anyone has knowledge of this or can point me in the right direction it would be much appreciated. Thanks, Paul28 Replies
- Altera_Forum
Honored Contributor
Hi Paul,
--- Quote Start --- I have sourced the tcl file "..\hdl\boards\bemicro_sdk\share\scripts\jtag_cmds_sc.tcl" but when I then try to change the LED values with command "led write 0x23" for example, nothing happens. I assume that that tcl commands script is specifically for the bemicro board. --- Quote End --- This Tcl script is expected to be used from within SystemConsole ... is that where you sourced it? So long as you did not change the PIO address in the Qsys system, this script will work with any board. The board-specific change needed is the pin assignments. Cheers, Dave - Altera_Forum
Honored Contributor
Yes I have sourced the file from within SystemConsole under TCL console. I have tried to source the jtag_cmds_sc.tcl for the de2 and also bemicro but when then try to change the LEDs , I receive error : "Sorry, no master nodes found
error: can't read "jtag(master)": no such variable" . I am looking at the System Console interactive session in Figure 13. Must I use these commands? I am just doing what is in Figure 14 , which is sourcing the tcl file and then trying to change LEDs etc. I also use pin planner to assign the LED ports to actual pins on the cyclone IV. Is this necessary, because I don't see this in the notes? If that is the case , must I assign all the ports there, including tck,tdi,tdo,tms? Sorry for the bombardment of questions, but we are determined to get it right )) Cheers, Paul - Altera_Forum
Honored Contributor
--- Quote Start --- Yes I have sourced the file from within SystemConsole under TCL console. I have tried to source the jtag_cmds_sc.tcl for the de2 and also bemicro but when then try to change the LEDs , I receive error : "Sorry, no master nodes found error: can't read "jtag(master)": no such variable" . --- Quote End --- Use this as an opportunity to understand what the scripts do :) 1. Make sure your design contains a JTAG-to-Avalon-MM bridge. If you look in the hierarchy display in Quartus after synthesis, you should see an sld_hub, and then if you expand the Qsys system, you'll see the jtag_master. 2. Read the SystemConsole Tcl script and read the Quartus handbook section that describes the commands. The "Sorry, no master nodes found" comes from the jtag_open command, i.e., the Tcl commands
The Quartus command "get_service_paths master" returns a list of JTAG-to-Avalon-MM bridge components in your design. The fact that it does not find any means that you've either forgotten to download the board, or some other issue. --- Quote Start --- I am looking at the System Console interactive session in Figure 13. Must I use these commands? I am just doing what is in Figure 14 , which is sourcing the tcl file and then trying to change LEDs etc. --- Quote End --- If you compare Figure 13 to the jtag_cmds_sc.tcl script, you'll see that the Tcl script simply wraps those commands in user-friendly set of procedures, so what you have done is fine. The problem is that your design is not recognized as having a JTAG-to-Avalon-MM master, i.e., the jtag_open procedure called the first time you try to use jtag_read or jtag_write is failing. --- Quote Start --- I also use pin planner to assign the LED ports to actual pins on the cyclone IV. Is this necessary, because I don't see this in the notes? If that is the case , must I assign all the ports there, including tck,tdi,tdo,tms? --- Quote End --- Yeah, you're right, this could be stated a little more explicitly. To a long-time user of FPGAs, its "obvious" that pin assignments change between boards, but this is not the case for new users :) You must assign the clock and LED pins correctly. The JTAG pins are fixed, so don't worry about assigning them. --- Quote Start --- Sorry for the bombardment of questions, but we are determined to get it right )) --- Quote End --- No need to apologize. The tools are often annoying. I've already suffered through the pain and frustration, so I don't mind saving others some grief :) Cheers, Daveset master_paths if { == 0} { puts "Sorry, no master nodes found" return } - Altera_Forum
Honored Contributor
Hi Dave,
This would be a separate issue. I have posted it in another forum but no reply yet. I am following the example tutorial "Using the SDRAM on Altera’s DE2 Board with Verilog Designs" using Qsys. I have built the system and loaded it to the FPGA. I am using the DE0-Nano board again. How exactly can I test the DDR2 controller in this case? I see only an example on how to test the switches and LEDs there. I would like to be able to write data to the on-board RAM through the controller from the FPGA and read it back etc. Do I have to worry about all the control signals or will the controller take care of that itself? In order to write data to an address in RAM, how would one go about it? Thanks, Paul - Altera_Forum
Honored Contributor
Hi Paul,
--- Quote Start --- This would be a separate issue. I have posted it in another forum but no reply yet. --- Quote End --- I guess I didn't see it :) --- Quote Start --- I am following the example tutorial "Using the SDRAM on Altera’s DE2 Board with Verilog Designs" using Qsys. I have built the system and loaded it to the FPGA. I am using the DE0-Nano board again. How exactly can I test the DDR2 controller in this case? I see only an example on how to test the switches and LEDs there. --- Quote End --- The DE0-nano has SDRAM, not DDR2 ... so your question is inconsistent ... With DDR memory, the controller is quite complicated and requires calibration of the interface timing. This can be performed using the Transceiver Toolkit. I'm sure your Stratix V board uses DDR2, so I can send you a document on how to create a system that includes the logic required to use the Transceiver Toolkit. The SDRAM memory on the DE0-nano has static timing requirements. So long as the design includes the correct .sdc file, and it passes timing, then you can just use it. You can test it using a pattern generator and checker, and DMA controller to move data back and forth, or you can just create a really basic test, and read/write. --- Quote Start --- I would like to be able to write data to the on-board RAM through the controller from the FPGA and read it back etc. Do I have to worry about all the control signals or will the controller take care of that itself? In order to write data to an address in RAM, how would one go about it? --- Quote End --- The controller takes care of the timing. You should also be able to create a simulation of the system and include a memory model and read/write that fake memory. If you get that working, then you'll feel a lot more confident things work. I have a favor to ask ... Do you have any QSFP+ cables for your board yet? I would like to see what the eye pattern measurements are like on the Bittware board. If you have a cable, I can write the top-level HDL, and you can run the test. That way you'll get a working design, and I'll get the test results I want to see, and then I can decide whether I should get one of the Bittware boards. Cheers, Dave - Altera_Forum
Honored Contributor
Hi Dave,
We are still waiting on the QSFP+ cables for the board. They should hopefully get here before the end of the month. As soon as they arrive I will let you know. The DE0-nano has SDRAM actually, my bad :-) I therefore don't have an example on how to read and write to it. What would be the best way to do this? Yes the Bittware board has DDR3 RAM. It would be great to receive a document on how to read and write to it also. Thanks, Paul - Altera_Forum
Honored Contributor
Hi Paul,
--- Quote Start --- We are still waiting on the QSFP+ cables for the board. They should hopefully get here before the end of the month. As soon as they arrive I will let you know. --- Quote End --- Ok, thanks. I could always FedEx you my cables if I was dying for the data sooner. Can you send me an email (to the email address that is my forum name) with the zip file to the Bittware board installation. I'll install it on my development machine, and that way I can create example designs for the board for you. --- Quote Start --- The DE0-nano has SDRAM actually, my bad :-) I therefore don't have an example on how to read and write to it. What would be the best way to do this? --- Quote End --- Using the JTAG-to-Avalon-MM master. --- Quote Start --- Yes the Bittware board has DDR3 RAM. It would be great to receive a document on how to read and write to it also. --- Quote End --- Download the example design for the BeMicro-CV that I posted here (post#5) http://www.alteraforum.com/forum/showthread.php?t=43992 and it has the basic sequence. If you get stuck, and you've sent me the Bittware design files, I'll be able to help you figure it out. Cheers, Dave - Altera_Forum
Honored Contributor
Hi Dave,
I have sent you an email also. I have tried that JTAG-to-Avalon master tutorial but it just uses on-chip RAM. If I wish to use the separate SDRAM on the DE0-nano board, do I just add an SDRAM controller in Qsys instead of on-chip RAM? How would I then make sure that it communicates with the SDRAM on the board. Looking at the DE0-nano user guide , there are many pins connected to the SDRAM so which pins would I need to assign and to where? Cheers, Paul - Altera_Forum
Honored Contributor
--- Quote Start --- I have sent you an email also. --- Quote End --- Thanks! --- Quote Start --- I have tried that JTAG-to-Avalon master tutorial but it just uses on-chip RAM. If I wish to use the separate SDRAM on the DE0-nano board, do I just add an SDRAM controller in Qsys instead of on-chip RAM? --- Quote End --- The tutorial is written to be board agnostic, so it does not use any external devices. In your case, you would simply *add* an SDRAM controller to the Qsys system, and assign it a base address that does not conflict with the existing memory map. --- Quote Start --- How would I then make sure that it communicates with the SDRAM on the board. Looking at the DE0-nano user guide , there are many pins connected to the SDRAM so which pins would I need to assign and to where? --- Quote End --- The attached zip file contains a top-level design and a constraints file that defines all the pins on the DE0-nano. If you cannot figure out how to add an SDRAM controller to the design, I can take a look, but you should try to figure it out, as it will be a good learning experience. You should also try to figure out how to create a simulation for the system (that will likely be a little trickier though). Cheers, Dave - Altera_Forum
Honored Contributor
I have added the SDRAM controller to the qsys and assigned all the pins.
The next step tho I have trouble with and that is how to use it. I have tried that example of writing to the RAM from the host computer via the jtag interface but would like to do it differently. How to read and write to the SDRAM with either VHDL code or a NIOS program? Must I specify the RAM address everytime on the address lines or do I just send data on data lines? How then would I read the data at a specific SDRAM location? I have been trying to find an example of how this is done but no success yet. Cheers, Paul