HDL vs Software Mentalities

Status
Not open for further replies.
It's worth noting that C code support seems to be improving.

I did a proof of concept feedback loop implementation in Vivado HLS and liked the results. The resulting code was actually higher performance than my verilog in terms of clock latency because I had placed about 4 pipeline registers in logical places (i.e. the output of the sub modules) meanwhile the HLS had optimized their placement only where/when needed.

I opted not to use HLS however because although the proof of concept was nice and compact and simple all the necessary bells and whistles such as overflow detection/correction etc would have made the C code about as long and complex as the verilog while adding another whole layer to the code-chain. The bottom line is that C isn't a ton higher level verilog.

Though there is a big plus to C considering how many algorithms have reference implementations in C and how many other programs can take C as an input. In my case I would have been able to drop my error amplifier code directly into PSIM for simulation along-side the power stage.
 

The best thing you can do is draw the hardware out on a piece of paper before you write the HDL code. The process of translating a digital circuit directly into rtl will help get away from the software mindset. As far as a book, I recommend Digital Logic and Microprocessor Design with VHDL by Enoch Hwang to get started.

Aside from that, reading and understanding code from more experienced designers is a big help.
 
Last edited:

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…