vault backup: 2025-02-03 10:19:24
This commit is contained in:
parent
dd8478dd48
commit
8d046bb2a6
@ -1,3 +1,9 @@
|
||||
# Half Adder
|
||||
|
||||
#
|
||||
|
||||
# Ripple Carry Adder
|
||||
|
||||
# Carry-Select Adder
|
||||
A carry select adder is built using two ripple carry adders, and multiplexing them together based off of the value of $c_{in}$. This is done for performance reasons, because when adding two numbers $x$ and $y$, we know $x$ and $y$ *before* we know the value of $c_{in}$. This means we can compute what the output of $x + y + c_{in}$ would be for $c_{in} = 0$ and $c_{in} = 1$ at the same time, then just toggle between the two possible values given the *actual* value of $c_{in}$.
|
||||
|
||||
|
@ -19,5 +19,16 @@ module foo;
|
||||
```
|
||||
|
||||
# Variables
|
||||
A variable is a data storage element. They retain the last impu
|
||||
A variable is a data storage element. They retain the last input given.
|
||||
|
||||
## Registers
|
||||
A `reg` can be used to model hardware registers because it stores a value until the next assignment.
|
||||
|
||||
### Integer
|
||||
A Verilog `integer` type is a 32 bit wide storage value. It does not *need* to store integers, it can be used for other purposes.
|
||||
```verilog
|
||||
integer count;
|
||||
```
|
||||
### Time
|
||||
A `time` variable is unsigned, 64 bits wide, and can be used to store time duration for debugging purposes. `realtime` is similar, but time is stored as a floating bit value.
|
||||
# Scalar and Vector Types
|
||||
|
Loading…
x
Reference in New Issue
Block a user