133 lines
3.3 KiB
Plaintext
133 lines
3.3 KiB
Plaintext
|
// Copyright (C) 2016 Intel Corporation. All rights reserved.
|
||
|
// Your use of Intel Corporation's design tools, logic functions
|
||
|
// and other software and tools, and its AMPP partner logic
|
||
|
// functions, and any output files from any of the foregoing
|
||
|
// (including device programming or simulation files), and any
|
||
|
// associated documentation or information are expressly subject
|
||
|
// to the terms and conditions of the Intel Program License
|
||
|
// Subscription Agreement, the Intel Quartus Prime License Agreement,
|
||
|
// the Intel MegaCore Function License Agreement, or other
|
||
|
// applicable license agreement, including, without limitation,
|
||
|
// that your use is for the sole purpose of programming logic
|
||
|
// devices manufactured by Intel and sold by Intel or its
|
||
|
// authorized distributors. Please refer to the applicable
|
||
|
// agreement for further details.
|
||
|
|
||
|
// *****************************************************************************
|
||
|
// This file contains a Verilog test bench with test vectors .The test vectors
|
||
|
// are exported from a vector file in the Quartus Waveform Editor and apply to
|
||
|
// the top level entity of the current Quartus project .The user can use this
|
||
|
// testbench to simulate his design using a third-party simulation tool .
|
||
|
// *****************************************************************************
|
||
|
// Generated on "03/11/2021 20:47:37"
|
||
|
|
||
|
// Verilog Test Bench (with test vectors) for design : Part3
|
||
|
//
|
||
|
// Simulation tool : 3rd Party
|
||
|
//
|
||
|
|
||
|
`timescale 1 ps/ 1 ps
|
||
|
module Part3_vlg_vec_tst();
|
||
|
// constants
|
||
|
// general purpose registers
|
||
|
reg [9:0] SW;
|
||
|
// wires
|
||
|
wire [9:0] LEDR;
|
||
|
|
||
|
// assign statements (if any)
|
||
|
Part3 i1 (
|
||
|
// port map - connection between master ports and signals/registers
|
||
|
.LEDR(LEDR),
|
||
|
.SW(SW)
|
||
|
);
|
||
|
initial
|
||
|
begin
|
||
|
#1000000 $finish;
|
||
|
end
|
||
|
// SW[ 9 ]
|
||
|
initial
|
||
|
begin
|
||
|
SW[9] = 1'b0;
|
||
|
SW[9] = #470000 1'b1;
|
||
|
end
|
||
|
// SW[ 8 ]
|
||
|
initial
|
||
|
begin
|
||
|
SW[8] = 1'b0;
|
||
|
SW[8] = #230000 1'b1;
|
||
|
SW[8] = #240000 1'b0;
|
||
|
SW[8] = #270000 1'b1;
|
||
|
end
|
||
|
// SW[ 7 ]
|
||
|
initial
|
||
|
begin
|
||
|
SW[7] = 1'bX;
|
||
|
SW[7] = #740000 1'b1;
|
||
|
SW[7] = #70000 1'b0;
|
||
|
SW[7] = #90000 1'b1;
|
||
|
end
|
||
|
// SW[ 6 ]
|
||
|
initial
|
||
|
begin
|
||
|
SW[6] = 1'bX;
|
||
|
SW[6] = #740000 1'b1;
|
||
|
SW[6] = #70000 1'b0;
|
||
|
SW[6] = #90000 1'b1;
|
||
|
end
|
||
|
// SW[ 5 ]
|
||
|
initial
|
||
|
begin
|
||
|
SW[5] = 1'bX;
|
||
|
SW[5] = #470000 1'b1;
|
||
|
SW[5] = #80000 1'b0;
|
||
|
SW[5] = #90000 1'b1;
|
||
|
SW[5] = #100000 1'bX;
|
||
|
end
|
||
|
// SW[ 4 ]
|
||
|
initial
|
||
|
begin
|
||
|
SW[4] = 1'bX;
|
||
|
SW[4] = #470000 1'b1;
|
||
|
SW[4] = #80000 1'b0;
|
||
|
SW[4] = #90000 1'b1;
|
||
|
SW[4] = #100000 1'bX;
|
||
|
end
|
||
|
// SW[ 3 ]
|
||
|
initial
|
||
|
begin
|
||
|
SW[3] = 1'bX;
|
||
|
SW[3] = #230000 1'b0;
|
||
|
SW[3] = #80000 1'b1;
|
||
|
SW[3] = #80000 1'b0;
|
||
|
SW[3] = #80000 1'bX;
|
||
|
end
|
||
|
// SW[ 2 ]
|
||
|
initial
|
||
|
begin
|
||
|
SW[2] = 1'bX;
|
||
|
SW[2] = #230000 1'b0;
|
||
|
SW[2] = #80000 1'b1;
|
||
|
SW[2] = #80000 1'b0;
|
||
|
SW[2] = #80000 1'bX;
|
||
|
end
|
||
|
// SW[ 1 ]
|
||
|
initial
|
||
|
begin
|
||
|
SW[1] = 1'b0;
|
||
|
SW[1] = #40000 1'b1;
|
||
|
SW[1] = #60000 1'b0;
|
||
|
SW[1] = #80000 1'b1;
|
||
|
SW[1] = #50000 1'bX;
|
||
|
end
|
||
|
// SW[ 0 ]
|
||
|
initial
|
||
|
begin
|
||
|
SW[0] = 1'b0;
|
||
|
SW[0] = #40000 1'b1;
|
||
|
SW[0] = #60000 1'b0;
|
||
|
SW[0] = #80000 1'b1;
|
||
|
SW[0] = #50000 1'bX;
|
||
|
end
|
||
|
endmodule
|
||
|
|