1
0
mirror of git://projects.qi-hardware.com/nn-usb-fpga.git synced 2025-04-21 12:27:27 +03:00

Adding plasma test_bench files

This commit is contained in:
Carlos Camargo
2010-05-10 15:08:00 -05:00
parent 717c35e238
commit fa1b48e1c2
2 changed files with 122 additions and 0 deletions

58
plasma/logic/plasma_TB.v Normal file
View File

@@ -0,0 +1,58 @@
`timescale 1ns / 1ps
module plasma_TB_v;
reg clk;
reg reset;
plasma uut( .clk(clk), .reset(reset));
parameter PERIOD = 20;
parameter real DUTY_CYCLE = 0.5;
parameter OFFSET = 0;
parameter TSET = 3;
parameter THLD = 3;
parameter NWS = 3;
parameter CAM_OFF = 4000;
reg [15:0] data_tx;
event reset_trigger;
event reset_done_trigger;
initial begin // Reset the system, Start the image capture process
forever begin
@ (reset_trigger);
@ (negedge clk);
reset = 1;
@ (negedge clk);
reset = 0;
-> reset_done_trigger;
end
end
initial begin // Initialize Inputs
clk = 0;
end
initial begin // Process for clk
#OFFSET;
forever
begin
clk = 1'b0;
#(PERIOD-(PERIOD*DUTY_CYCLE)) clk = 1'b1;
#(PERIOD*DUTY_CYCLE);
end
end
initial begin: TEST_CASE
#10 -> reset_trigger;
@ (reset_done_trigger);
// Write data to SRAM
end
endmodule