
Cascade: A Just-In-Time Compiler for Verilog - sorrow17
https://github.com/vmware/cascade
======
rachitnigam
Question as a Verilog novice. The timescales for execution vs compilation of
large-ish programs seem quite different (you’d have multiple simulations done
by the time you finish compiling). If this is the case then I’d probably would
like to iterate to a new design right after a simulation. Does this tool build
some sort of caching for the compilation process which can quickly recompile
the design after minor changes?

~~~
krupan
You have to be careful with terminology. There is compiling to a software
executable, which you then execute to simulate your design. Then there is
compiling to a bitstream that goes into an FPGA to implement the design in
real hardware. This type of compilation is really a multi-step process of
synthesis, place, and route.

Compiling for simulation usually pretty quick. Depending on how many clock
cycles of stimulus coded into your simulation, the execution of the simulation
can be also be pretty quick or hours and hours long.

Compiling for the FPGA usually takes much longer than compilation for
simulation. Running the same number of clock cycles as your simulation is much
much faster in using real hardware (FPGA) than the simulation.

Reading the description in TFA, it sounds like this tool does both types of
compiles. I hope I have more time to play with it soon, because it sounds like
it even offers to produce a complete software/hardware system out of your
verilog (not all legal verilog syntax can be compiled to hardware, but it can
all be compiled to a software executable).

------
haberman
Can anyone recommend introductory material for programming in Verilog? I'm a
software guy who wants to dabble in hardware. I want to get just a
straightforward explanation of the syntax and semantics of the Verilog
language, and basic practices like how to write tests. I haven't come across
anything on the Internet that seems to address this well.

~~~
ThrowawayR2
> _Can anyone recommend introductory material for programming in Verilog? I 'm
> a software guy who wants to dabble in hardware._

I'm not really sure such a thing exists (or can exist). Verilog isn't
"programming" in any way most developers are familiar with, it's a way of
describing how logic gates are interconnected. An understanding of digital
logic is necessary to use Verilog/VHDL successfully.

That being said, you might take a look at Brown's " _Fundamentals of Digital
Logic with Verilog Design_ ", which seems to cover the topics you'd need to
succeed.

~~~
haberman
> I'm not really sure such a thing exists (or can exist). Verilog isn't
> "programming" in any way most developers are familiar with, it's a way of
> describing how logic gates are interconnected.

I've just finished reading Code ([https://www.amazon.com/Code-Language-
Computer-Hardware-Softw...](https://www.amazon.com/Code-Language-Computer-
Hardware-Software/dp/0735611319)) that builds up a RAM array and 8-bit CPU
starting from relays. I'm familiar with the concepts. I'm just looking for
something that explains how to express these concepts using Verilog.

~~~
ThrowawayR2
No disrespect to Petzold intended (I'm a huge fan of his technical works) but
"Code" is at best at a pop-sci level. It prepares one for doing digital logic
as well as "A Brief History Of Time" prepares one for doing coursework in
cosmology.

Try the Brown book or Mano's " _Digital Design_ " (my preference; took a while
to remember his name) and see if it works for you. Good luck.

------
sjroot
This is awesome! While I write mostly higher-level code nowadays, my
undergraduate senior project was in Verilog and I really loved using it.

------
poslathian
This is amazing work. Kudos and thanks!

