Live data from Hacker News

FPGA Design for Software Engineers

walknsqualk.com

61–70 of 84 posts

Re: FPGA Design for Software Engineers

#61

little nitpick: it's "combinational circuits", not "combinatorial" (that's whole another part of math)

Do you have a reference for that? I'm genuinely curious since both terms are used in literature.

“An alternate term is combinatorial logic,[2] though this usage may be considered controversial.[3]”:

https://en.m.wikipedia.org/wiki/Combinational_logic

Re: FPGA Design for Software Engineers

#62
Thank you, that was interesting. I've programmed microcontrollers, but I've never tangled with ASICs or FPGAs. Too scared, I guess.

Your article has reduced my fear (and also, you mentioned the price of that Tiny FPGA board; at that price point, I don't mind too much if the magic smoke gets out).

Re: FPGA Design for Software Engineers

#63
post #28

The problem of FPGAs is their proprietary nature, and Verilog/VHDL are far from the best languages. Gladly there is a number of open-source projects aiming to close this gap - Yosys[1], SymbiFlow[2], Chisel3[3]/FIRRTL[4]. Some time ago I suggested[5] different open source projects should unite and reuse the common intermediate language, akin to LLVM in many software development and analysis tools. From my point of vi…

This is true!!! The real problem for me is the IP's. You really do need a DDR SDRAM controller for a lot of real project. Or a PCIE IP to communicate with external resources. If I just use the proprietary tooling it's just a click away to integrated this into a project. Open source has no answer for this as of yet.

Now that we have some nice FPGA's we can use I think this is the next biggest hurdle.

Re: FPGA Design for Software Engineers

#64
post #46
post #34

Earlier quoted context omitted.

Nice work. FPGA design appears to be very similar to GPU shader programming. First time I've read anything about FPGA design that connected. Usually FPGA stories get lost in data flow jargon and I learn nothing.

There is no programming in FPGA at all. You describe your hardware using hardware description languages like VHDL or Verilog.

Then no programming exists at all. When writing a C code you are describing a program that runs on the C abstract machine. The same thing holds for all "programming" languages.

Re: FPGA Design for Software Engineers

#65
post #28

The problem of FPGAs is their proprietary nature, and Verilog/VHDL are far from the best languages. Gladly there is a number of open-source projects aiming to close this gap - Yosys[1], SymbiFlow[2], Chisel3[3]/FIRRTL[4]. Some time ago I suggested[5] different open source projects should unite and reuse the common intermediate language, akin to LLVM in many software development and analysis tools. From my point of vi…

Also Hardcaml, which allows write FPGA code in OCaml.

https://www.youtube.com/watch?v=X1cgRXhpQLY

Re: FPGA Design for Software Engineers

#67
post #50

I am curious, why System Verilog isn’t mentioned in this article. It is much much better than Verilog and is used in industrial applications. What I am missing are 2 topics: timing analysis and debugging. Static timing analysis and proper timing constrains are crucial for functional design. No tool can differentiate without constrains a slow signal signal toggling LED every 10 seconds from DDR3 533 MHz differential c…

> Intel has Chipscope

I think "Chipscope" is a Xilinx thing actually.

Re: FPGA Design for Software Engineers

#68
post #9

This is a pretty nice tutorial! My courses in FPGA design in school taught me a ton about 1) concurrency and 2) good state machine design. In modern backend web development these topics receive so little attention (from interviewing all the way to writing technical specs, I've rarely encountered these topics brought up explicitly) but are important. I was a bit hesitant for this guide to suggest using C++ since I ten…

Simply not true. If you realize how the tools use loops you can create useful hardware just as easily as any other construct in a given HDL language.

Re: FPGA Design for Software Engineers

#69
post #60

Earlier quoted context omitted.

I disagree about for loops, you actually end up using these quite a lot in vhdl/verilog (with understanding about what logic you are going to end up with), if you want to do the same operation on multiple things: input [NUM_OF_MULTIPLIERS*32-1:0] a_in, input [NUM_OF_MULTIPLIERS*32-1:0] b_in, output [NUM_OF_MULTIPLIERS*64-1:0] mult_out reg [31:0] tmp_a, tmp_b; reg [63:0] tmp_mult; always @(*) begin mult_out = {(NUM_OF…

The key is that for loops are essentially pre-processor macros (like C) so they must have a fixed number of iterations known at compile time. So yes, you have a for loop, but it's very different to what you expect from a for loop in software.

Yes, the key is that loops are always unrolled so the number of iterations (number of copies of the hardware) is fixed. But whether the output of each iteration is used or not can be entire dynamic, potentially resulting in something very similar to a loop in software.

Re: FPGA Design for Software Engineers

#70
post #50

I am curious, why System Verilog isn’t mentioned in this article. It is much much better than Verilog and is used in industrial applications. What I am missing are 2 topics: timing analysis and debugging. Static timing analysis and proper timing constrains are crucial for functional design. No tool can differentiate without constrains a slow signal signal toggling LED every 10 seconds from DDR3 533 MHz differential c…

> Intel has Chipscope I think "Chipscope" is a Xilinx thing actually.

You’re right! It’s Signaltap II.
Post reply on HN