The question needs some explanation:
Suppose I have an 8 bit value, say 8'b00000001 (1)
Suppose I have the module as follows:
module hex_decoder(hex_digit, segments);
input [3:0] hex_digit;
output reg [6:0] segments;
always @(*)
case (hex_digit)
4'h0: segments = 7'b100_0000;
4'h1: segments = 7'b111_1001;
4'h2: segments = 7'b010_0100;
4'h3: segments = 7'b011_0000;
4'h4: segments = 7'b001_1001;
4'h5: segments = 7'b001_0010;
4'h6: segments = 7'b000_0010;
4'h7: segments = 7'b111_1000;
4'h8: segments = 7'b000_0000;
4'h9: segments = 7'b001_1000;
4'hA: segments = 7'b000_1000;
4'hB: segments = 7'b000_0011;
4'hC: segments = 7'b100_0110;
4'hD: segments = 7'b010_0001;
4'hE: segments = 7'b000_0110;
4'hF: segments = 7'b000_1110;
default: segments = 7'h7f;
endcase
endmodule
to output on HEX0 and HEX1, I can do something like this:
hex_decoder h0(.hex_digit(value[3:0]), HEX0);
hex_decoder h1(.hex_digit(value[7:4]), HEX1);
and this will display 01 on HEX1, HEX0.
The only problem is that after 9, the values will become in hex letters. I want it so that if I pass in binary 10, (8'b00001010), then HEX1 HEX0 should be 1 0, not 0 A (as hex works)
How can I convert it like this?