// Copyright (C) 2017 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 FPGA IP 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 template that is freely editable to // suit user's needs .Comments are provided in each section to help the user // fill out necessary details. // ***************************************************************************** // Generated on "05/17/2020 21:30:07" // Verilog Test Bench template for design : AES_encryp // // Simulation tool : ModelSim-Altera (Verilog) //
// assign statements (if any) AES_encryp i1 ( // port map - connection between master ports and signals/registers .clk(clk), .iKey(iKey), .iPlaintext(iPlaintext), .oCiphertext(oCiphertext), .rst_n(rst_n) ); initial begin // code that executes only once // insert code here --> begin // --> end $display("Running testbench"); end always // optional sensitivity list // @(event1 or event2 or .... eventn) begin // code executes for every event on sensitivity list // insert code here --> begin @eachvec; // --> end end endmodule
initial begin // code that executes only once // insert code here --> begin begin #0 clk = 0; rst_n = 0; #5 rst_n = 1; iKey = 128'h31_32_33_34_35_36_37_38_39_30_31_32_33_34_35_36; iPlaintext = 128'h30_39_38_37_36_35_34_33_32_31_36_35_34_33_32_31; #1000 rst_n = 0; #5 rst_n = 1; iKey = 128'h30_39_38_37_36_35_34_33_32_31_36_35_34_33_32_31; iPlaintext = 128'h31_32_33_34_35_36_37_38_39_30_31_32_33_34_35_36; // --> end $display("Running testbench"); end always // optional sensitivity list // @(event1 or event2 or .... eventn) begin // code executes for every event on sensitivity list // insert code here --> begin #10 clk = ~clk; // --> end end endmodule