Wiring Units
The components on this page generally could be constructed in
other ways, but specifying them this way just makes things cleaner and
easier.
Module: shiftLeft
This simply takes an input, shifts it to the
left a number of bits, and returns an output of the same length. This is
notably useful for branch and jump address computations.
Parameters:
|
|
Name |
Default |
Description |
AMOUNT |
2 |
number of bits to shift |
WIDTH |
32 |
bit width of inputs and outputs |
|
|
|
Port Description:
|
|
Name |
Dir |
Width |
Description |
in |
In |
WIDTH |
input bits |
out |
Out |
WIDTH |
shifted output bits |
|
|
|
Symbols:
|
|
This component is only useful for block
diagrams.
|
|

|
|
|
Module: signEx
This is a sign extension unit that simply
makes copies of the highest bit.
|
|
Port Description:
|
|
Name |
Dir |
Width |
Description |
in |
In |
16 |
16-bit immediate |
out |
OUT |
32 |
sign-extended immediate |
|
|
|
Symbol:
|
|
This is included for completeness. You'll
want to use extender.
|
|

|
|
|
Module: extender
This more complex extender unit supports
extensions of arbitrary sizes. It also has control inputs to select between
types of extensions. The possible types include zero-extend, sign-extend, align
left, and align right
Parameters:
|
|
Name |
Default |
Description |
I_WIDTH |
8 |
input bit width |
O_WIDTH |
32 |
output bit width |
ZERO_EX |
2'b00 |
code to perform zero extension |
SIGN_EX |
2'b01 |
code to perform sign extension |
ALIGN_L |
2'b10 |
code to perform left alignment |
ALIGN_R |
2'b11 |
code to perform right alignment |
|
|
|
Port Description:
|
|
Name |
Dir |
Width |
Description |
IN |
In |
I_WIDTH |
input bits |
CTL |
In |
2 |
controls the type of
transformation |
OUT |
Out |
O_WIDTH |
shifted output bits |
|
|
|
|