feat(L01): add number systems and storage card
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
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
|
||||
Reference in New Issue
Block a user