summaryrefslogtreecommitdiffstats
path: root/translated_examples/signextend.v
blob: 91622d22839b31843578bff1647c96ced3735e3c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// no timescale needed

module signextend(
input wire [15:0] i,
output wire [31:0] o
);





  assign o[31:24] = {8{1'b0}};
  assign o[23:16] = {8{i[15]}};
  assign o[15:0] = i;

endmodule
OpenPOWER on IntegriCloud