Author Topic: Verilog: "Lines of code" versus device utilisation  (Read 4557 times)

0 Members and 1 Guest are viewing this topic.

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Verilog: "Lines of code" versus device utilisation
« Reply #25 on: November 08, 2021, 09:52:28 pm »
This really seems like a case of trying to compare two arbitrary metrics and look for correlation. The thing about HDL is it is not code in a traditional sense, it is not instructions being executed, it is a description of a circuit. The thing about descriptions is that there are so many ways one can describe the same thing that you could end up with hundreds of pages or just a few sentences, both accurately describing the same thing. For example if you want to describe a cube drawn on a piece of paper you could just say there's a cube drawn on a piece of paper of this size originating at whatever coordinates, or you could say there's a line drawn from this point to that point and another line drawn from another set of coordinates and so on. Both are perfectly valid methods of describing the drawing but from different abstraction layers with vastly different length of description. There are many, many different ways of describing the same circuit, and there is not always one correct way.

Lines of code in general is not a very useful metric, but is even less meaningful with HDL than with a procedural languages.
 
The following users thanked this post: Someone

Offline NorthGuy

  • Super Contributor
  • ***
  • Posts: 3246
  • Country: ca
Re: Verilog: "Lines of code" versus device utilisation
« Reply #26 on: November 08, 2021, 10:28:58 pm »
From the user who consistently refuses to contribute actual examples:

Hehe. I did provide lots of examples. I described them in English, which is an appropriate language when talking to humans. The hardware I described would not change if it was described in Verilog, VHDL, Chisel or whatnot. The hardware design exists regardless of how it is described, regardless of the language, and regardless of the coding style. You can even get logic ICs and build your design without ever describing it at all.

That's the same as an engineer designing a bridge. The bridge is the same whether the engineer prepared blueprints, CAD files, plain text instructions how to build the bridge, or whatever else which contains enough information to build the bridge. You wouldn't care then if the size of the bridge is correlated with the size of the CAD files, would you?
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf