8 ms·
In the embedded world C is the dominating language, for sure, and VHDL or Verilog are used, not only for prototyping but for regular FPGA code. But it looks co
by cnvogel 14y ago
In the embedded world C is the dominating language, for sure, and VHDL or Verilog are used, not only for prototyping but for regular FPGA code.
But it looks completely different from C:
---- C example ----
int main(int argc,char argv){
int i;
for(i=0;i<argc;i++)
printf("argv[%d]=%s\n",i,argv[i]);
return 0;
}
---- VHDL example (from de.wikipedia) ----
ENTITY DFlipflop IS
PORT(D,Clk: IN Bit;
Q: OUT Bit);
END DFlipflop;
ARCHITECTURE Behav OF DFlipflop IS
CONSTANT T_Clk_Q: time := 4.23 ns;
BEGIN
PROCESS
BEGIN
WAIT UNTIL Clk'EVENT AND Clk='1';
Q <= D AFTER T_Clk_Q;
END PROCESS;
END Behav;