diff --git a/testbench/de0_wrapper.tcl b/testbench/de0_wrapper.tcl index 1fc432de2f13869c4d2a1895a2ef3cd019e06484..28948fca8802888553bdc0e3971c236273513494 100644 --- a/testbench/de0_wrapper.tcl +++ b/testbench/de0_wrapper.tcl @@ -9,14 +9,21 @@ simvision { # Add Waves - waveform add -signals de0_wrapper_stim.CLOCK_50 - waveform add -signals de0_wrapper_stim.KEY - waveform add -signals de0_wrapper_stim.SW - waveform add -signals de0_wrapper_stim.LEDG - waveform add -signals de0_wrapper_stim.HEX0 - waveform add -signals de0_wrapper_stim.HEX1 - waveform add -signals de0_wrapper_stim.HEX2 - waveform add -signals de0_wrapper_stim.HEX3 + waveform add -signals de1_soc_wrapper_stim.CLOCK_50 + waveform add -signals de1_soc_wrapper_stim.SW + waveform add -signals de1_soc_wrapper_stim.LEDR + waveform add -signals de1_soc_wrapper_stim.HEX0 + waveform add -signals de1_soc_wrapper_stim.HEX1 + waveform add -signals de1_soc_wrapper_stim.HEX2 + waveform add -signals de1_soc_wrapper_stim.HEX3 + waveform add -signals de1_soc_wrapper_stim.KEY + waveform add -signals de1_soc_wrapper_stim.VGA_R + waveform add -signals de1_soc_wrapper_stim.VGA_G + waveform add -signals de1_soc_wrapper_stim.VGA_B + waveform add -signals de1_soc_wrapper_stim.VGA_HS + waveform add -signals de1_soc_wrapper_stim.VGA_VS + waveform add -signals de1_soc_wrapper_stim.VGA_CLK + waveform add -signals de1_soc_wrapper_stim.VGA_BLANK_N waveform add -signals de0_wrapper_stim.dut.soc_inst.HADDR waveform add -signals de0_wrapper_stim.dut.soc_inst.HWRITE waveform add -signals de0_wrapper_stim.dut.soc_inst.HSEL_RAM diff --git a/testbench/de0_wrapper_stim.sv b/testbench/de0_wrapper_stim.sv deleted file mode 100644 index ee27fb198ee1cfc84275d19b6beb25cf85ecc0fd..0000000000000000000000000000000000000000 --- a/testbench/de0_wrapper_stim.sv +++ /dev/null @@ -1,97 +0,0 @@ -module de0_wrapper_stim(); - -timeunit 1ns; -timeprecision 100ps; - - logic nReset, CLOCK_50; - logic [9:0] SW; - logic [1:0] Buttons; - wire [9:0] LEDG; - wire [7:0] HEX0; - wire [7:0] HEX1; - wire [7:0] HEX2; - wire [7:0] HEX3; - - wire [2:0] KEY; - - assign KEY={nReset,~Buttons[1:0]}; // de0 keys are active low - - de0_wrapper dut(.CLOCK_50, .LEDG, .SW, .KEY, .HEX0, .HEX1, .HEX2, .HEX3); - - always - begin - CLOCK_50 = 0; - #5ns CLOCK_50 = 1; - #10ns CLOCK_50 = 0; - #5ns CLOCK_50 = 0; - end - - task press_button(input n); - #1us Buttons[n] = 1; - #1us Buttons[n] = 0; - endtask - - - initial - begin - nReset = 0; - Buttons = 0; - SW = 1; - #10.0ns nReset = 1; - - #10us SW = 0; - #5us press_button(0); - #5us press_button(1); - - #10us SW = 1; - #5us press_button(0); - #5us press_button(1); - - - #10us SW = 2; - #5us press_button(0); - #5us press_button(1); - - - #10us SW = 3; - #5us press_button(0); - #5us press_button(1); - - - #10us SW = 4; - #5us press_button(0); - #5us press_button(1); - - - #20us SW = 5; - #5us press_button(0); - #5us press_button(1); - - - #20us SW = 6; - #5us press_button(0); - #5us press_button(1); - - - #20us SW = 7; - #5us press_button(0); - #5us press_button(1); - - - #20us SW = 8; - #5us press_button(0); - #5us press_button(1); - - #30us SW = 15; - #5us press_button(0); - #5us press_button(1); - - #40us SW = 12; - #5us press_button(0); - #5us press_button(1); - - #50us $stop; - $finish; - end - -endmodule diff --git a/testbench/de2_wrapper_stim.sv b/testbench/de2_wrapper_stim.sv deleted file mode 100644 index 819044d2e0fc2461cb8a3fef4e5b54f4b0adcd12..0000000000000000000000000000000000000000 --- a/testbench/de2_wrapper_stim.sv +++ /dev/null @@ -1,97 +0,0 @@ -module de2_wrapper_stim(); - -timeunit 1ns; -timeprecision 100ps; - - logic nReset, CLOCK_50; - logic [15:0] SW; - logic [1:0] Buttons; - wire [15:0] LEDR; - wire [6:0] HEX0; - wire [6:0] HEX1; - wire [6:0] HEX2; - wire [6:0] HEX3; - - wire [2:0] KEY; - - assign KEY={nReset,~Buttons[1:0]}; // DE2 keys are active low - - de2_wrapper dut(.CLOCK_50, .LEDR, .SW, .KEY, .HEX0, .HEX1, .HEX2, .HEX3); - - always - begin - CLOCK_50 = 0; - #5ns CLOCK_50 = 1; - #10ns CLOCK_50 = 0; - #5ns CLOCK_50 = 0; - end - - task press_button(input n); - #1us Buttons[n] = 1; - #1us Buttons[n] = 0; - endtask - - - initial - begin - nReset = 0; - Buttons = 0; - SW = 1; - #10.0ns nReset = 1; - - #10us SW = 0; - #5us press_button(0); - #5us press_button(1); - - #10us SW = 1; - #5us press_button(0); - #5us press_button(1); - - - #10us SW = 2; - #5us press_button(0); - #5us press_button(1); - - - #10us SW = 3; - #5us press_button(0); - #5us press_button(1); - - - #10us SW = 4; - #5us press_button(0); - #5us press_button(1); - - - #20us SW = 5; - #5us press_button(0); - #5us press_button(1); - - - #20us SW = 6; - #5us press_button(0); - #5us press_button(1); - - - #20us SW = 7; - #5us press_button(0); - #5us press_button(1); - - - #20us SW = 8; - #5us press_button(0); - #5us press_button(1); - - #30us SW = 15; - #5us press_button(0); - #5us press_button(1); - - #40us SW = 12; - #5us press_button(0); - #5us press_button(1); - - #50us $stop; - $finish; - end - -endmodule diff --git a/testbench/nexys4_wrapper.tcl b/testbench/nexys4_wrapper.tcl deleted file mode 100644 index dc0d50164550ed701adfa79e1a9621dd2691cf21..0000000000000000000000000000000000000000 --- a/testbench/nexys4_wrapper.tcl +++ /dev/null @@ -1,28 +0,0 @@ -# SimVision command script arm_soc.tcl - -simvision { - - # Open new waveform window - - window new WaveWindow -name "Waves for ARM SoC Example" - waveform using "Waves for ARM SoC Example" - - # Add Waves - - waveform add -signals nexys4_wrapper_stim.Clock - waveform add -signals nexys4_wrapper_stim.nReset - waveform add -signals nexys4_wrapper_stim.Switches - waveform add -signals nexys4_wrapper_stim.Buttons - waveform add -signals nexys4_wrapper_stim.DataOut - waveform add -signals nexys4_wrapper_stim.DataValid - waveform add -signals nexys4_wrapper_stim.DataInvalid - waveform add -signals nexys4_wrapper_stim.Status_Green - waveform add -signals nexys4_wrapper_stim.Status_Red - waveform add -signals nexys4_wrapper_stim.dut.soc_inst.HADDR - waveform add -signals nexys4_wrapper_stim.dut.soc_inst.HWRITE - waveform add -signals nexys4_wrapper_stim.dut.soc_inst.HSEL_RAM - waveform add -signals nexys4_wrapper_stim.dut.soc_inst.HSEL_SW - waveform add -signals nexys4_wrapper_stim.dut.soc_inst.HSEL_DOUT - -} - diff --git a/testbench/nexys4_wrapper_stim.sv b/testbench/nexys4_wrapper_stim.sv deleted file mode 100644 index e232d3f5d48277c4f03becd481c198c99469312e..0000000000000000000000000000000000000000 --- a/testbench/nexys4_wrapper_stim.sv +++ /dev/null @@ -1,91 +0,0 @@ -module nexys4_wrapper_stim(); - -timeunit 1ns; -timeprecision 100ps; - - logic nReset, Clock; - logic [15:0] Switches; - logic [1:0] Buttons; // nexys4 buttons are active high - wire [15:0] DataOut; - wire DataValid, DataInvalid; - wire Status_Red, Status_Green; - - nexys4_wrapper dut(.Clock, .nReset, .DataOut, .DataValid, .DataInvalid, .Switches, .Buttons, .Status_Red, .Status_Green); - - always - begin - Clock = 0; - #2.5ns Clock = 1; - #5.0ns Clock = 0; - #2.5ns Clock = 0; - end - - task press_button(input n); - #1us Buttons[n] = 1; - #1us Buttons[n] = 0; - endtask - - - initial - begin - nReset = 0; - Buttons = 0; - Switches = 1; - #10.0ns nReset = 1; - - #10us Switches = 0; - #5us press_button(0); - #5us press_button(1); - - #10us Switches = 1; - #5us press_button(0); - #5us press_button(1); - - - #10us Switches = 2; - #5us press_button(0); - #5us press_button(1); - - - #10us Switches = 3; - #5us press_button(0); - #5us press_button(1); - - - #10us Switches = 4; - #5us press_button(0); - #5us press_button(1); - - - #20us Switches = 5; - #5us press_button(0); - #5us press_button(1); - - - #20us Switches = 6; - #5us press_button(0); - #5us press_button(1); - - - #20us Switches = 7; - #5us press_button(0); - #5us press_button(1); - - - #20us Switches = 8; - #5us press_button(0); - #5us press_button(1); - - #30us Switches = 15; - #5us press_button(0); - #5us press_button(1); - - #40us Switches = 12; - #5us press_button(0); - #5us press_button(1); - - #50us $stop; - $finish; - end - -endmodule