+/EE316

digital logic

git clone https://git.julia.blue/+/EE316

Joseph RyanUpload whole semester91885ad

master
1.4 KiB63 linesraw
1`timescale 1ns / 1ps
2//////////////////////////////////////////////////////////////////////////////////
3// Company: 
4// Engineer: 
5// 
6// Create Date: 03/01/2019 03:06:12 PM
7// Design Name: 
8// Module Name: 7seg
9// Project Name: 
10// Target Devices: 
11// Tool Versions: 
12// Description: 
13// 
14// Dependencies: 
15// 
16// Revision:
17// Revision 0.01 - File Created
18// Additional Comments:
19// 
20//////////////////////////////////////////////////////////////////////////////////
21
22
23module seven_seg(
24    input i3,
25    input i2,
26    input i1,
27    input i0,
28    output a,
29    output b,
30    output c,
31    output d,
32    output e,
33    output f,
34    output g,
35    output an0,
36    output an1,
37    output an2,
38    output an3
39    );
40    wire d0;
41    wire d1;
42    wire d2;
43    wire d3;
44    wire d4;
45    wire d5;
46    wire d6;
47    wire d7;
48    wire d8;
49    wire d9;
50    assign an0 = 0;
51    assign an1 = 1;
52    assign an2 = 1;
53    assign an3 = 1;
54    four_bit_decoder dec(.dec0(d0), .dec1(d1), .dec2(d2), .dec3(d3), .dec4(d4), .dec5(d5), .dec6(d6), .dec7(d7), .dec8(d8), .dec9(d9),
55    .a(i3), .b(i2), .c(i1), .d(i0));
56    nor aa(a, d0, d2, d3, d5, d6, d7, d8, d9);
57    nor ab(b, d0, d1, d2, d3, d4, d7, d8, d9);
58    nor ac(c, d0, d1, d3, d4, d5, d6, d7, d8, d9);
59    nor ad(d, d0, d2, d3, d5, d6, d8, d9);
60    nor ae(e, d0, d2, d6, d8);
61    nor af(f, d0, d4, d5, d6, d8, d9);
62    nor ag(g, d2, d3, d4, d5, d6, d8, d9);
63endmodule