3 ms·
The problem with C is that it has the same problem as hardware development but people blame the developer instead. With HDLs you have both simulation and synthe
by imtringued 3y ago
The problem with C is that it has the same problem as hardware development but people blame the developer instead. With HDLs you have both simulation and synthesis and these two can have different behaviour, exactly like C.
The primary difference however is that say VHDL's std_ulogic type explicitly encodes what is considered undefined behaviour in C such as accessing uninitialised memory. So called U and X propagation turns expressions that depend on uninitialised values into U and X respectively. This means that your simulation tells you where the undefined behaviour is lurking. You can still synthesize your buggy hardware, nobody is stopping you, but it's not hidden.
Meanwhile with C you get into the "when did you stop beating your wife" scenario, where you are assumed guilty until proven innocent.
- pjmlp 3y agoThe difference being that when C code goes wrong, most developers just shrug their shoulders unless they work on a regulated industry. Whereas when hardware goes wrong, usually people deal with it like any faulty product.