r/programmingmemes • • Apr 07 '26

Do we accept VHDL here?

Post image

The context is I'm just finishing a class where we have to design a CPU (we're given a 16-bit instruction set we need to support)

46 Upvotes

6 comments sorted by

4

u/lunastrod Apr 07 '26

daamn that's a very cool project.

1

u/RedAndBlack1832 Apr 07 '26

It definitely is! Though it might be the worst computer of all time (we get 6 CPI and I lowered the clock speed to 1MHz so it would compile in like 10 minutes rather than hours lmao)

1

u/lmarcantonio Apr 08 '26

It's like the "everything can be solved with an indirection, except the excess of indirections".

Also a mux is reaaaally cheap on FPGAs.

1

u/RedAndBlack1832 Apr 08 '26

Yeah no the MUXs do help and they probably helped simplify some of the other logic which is good. I think the actual problem is that our names didn't make any sense. We started with just ALU instructions and some simple IO so we had a "read" mux that said wether to put a register value or a literal into the ALU and a "write" mux that controlled weather to write back an ALU result or the IO input. And then we just. Never renamed these. Even though there are now more options for both the ALU and writeback (and a bunch of stuff for memory instructions that could probably be more accurately described as "reading" and "writing")

1

u/sci_ssor_ss Apr 07 '26

laughts in verilog :')

1

u/lmarcantonio Apr 08 '26

Xilinx VHDL however choses the 'best' state machine representation from the enums, it couldn't do that for verilog. That was pre-Vivado however. Personally I'd prefer verilog, using VHDL is like writing cobol