13 lines
316 B
Systemverilog
13 lines
316 B
Systemverilog
module positional_encoding(
|
|
input logic [7:0] value,
|
|
output logic [7:0] bits,
|
|
output logic [3:0] hex_high,
|
|
output logic [3:0] hex_low,
|
|
output logic [8:0] weighted_sum
|
|
);
|
|
assign bits = value;
|
|
assign hex_high = value[7:4];
|
|
assign hex_low = value[3:0];
|
|
assign weighted_sum = {1'b0, value};
|
|
endmodule
|