Haider Posted July 27, 2014 Report Share Posted July 27, 2014 Hi everyone im Haider Ali from iraq4th stage Computer Engineering Techniques maybe i have mistakes in my englsih ... sorry about it While I'm writing this I tired from how many time asking about itI was thinking it's easy to learn FPGA and then make your idea real by using itAsking about problem in FPGA and get right answer is million time harder than learning FPGA and VHDL professionally…….. I have graduate project next year in college so I decide to choice good idea and make itI want to work on fiber optic and FPGA by making device to convert the data signal from USB port or Ethernet Port to light by encode it and translate it via Optical Fiber to another Station to decode it and reconvert it to the Original Digital Discrete signal …I have some question about this and how should I workI make thread about my problem I Xilinx Forum buy I wish I didn't make it before I don't know why this company have Forum if they don't reply to the postAfter month someone reply by tell me go and read support file …I post the same thread in Altera Forum again and I get many replies from many membersThis link for my thread in Altera Forum please read it to understand what I want. http://www.alteraforum.com/forum/showthread.php?t=45282 My first problem in this project in how to decode USB protocol signalThis is Daixiwen reply "You can find a few solutions to decode USB signals directly in an FPGA but they usually licensed, which means you will have to pay to use them. There is a free core available at Opencores but I don't know how usable it is. There is another problem though, for these cores to work you will need an external PHY chip. I don't know about any development kit that has one, so it means you would have to do your own daughterboard with the correct chip.Another solution is to use a development kit that already has a USB interface. Almost all the Altera kits have one, but it is used for JTAG access. You can reprogram the MAX II chip to use the USB interface for your own purposes, but then you don't have the USB blaster functionality anymore and can't configure the FPGA without an external USB-Blaster. Other kits such as the one you show here, or some Altera Cyclone V kits, have a second USB connector that you could use without loosing the JTAG functionality. But note that in all those cases, you won't emulate a generic USB device. Usually the integrated USB functionality on those kits is a serial link (UART) so you won't be able to directly emulate a USB flash drive." What I understand from Daixiwen said on post #6, I will need to decode USB protocol on USB Device side(FPGA1) and pass command to another Board(FPGA2) via optical, and FPGA2 will decode your optical command and issue USB protocol command in order to receive data from USB Flash Driver. And then send these data(from Flash Driver) back to FPGA1 and FPGA1 will provide data to PC via USB protocol But Daixiwen said there is no board have the ability to analyze USB protocol with speed 480 MBPSI get no more comment in this thread about it I send many messages in Facebook for many people and make many post in FPGA Group and FPGA Developer Group and I don’t get something better than my thread in Altera Forum Today visit sparkfun try to read all comment in Mojo v3 page and all Papilio model PagesAfter I read it I visit and go to learn sectionI read "High Speed Data Transfer Between Two Papilios" tutorial http://gadgetfactory.net/learn/2013/02/15/high-speed-data-transfer-between-two-papilios/ I find it great project I didn't know that papilios have the ability to translate data in high speedI feel one half is solvedIf I connect laser diode with high speed raise time and fail time responseI could generate high speed discrete light beam via optical fiberBut there is another half of my problemIs how to analyze USB PROTOCOL? I read this tutorial "VHDL SD Card Writer v1.0 For Papilio" In learn section too The person who make this tutorial use USB Card Reader as I thing so the USB analyze problem is solved too I wish if any member know anything tell me and post in this thread and can I make this project by using papilio board and analyze USB Port This is last time I asking about this idea if I get help from you I will work on it if not I'll leave it Thank you very much MY REGARDS Link to comment Share on other sites More sharing options...
alvieboy Posted July 27, 2014 Report Share Posted July 27, 2014 Halder: At what speed do you want to transfer data ?What encoding/protocol you want to use in the optical part ? is that a full-duplex or half-duplex protocol ?Do you really need to use USB ? Or just using it as a transport protocol ? (implementing USB is really hard) Best regards,Alvie Link to comment Share on other sites More sharing options...
Haider Posted July 27, 2014 Author Report Share Posted July 27, 2014 Halder: At what speed do you want to transfer data ?What encoding/protocol you want to use in the optical part ? is that a full-duplex or half-duplex protocol ?Do you really need to use USB ? Or just using it as a transport protocol ? (implementing USB is really hard) Best regards,Alvie thanks for reply i want to send data at same speed that USB 2.0 have 480 Mbps i want to use full-duplex protocol but sir what is the hard in USB protocolthe use have D+ and D- these termials transfare discrete data signal i have have an idea if analyze use protocol is hardWhy we don't consider as a signal sourceby another world there is many Digital logic analyzer in the internet based on FPGA like this Great one https://www.kickstarter.com/projects/dreamsourcelab/dslogic-multifunction-instruments-for-everyone so we could analyze the signal from D+ and D-then process it inside FPGA to run the Laser Diode to Generate the Pulse Light Beam i forget some thing DSlogic based on Spartan 6andPapilio Pro FPGA also Based on Spartan 6 so i thing there is no problem to make the Papilio Analyze the Signal as Logic Analyzer...or you what to say some thing what about this sir Link to comment Share on other sites More sharing options...
offroad Posted July 27, 2014 Report Share Posted July 27, 2014 >> I was thinking it's easy to learn FPGA and then make your idea real by using it It is not. It is 1000x harder than it looks.You would use a "virtual com port", send serial data from PC to FPGA. This is relatively easy. Even easier, implement a pseudorandom generator to create the data. But, sorry for being direct, you're totally in over your head. Proposal: Why don't you buy some cheap low-end FPGA board. Papilio is fine, so is any other, just don't try to anticipate what you think you need.What you really need is one LED and two months hard work. Learn to make it blink, control it through the PC (USB-serial port and UART). When you can do that, you'll be in a much better position to judge the task at hand. It would be realistic for an experienced engineer but not if you're starting from square one. PS you don't actually have to buy it, just get the design tools and learn to use them (and get used to simulate: Hardware just tells you "it doesn't work". Not "why").The tools are neither beginner- nor user friendly, takes a lot of patience. Link to comment Share on other sites More sharing options...
hamster Posted July 27, 2014 Report Share Posted July 27, 2014 I have often thought about a USB 1.0 stack (12Mb/s), based on the virtual USB HID for Arduino that you can set up with a couple of Zeners and a few resistors (http://www.practicalarduino.com/projects/virtual-usb-keyboard) However, even that is too hard for me to comtemplate moving to a FPGA, - every time I start to attempt it I feel like I am pounding my head against a brick wall. Link to comment Share on other sites More sharing options...
Haider Posted July 28, 2014 Author Report Share Posted July 28, 2014 offroad thnk you for postingyou said the truth but your comment made me desperate hamster thank you for posting i dont thing arduino have the ability to send data in speed up to 12Mb/salso this tutorial show how to connect device have usb port to arduino not to use usb data signal or analyze it because arduino have just Atmel Microcontroller 16 Mhzthat's all Link to comment Share on other sites More sharing options...
offroad Posted July 28, 2014 Report Share Posted July 28, 2014 You should maybe discuss this project with a university supervisor, set up some realistic targets and put you on the right track with the "architecture". Generating a 12 Mbit/s signal is trivial, simply put it onto a block ram.It can be as simple as the following (this is quick-and-dirty, haven't actually compiled it) module myPatternGenerator(input wire clk, output reg outPos, output reg outNeg);reg [255:0] sequence = 256'b01001001010110111011...;always @(posedge clk) beginoutPos <= sequence[255];outNeg <= !sequence[255];sequence <= {sequence[254:0], sequence[255]};endendmodule I'd expect clk can go up to maybe 170 MHz, higher with careful coding. You can generate it inside the FPGA from the oscillator on the FPGA board.Then delay it by a variable amount inside the FPGA. Analyze synchronously within the same circuit, and here it starts to get interesting. You can test this with a simulator, i.e. "iverilog" and "gtkwave", if you like. Or use "isim" that comes with the Xilinx tools. Link to comment Share on other sites More sharing options...
Haider Posted July 28, 2014 Author Report Share Posted July 28, 2014 hmmmmmmm............ what FPGA board you suggest to me to startthere is Nexys 3Nexys 4Papilio ProPapilio Duo(im waiting this Board)Altera DE1Altera DE1-Soc every one i asked him about xilinx he toold me there is no enough materials and help file on the internet as like alteraalso xilinx forum not like Altera Forum is better thousands time and i try that by myself its really hard to choicei dont want Spartan 3e its old and don't support matlab Link to comment Share on other sites More sharing options...
offroad Posted July 28, 2014 Report Share Posted July 28, 2014 >> its really hard to choicethat's why I'm saying it doesn't matter as long as it's cheap (you don't want to accidentally destroy a 3000$ board while learning to blink a LED). Consider it a write-off. If you don't give up, it will be the most important 100 bucks you have ever spent, career-wise. Papilio Pro is my personal favorite, cheap, easy to deal with (papilio loader) and you won't get ripped off on shipping. But this is the Papilio forum, after all.Again, don't try to anticipate what you think you need. There's a whole industry thriving on fools who do this, the mission being "squeeze the most money out of them before they invariably give up. Many (most?) do.For example, after realizing that "comes with a free design kit CD" is not the same as "comes with a license to use it". Oops. Sorry, that's another USD 3k. Per year. And it won't let you use much of the FPGA's functionality like DRAM controller, needs more licenses.That's one reason why I'm suggesting you get some support from the school or you'll be learning all this the hard way. Link to comment Share on other sites More sharing options...
Haider Posted July 28, 2014 Author Report Share Posted July 28, 2014 thanks for advice what about papilio duo i like it very much (cheap and nice and have good spec tech) when it will be released Link to comment Share on other sites More sharing options...
Haider Posted August 1, 2014 Author Report Share Posted August 1, 2014 last what i do is sending email to Benjamin David Lunt asking him to read this thread trying to help methis man have great website and tutorials about FPGA and Microcontroller also programming with USB Interface and use it in electronic projectsi got his answer and i thing that's enough to mei will try to do it by myself from scratchthank you very much Ben for your answerand thanks for every one post trying to help meadmin please close the threadthe answer from BEN :-Hi, First let me say that I congratulate you on your desire tobuild this project. After reading the replies in the links you sent me, and notknowing what kind of background and experience you have withelectronics, I might have to agree with some of the replieswhen they say "start smaller". A blinking LED is a prettyeasy project once you get started and learn a bit. http://www.fysnet.net/docs/appendixq.pdf However, if I was going to create a communications devicebetween two PC's, 100 meters apart, using fiber optic cable,I would start with a device at both ends, similar as yousee in the .pdf file above. Each device would allow you to send and receive data toand from the device using a low- or full-speed USB porton the PC. Then I would use the ATTiny2313 to send bits (flashes of light)across the fiber optic wire. However, you will have to write software (firmware) for the2313 to send start, stop, and parity bit information, justlike the old time serial ports do. This would also be considerably slow, maybe 8 megabits per second,since the 2313 runs at about 16500000 Khz (or 16.5Mhz). (NormalUSB communication is 12Mhz, for low speed devices such as theone listed above) However, this would accomplish the task you are trying to do, thoughconsiderably slow. You would also have to have an external power supply for the sendingand receiving diodes, (each device having one of each). The USB's5.0 volts, 500milliamps most likely will not power them. Here is my suggestion, and please take it as one guy who learnedhands on just as explained above, to another with all due respectand admiration for your desire to learn. 1. Buy a cheap bread board, something similar to http://canada.newark.com/twin-industries/tw-e40-1020/breadboard-solderless-830-tie/dp/56T0250?MER=TSTSO_S_C_BreadBoard_None2. Buy all the components described on page three of http://www.fysnet.net/docs/appendixq.pdf (minus the break out board (line 2)).3. Assemble the three projects described in that appendix. Once you have a good knowledge of what they do and how they do it,I think you could go quite far creating a device to send and receivedata across a fiber optic wire. You will need to realize, though, that it would be considerably slow,and maybe even unreliable, though if you are simply doing it for thetask, then by all means, do it. Now, there are a few other questions you had, that I will try to answer. You want to be able to grab the data from D+ and D- and simply senda 1 or 0 bit along the optic depending on the values D+ and D- are.This will not work. The USB must have an ACKnowledge that you receivedthe data, etc. You can not simply monitor D+ and D-. The USB willexpect bytes in return after each packet is sent, using these twopins. Second, by sending the commands explained in the AppendixQ .pdf listedabove, you will see that you can bring high one of the pins of the2313, maybe hooking it to pin 7 of your "transmitter" as you explainin your post(s), keeping in mind the amount of current supplied bythe 2313 will be less than 500milli-amps. Therefore, you may needan external power supply and a "relay" (a transistor?). I hope that I have been of some help to you. Ben Link to comment Share on other sites More sharing options...
offroad Posted August 2, 2014 Report Share Posted August 2, 2014 well, to send a signal through USB and a fiber optic cable, you can even take a simple USB-to-serial chip:https://www.sparkfun.com/products/9873then a LED on one end and a photodiode at the other end, going into a 2nd USB-to-serial chip (or even into the receiver section of the same chip).There is no need for microcontrollers, FPGAs etc.But this won't earn you any credits in a computer science course, it's just basic electronics tinkering. And no, driving fiber optics with a simple UART is not how it's done in real life even if the bits will go through just fine if you lowpass filter the detector to 0.01 % of its designed bandwidth. Link to comment Share on other sites More sharing options...
Haider Posted August 2, 2014 Author Report Share Posted August 2, 2014 offroad good to see you post again you are right about using USB to URAT for Building but it will be slow now im thinking in idea more scientific than fiber optic idea ... i want to ask you about Papilio Duo in any time it will be relased Link to comment Share on other sites More sharing options...
Jack Gassett Posted August 4, 2014 Report Share Posted August 4, 2014 Hello Haider, We are working on the manufacturing of the Papilio DUO right now but I don't have a solid release date. December is the official release date, I'm hoping to have it ready sooner, but can't say yet if that will happen. Thanks,Jack. Link to comment Share on other sites More sharing options...
Haider Posted August 10, 2014 Author Report Share Posted August 10, 2014 but mr. jack it's to long waiting for December to get Duotry to make it complete early Link to comment Share on other sites More sharing options...
EtchedPixels Posted August 10, 2014 Report Share Posted August 10, 2014 USB host is hard because its a very complicated protocol you need to speak and the timings are tricky. USB slave is fair bit simpler, at least at the lower speeds. Simply using the USB connector is also not necessarily easy because on most FPGA boards it isn't wired to the FPGA directly in a useful fashion. The other problem for board choice and software is that Haider is in Iraq, and a lot of FPGA devices and software are on the controlled lists so export rules may be a problem (especially as the US enforces them its end with the 'shock and awe' scheme). Hamster: I assume you've seen http://jorisvr.nl/usb/, which only needs a UTMI buffer ? Alan Link to comment Share on other sites More sharing options...
Haider Posted August 10, 2014 Author Report Share Posted August 10, 2014 Mr. alan thank you very much i want to ask about Papilio ProDoes this board support matlab (system generaor) and does it have MicroBlaze Processor because i have another idea about using FPGA in Graduate project and i want to use matlab i think Papilio is enough if its support matlab like Xilinx Atlys or Nexus 4 my regards Link to comment Share on other sites More sharing options...
EtchedPixels Posted August 10, 2014 Report Share Posted August 10, 2014 Neither the Papilio (as far as I can tell) nor the software you'd need (ISE) are available to Iraq. The rules changed not long ago on field programmable devices and I think the low end ones may now be available, but good luck anyone figuring out in a hurry which bits you can obtain. Link to comment Share on other sites More sharing options...
Haider Posted August 10, 2014 Author Report Share Posted August 10, 2014 thanks again mr alan i want to ask you about this man http://jorisvr.nl/usb/, he make USB data transfer in VHDLwhat is the purpose of his project im interesting to know Link to comment Share on other sites More sharing options...
shinefutureee Posted December 27, 2014 Report Share Posted December 27, 2014 Oh my GodDon't make FPGA a monster...Let's to think about implementing an FFT inside an FPGA thenBuilding 3D LED cube and finally mix them together to haveA 3D equalizer that can show sound harmonics via several Fantastic patterns in 3D LED cube just like Media player...Well what is your idea? http://techtriosonline.com/wp-content/uploads/2014/12/led-3d-cube.jpg Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.