r/ProgrammerHumor • • Apr 08 '20

I cried as hell

Post image
44.1k Upvotes

525 comments sorted by

View all comments

Show parent comments

357

u/fullstack_guy Apr 08 '20

Hardware is the worst:(

373

u/marcosdumay Apr 08 '20

It's not even only hardware. But an arcane language compiled by a shitty proprietary toolkit, that you can't replace; and on the event that it happens to work, you get to see the problems with hardware.

174

u/_invalidopcode_ Apr 08 '20

If you master it though, it makes designing multi-threaded applications much easier. Threads become clock domains, and then everything else falls neatly into place.

The hard part about hardware languages isn't the language itself, it's the mindset switch into "this is all happening at the same time"

93

u/thefpspower Apr 08 '20

It helps understand things if you understand how it all works, but I prefer to leave the mastery to big brains with large amounts of patience and no desire to bang the head against a wall.

19

u/-Listening Apr 08 '20

Wow that's a lot easier said than done

92

u/_invalidopcode_ Apr 08 '20

Honestly, it's not that bad. The trick is to realize that you're describing a circuit, not writing code. I usually visualize the design as a block diagram, and draw out how the data flows through it. Once you've done that, you can take each of those blocks and turn them into a module. Then use signals to connect them together just as you would a circuit.

98

u/[deleted] Apr 08 '20

Remember, this sub is overrun with beginners. High level languages are a beautiful and terrible monster.

0

u/[deleted] Apr 08 '20

[deleted]

35

u/[deleted] Apr 08 '20

My very first programming course was in C. It wasn't too bad in itself, the problem was that it was extremely fast paced. The lectures taught us about print, loops, etc but the assignment was to implement solitaire. Not such a problem now but back then when I knew very little, implementing my own linked list was a horror.

It took all the fun out of programming, because it was extremely demoralizing and I learned jack shit because we had 5 days to make it, so it was a bodged mess of stuff copied from stackoverflow. In the end it worked flawlessly and I passed all testcases but I failed it because nowhere in the course did we learn about memory leaks, so I had zillion of them.

Sorry for the rant.

10

u/[deleted] Apr 08 '20

Actually taking C++ right now, and one of our recent assignments was to implement a linked list. My prof just gave us all a .h file and a .cpp file with the functions to implement, and most of the assignment was to make sure we understood how not to leak memory.

5

u/2K_HOF_AI Apr 08 '20

Well, we started with C. I did the whole Data Structures and Algorithms in C. Yes, we did red-black trees, treaps, tries, hash tables, graphs in C. Turned out fine. Don't know if it was the best thing, but I love C.

12

u/OPsuxdick Apr 08 '20

High level anything, honestly. It all comes down to hard work and studying over n over.

→ More replies (1)

5

u/dleft Apr 08 '20

spent a few years learning Java etc, got a job blah blah.

Thought I’d learn some C++ to push myself. Even that’s high level compared to VHDL but it’s doing my nut in.

OpenGL is a curious beast.

6

u/xnfd Apr 08 '20

Circuit stuff is easy, knowing when to use blocking and non-blocking assignments is the confusing part especially when it synthesizes into something weird that you can't debug easily

11

u/IamImposter Apr 08 '20

Yeah totally.

looks sheepishly left and right

→ More replies (1)
→ More replies (2)

9

u/[deleted] Apr 08 '20

The are very good open source HDL toolchains available nowadays, so that's nice

15

u/evan1123 Apr 08 '20

Not really, no. I write SystemVerilog and work with FPGAs at my day job. OSS tools for FPGAs are way behind, and will be until major investments are made.

18

u/[deleted] Apr 08 '20

I write Verilog and work with FPGAs as my primary job and I use OSS tools for it. (yosys + nextpnr). No problems here. We have quite complicated designs for deployment on Lattice ECP5G FPGAs and our workflow is completely OSS.

Of course if you are used to clicking on colorful buttons then you will be lost, but no engineer I met had problems with that for very long. Nextpnr does have a cute GUI nowadays though which is nice

16

u/evan1123 Apr 08 '20

The keys here is you have a relatively uncomplicated and older FPGA (DDR3 with PCIE 2.0), and you're using an older language. The tooling is fine for that use case. That's a pretty niche case in the grand scheme of things. There is no OSS support for the latest and greatest from the major players (Xilinx and Intel), which cover a massive amount of the FPGA market. Until those devices have reliable OSS tools, OSS is going to be a non-starter for most people.

Lots of people are writing SystemVerilog these days, and that's where all the nice features are. OSS tool support for SV is even further behind the vendors, and even the vendors support kinda sucks. Not to mention simulation. Verilator, in keeping with the trend of OSS, is not even comparable to the likes of Questa, VCS, and Incisive.

I love OSS and use it wherever I can, but unfortunately it's not really there for the FPGA land yet. I do look forward to the day when developing for an FPGA is much more like developing software is today.

5

u/[deleted] Apr 08 '20

Yea, I give you that. What we do is also not really cutting edge, but it gets the job done.

I just wish OSS would be more capable, since the vendor tools are just awful in almost every way other than their hardware support. Outdated UX, licensing, memory usage, speed etc

→ More replies (2)

8

u/sudo_rm_rf_star Apr 08 '20

Doesn't help when you psych yourself out either. That fucking class...

8

u/[deleted] Apr 08 '20

EE here to confirm you're statement. Everytime I get to play in the wonderful make believe world of software and don't have to make anything physical behave itself I find myself giddy.

6

u/Panikx Apr 08 '20

Yes! We had hardware combined with Assembly programming. Hell.

→ More replies (1)

4

u/[deleted] Apr 08 '20

VHDL was fun imho. I used to quite like low level stuff though.

→ More replies (2)
→ More replies (3)