Previous | Next --- Slide 7 of 59
Back to Lecture Thumbnails
matteosantamaria

FPGAs are very popular in HFT, and I'd be interested in learning how to program them. How do people learn FPGA programming? Does anyone have any resources they could recommend?

12345

@matteosantamaria I have programmed FPGA in Verilog, so potentially you can read some of its doc. Based on my personal experience, writing code in Verilog is very different from trying normal software code, so You may also want to try other languages like VHDL.

sanjayen

@12345 I haven't ever programmed in Verilog - what makes it very different from more traditional code? Are there practical reasons (I'm imagining speed?) why we can't have more generalized ways to program FPGAs, either with libraries or other languages.

12345

@sanjayen The goal of Verilog is to describe the hardware you want to implement, so you have to, for example, use code to describe how to connect wires etc. It is also really hard to debug. Imagine you need to compile your code for minutes or even hours and you don't have a console to debug your code. I think there are projects that try to compile C or Assembly code into Verilog and I also think VHDL's syntax may be more like C, but I am not super familiar with these languages options.

riglesias

@sanjayen In addition to what @12345 mentioned, you program sequential "blocks" in Verilog. Statements within a block can run sequentially, but blocks themselves are running concurrently, so there is a lot of care needed to ensure correctness.

AnonyMouse

Can confirm as an Electrical Engineering major that Verilog is VERY different from C and not gonna lie I sort of don't want to touch it anymore which is why I'm doing more CS classes at the moment. It's basically just very primitive programming. You don't have objects or even datatypes (at least not ones similar to C's) everything is just wires and bits where each wire is running concurrently within your code which much like @riglesias said makes debugging quite complicated especially in large systems. If anyone's interested EE108 and EE180 both cover hardware design and I do believe it's a very interesting topic (albeit headache inducing) which really gives you a huge appreciation for how much effort Intel/AMD/NVIDIA engineers have put into designing incredibly robust and powerful hardware that we can fully abstract to the average programmer to save them the headache of working with bits and signals.

Please log in to leave a comment.