Add Lab work No2

This commit is contained in:
Imants Pulkstenis
2020-03-25 00:08:31 +02:00
parent 27e63599f4
commit f19b7c8ca1
11 changed files with 878 additions and 0 deletions
+60
View File
@@ -0,0 +1,60 @@
/////////////////////////////
// Author - Imants Pulkstenis
// Date - 24.03.2020
// Project name - Lab work No2 - Counter
// Module name - Testbench for 7-segment module
//
// Detailed module description:
//
// This module inputs slowly incrementing
// numbers in 7-segment module
//
//
// Revision:
// A - initial design
// B -
//
//
/////////////////////////////
`include "7segment.v"
module bin_7segment_tb();
reg clk = 1'b0;
reg [15:0] in = 'b0;
wire [6:0] seg;
wire [3:0] an;
wire dp;
always #1 clk <= ~clk;
always #40 in <= in + 1;
initial
begin
#1000;
$finish();
end
initial
begin
$display(" ");
$display("----------------------------------------------");
$display(" Starting Testbench...");
$dumpfile("wave.vcd");
$dumpvars(0);
$display("----------------------------------------------");
$display(" ");
end
bin_7segment test_unit1(
.clk(clk),
.in(in),
.seg(seg),
.an(an),
.dp(dp)
);
endmodule