2024-03-20

Introduction

Summary

keywords

TODO

HW

Exercise*

Next time


Axiom Simplification

Which circuit is better?

  • Informality

  • data propagation - concerns because of heat.

Verilog

module creation

  • (recommended) gate declaring convention : write the wiring in the order of direction input to output.

  • (recommended) define input and then output.

  • there are pre-defined operation keywords, such as not,or, and.

  • module is a function. keyword module.

  • [7:0] x means that the array of input needs 0 to 7, with xxxxxabc for each index.(x is don't-care notation)

  • [startbit:endbit], with endbit-startbit+1 bit size. The following exactly expresses the same thing as the gate definition on the previous code.

main module

  • signal : 0,1 value. cannot take two states at the same time.

  • $ sign stands for a macro function. $display stands for printf in c.

  • # sign stands for operator of delaying time. #1 means to delay time by 1 time step.

To run with Icarus Verilog

Last updated