yosys/docs/resources/PRESENTATION_Prog/absval_ref.v

4 lines
97 B
Verilog
Raw Normal View History

2014-06-22 05:50:29 -05:00
module absval_ref(input signed [3:0] a, output [3:0] y);
assign y = a[3] ? -a : a;
endmodule