Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module part6(input Clock_50, output [0:6] HEX7, HEX6, HEX5, HEX4, HEX3, HEX2, HEX1, HEX0);
- reg [2:0] A;
- reg [25:0] Q;
- always @ (posedge Clock_50) begin
- if (Q < 49999999) Q <= Q + 1;
- else begin
- Q <= 26'd0;
- A <= A + 1;
- end
- end
- HELO_Decode HD0 (A + 3'd0, HEX4);
- HELO_Decode HD1 (A + 3'd1, HEX3);
- HELO_Decode HD2 (A + 3'd2, HEX2);
- HELO_Decode HD3 (A + 3'd3, HEX1);
- HELO_Decode HD4 (A + 3'd4, HEX0);
- HELO_Decode HD5 (A + 3'd5, HEX7);
- HELO_Decode HD6 (A + 3'd6, HEX6);
- HELO_Decode HD7 (A + 3'd7, HEX5);
- endmodule
- module HELO_Decode (input [2:0] A, output [0:6] H);
- assign H[0] = A[1]|(~A[2]&~A[0])|(A[2]&A[0]);
- assign H[1] = A[1]|A[0];
- assign H[2] = A[1]|A[0];
- assign H[3] = (A[2]&A[1])|(A[2]&A[0])|(~A[2]&~A[1]&~A[0]);
- assign H[4] = (A[2]&A[1])|(A[2]&A[0]);
- assign H[5] = (A[2]&A[1])|(A[2]&A[0]);
- assign H[6] = A[2]|A[1];
- endmodule
Add Comment
Please, Sign In to add comment