In computer science, the way memory is interacted with by the programmer is one of the core lessons that differentiates an undergraduate education from hobbyist tinkering, and confronting the nature of memory is also a major theme in industrial conversations about a piece of code or even an entire programming language. Continue reading →
Tag: verilog nuts and bolts
Verilog Nuts and Bolts: Feedback is Memory
The first principle of combinational logic is that a circuit must not contain feedback loops. No logic gate may have an output which could affect its input. The shortest way to explain why is just this: Feedback Is Memory. Continue reading →
Verilog Nuts and Bolts: Specifying a Thousand Transistors in One Line
Structural Verilog specifications are very handy for simulation purposes, especially when verification of a large scale system design is needed: you can be certain that all desired transistors are definitely where they need to be if your layout passes LVS, and your Verilog passes your tests. (You could still have trouble with timing of course!)
But that same Structural Verilog code that validates every logic gate in your design probably isn’t very fit for human consumption, and you definitely don’t want to write it by hand. You want to specify as much hardware in as little HDL as possible. Continue reading →
Verilog Nuts and Bolts: Modules
Let’s look at an example of a Verilog file that contains some modules. In the previous demonstration file, I lumped everything together into a single module called “test”. This is fine for simple modules (by which I mean modules which are simple to describe, not necessarily simple to build), but at scale, organization is handy. This module will also illustrate a simple example of two different approaches to the same modeling problem. Continue reading →
Icarus Verilog
When students in beginning digital circuit classes begin learning Hardware Descriptive Languages (HDLs), it’s often through a big, heavy GUI tool like Quartus. If you stick to small examples, this works fine, but in bigger tasks things can start to slow down a lot. It’s because of these slowdowns that I use Icarus Verilog instead. Continue reading →