-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1607 from lnis-uofu/xt_preconfig_wrapper
Support waveform output in preconfigured fabric wrapper generator
- Loading branch information
Showing
102 changed files
with
20,204 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
openfpga_flow/tasks/basic_tests/no_time_stamp/dump_waveform/config/task.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = | ||
# Configuration file for running experiments | ||
# = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = | ||
# timeout_each_job : FPGA Task script splits fpga flow into multiple jobs | ||
# Each job execute fpga_flow script on combination of architecture & benchmark | ||
# timeout_each_job is timeout for each job | ||
# = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = | ||
|
||
[GENERAL] | ||
run_engine=openfpga_shell | ||
power_tech_file = ${PATH:OPENFPGA_PATH}/openfpga_flow/tech/PTM_45nm/45nm.xml | ||
power_analysis = true | ||
spice_output=false | ||
verilog_output=true | ||
timeout_each_job = 20*60 | ||
fpga_flow=yosys_vpr | ||
|
||
[OpenFPGA_SHELL] | ||
openfpga_shell_template=${PATH:OPENFPGA_PATH}/openfpga_flow/openfpga_shell_scripts/no_time_stamp_example_script.openfpga | ||
openfpga_arch_file=${PATH:OPENFPGA_PATH}/openfpga_flow/openfpga_arch/k4_N4_40nm_cc_abspath_openfpga.xml | ||
openfpga_sim_setting_file=${PATH:OPENFPGA_PATH}/openfpga_flow/openfpga_simulation_settings/auto_sim_openfpga.xml | ||
openfpga_vpr_device_layout = auto | ||
openfpga_vpr_route_chan_width = 26 | ||
openfpga_output_dir=${PATH:TASK_DIR}/golden_outputs_no_time_stamp | ||
openfpga_preconfig_fabric_wrapper_dump_waveform=--dump_waveform | ||
|
||
[ARCHITECTURES] | ||
arch0=${PATH:OPENFPGA_PATH}/openfpga_flow/vpr_arch/k4_N4_tileable_40nm.xml | ||
|
||
[BENCHMARKS] | ||
bench0=${PATH:OPENFPGA_PATH}/openfpga_flow/benchmarks/micro_benchmark/and2/and2.v | ||
|
||
[SYNTHESIS_PARAM] | ||
bench_read_verilog_options_common = -nolatches | ||
bench0_top = and2 | ||
|
||
[SCRIPT_PARAM_MIN_ROUTE_CHAN_WIDTH] |
120 changes: 120 additions & 0 deletions
120
...ests/no_time_stamp/dump_waveform/golden_outputs_no_time_stamp/and2_formal_random_top_tb.v
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
//------------------------------------------- | ||
// FPGA Synthesizable Verilog Netlist | ||
// Description: FPGA Verilog Testbench for Formal Top-level netlist of Design: and2 | ||
// Author: Xifan TANG | ||
// Organization: University of Utah | ||
//------------------------------------------- | ||
//----- Default net type ----- | ||
`default_nettype none | ||
|
||
module and2_top_formal_verification_random_tb; | ||
// ----- Default clock port is added here since benchmark does not contain one ------- | ||
reg [0:0] clk; | ||
|
||
// ----- Shared inputs ------- | ||
reg [0:0] a; | ||
reg [0:0] b; | ||
|
||
// ----- FPGA fabric outputs ------- | ||
wire [0:0] c_gfpga; | ||
|
||
// ----- Benchmark outputs ------- | ||
wire [0:0] c_bench; | ||
|
||
// ----- Output vectors checking flags ------- | ||
reg [0:0] c_flag; | ||
|
||
// ----- Error counter ------- | ||
integer nb_error= 0; | ||
|
||
// ----- FPGA fabric instanciation ------- | ||
and2_top_formal_verification FPGA_DUT( | ||
.a(a), | ||
.b(b), | ||
.c(c_gfpga) | ||
); | ||
// ----- End FPGA Fabric Instanication ------- | ||
|
||
// ----- Reference Benchmark Instanication ------- | ||
and2 REF_DUT( | ||
.a(a), | ||
.b(b), | ||
.c(c_bench) | ||
); | ||
// ----- End reference Benchmark Instanication ------- | ||
|
||
// ----- Clock 'clk' Initialization ------- | ||
initial begin | ||
clk[0] <= 1'b0; | ||
while(1) begin | ||
#0.4628907144 | ||
clk[0] <= !clk[0]; | ||
end | ||
end | ||
|
||
// ----- Begin reset signal generation ----- | ||
// ----- End reset signal generation ----- | ||
|
||
// ----- Input Initialization ------- | ||
initial begin | ||
a <= 1'b0; | ||
b <= 1'b0; | ||
|
||
c_flag[0] <= 1'b0; | ||
end | ||
|
||
// ----- Input Stimulus ------- | ||
always@(negedge clk[0]) begin | ||
a <= $random; | ||
b <= $random; | ||
end | ||
|
||
// ----- Begin checking output vectors ------- | ||
// ----- Skip the first falling edge of clock, it is for initialization ------- | ||
reg [0:0] sim_start; | ||
|
||
always@(negedge clk[0]) begin | ||
if (1'b1 == sim_start[0]) begin | ||
sim_start[0] <= ~sim_start[0]; | ||
end else | ||
begin | ||
if(!(c_gfpga === c_bench) && !(c_bench === 1'bx)) begin | ||
c_flag <= 1'b1; | ||
end else begin | ||
c_flag<= 1'b0; | ||
end | ||
end | ||
end | ||
|
||
always@(posedge c_flag) begin | ||
if(c_flag) begin | ||
nb_error = nb_error + 1; | ||
$display("Mismatch on c_gfpga at time = %t", $realtime); | ||
end | ||
end | ||
|
||
|
||
// ----- Begin output waveform to VCD file------- | ||
initial begin | ||
$dumpfile("and2_formal.vcd"); | ||
$dumpvars(1, and2_top_formal_verification_random_tb); | ||
end | ||
// ----- END output waveform to VCD file ------- | ||
|
||
initial begin | ||
sim_start[0] <= 1'b1; | ||
$timeformat(-9, 2, "ns", 20); | ||
$display("Simulation start"); | ||
// ----- Can be changed by the user for his/her need ------- | ||
#6.480470181 | ||
if(nb_error == 0) begin | ||
$display("Simulation Succeed"); | ||
end else begin | ||
$display("Simulation Failed with %d error(s)", nb_error); | ||
end | ||
$finish; | ||
end | ||
|
||
endmodule | ||
// ----- END Verilog module for and2_top_formal_verification_random_tb ----- | ||
|
Oops, something went wrong.