Basically I'm trying to display the sum or product of two numbers (inputted using switches on an FPGA) onto a 7-segment display. I know that both my addition and multiplication bits work fine, as I've tested them separately.
I'm having trouble with the LSB though. No matter what it just defaults to F and never changes. I think Verilog doesn't allow me to modify both Cout1 and Cout0 in the same case statement. Is there a workaround for this? See my code, below.
always@*
if (key1press)
casex(PrintSum)
// Hex 1 (MSB)
// Works!
5'b0xxxx : Cout1 = 7'b1000000; //0 if S[4] = 0
5'b1xxxx : Cout1 = 7'b1111001; //1 if S[4] = 1
// Hex 0 (LSB)
// Doesn't work :(
5'bx0000 : Cout0 = 7'b1000000; //0
...
5'bx1111 : Cout0 = 7'b0001110; //F
//default : begin
// Cout1 = 7'b1000000; //0 by default
// Cout0 = 7'b1000000; //0 by default
//end
endcase
Thanks in advance everyone :)