2020-08-15 15:50:36 +02:00
|
|
|
import "/nmigen_dg/*"
|
|
|
|
|
|
|
|
# result = pipeline 5
|
|
|
|
# bind (+) 1
|
|
|
|
# bind (-) 5
|
|
|
|
pipeline = data *: funcs -> data where
|
|
|
|
for func in funcs =>
|
|
|
|
data = func data
|
|
|
|
|
|
|
|
# cast to signed, extending the signal by one bit
|
|
|
|
to_signed = signal -> out where
|
|
|
|
out = Signal$ signed (signal.width + 1)
|
2020-08-17 00:34:12 +02:00
|
|
|
Comb$ out ::= signal
|