From 5cb3717433b775fc58228a1380f98c423e158ff1 Mon Sep 17 00:00:00 2001 From: tangxifan Date: Mon, 28 Oct 2019 15:57:17 -0600 Subject: [PATCH] add single mode test case to regression test. debugging now --- ...m_chain_FC_behavioral_verilog_template.xml | 631 ++++++++++++++++++ .../test_modes/k4_N4/K4N4_test_modes.act | 16 + .../test_modes/k4_N4/K4N4_test_modes.blif | 40 ++ .../test_modes/k4_N4/K4N4_test_modes.v | 54 ++ .../k6_N10/K6N10_test_modes.act} | 0 .../k6_N10/K6N10_test_modes.blif} | 0 .../k6_N10/K6N10_test_modes.v} | 0 .../tasks/blif_vpr_flow/config/task.conf | 6 +- .../tasks/explicit_verilog/config/task.conf | 6 +- .../tasks/single_mode/config/task.conf | 58 ++ .../tasks/tileable_routing/config/task.conf | 6 +- 11 files changed, 808 insertions(+), 9 deletions(-) create mode 100644 openfpga_flow/arch/template/k4_N4_sram_chain_FC_behavioral_verilog_template.xml create mode 100644 openfpga_flow/benchmarks/test_modes/k4_N4/K4N4_test_modes.act create mode 100644 openfpga_flow/benchmarks/test_modes/k4_N4/K4N4_test_modes.blif create mode 100644 openfpga_flow/benchmarks/test_modes/k4_N4/K4N4_test_modes.v rename openfpga_flow/benchmarks/{Test_Modes/test_modes.act => test_modes/k6_N10/K6N10_test_modes.act} (100%) rename openfpga_flow/benchmarks/{Test_Modes/test_modes.blif => test_modes/k6_N10/K6N10_test_modes.blif} (100%) rename openfpga_flow/benchmarks/{Test_Modes/test_modes.v => test_modes/k6_N10/K6N10_test_modes.v} (100%) create mode 100644 openfpga_flow/tasks/single_mode/config/task.conf diff --git a/openfpga_flow/arch/template/k4_N4_sram_chain_FC_behavioral_verilog_template.xml b/openfpga_flow/arch/template/k4_N4_sram_chain_FC_behavioral_verilog_template.xml new file mode 100644 index 000000000..29f091673 --- /dev/null +++ b/openfpga_flow/arch/template/k4_N4_sram_chain_FC_behavioral_verilog_template.xml @@ -0,0 +1,631 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 10e-12 + + + 10e-12 + + + + + + + + 10e-12 + + + 10e-12 + + + + + + + + 10e-12 + + + 10e-12 + + + + + + + + 10e-12 + + + 10e-12 + + + + + + + + 10e-12 + + + 10e-12 + + + + + + + + 10e-12 + + + 10e-12 + + + + + + + + + + + + 10e-12 5e-12 5e-12 + + + 10e-12 5e-12 5e-12 + + + + + + + + + + + 10e-12 10e-12 + + + 10e-12 10e-12 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 + + + + 1 1 1 1 1 + 1 1 1 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + io.outpad io.inpad + io.outpad io.inpad + io.outpad io.inpad + io.outpad io.inpad + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 202e-12 + 202e-12 + 202e-12 + 202e-12 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + clb.clk + clb.I[5:0] clb.O[1:0] + clb.I[11:6] clb.O[3:2] + + + + + + + + + + + + + + + + + + diff --git a/openfpga_flow/benchmarks/test_modes/k4_N4/K4N4_test_modes.act b/openfpga_flow/benchmarks/test_modes/k4_N4/K4N4_test_modes.act new file mode 100644 index 000000000..159a6071f --- /dev/null +++ b/openfpga_flow/benchmarks/test_modes/k4_N4/K4N4_test_modes.act @@ -0,0 +1,16 @@ +clk 0.5 0.2 +a 0.5 0.2 +b 0.5 0.2 +c 0.5 0.2 +XOR 0.5 0.2 +XNOR 0.5 0.2 +OR 0.5 0.2 +NOR 0.5 0.2 +AND 0.5 0.2 +NAND 0.5 0.2 +XOR_sync 0.5 0.2 +XNOR_sync 0.5 0.2 +OR_sync 0.5 0.2 +NOR_sync 0.5 0.2 +AND_sync 0.5 0.2 +NAND_sync 0.5 0.2 diff --git a/openfpga_flow/benchmarks/test_modes/k4_N4/K4N4_test_modes.blif b/openfpga_flow/benchmarks/test_modes/k4_N4/K4N4_test_modes.blif new file mode 100644 index 000000000..d74125339 --- /dev/null +++ b/openfpga_flow/benchmarks/test_modes/k4_N4/K4N4_test_modes.blif @@ -0,0 +1,40 @@ +.model K4n4_test +.inputs clk a b c +.outputs XOR XNOR AND NAND OR NOR XOR_sync XNOR_sync AND_sync NAND_sync OR_sync NOR_sync + +.names a b c XOR +100 1 +010 1 +001 1 +111 1 + +.names a b c XNOR +011 1 +101 1 +110 1 +000 1 + +.names a b c AND +111 1 + +.names a b c NAND +0-- 1 +-0- 1 +--0 1 + +.names a b c OR +1-- 1 +-1- 1 +--1 1 + +.names a b c NOR +000 1 + +.latch XOR XOR_sync re clk 0 +.latch XNOR XNOR_sync re clk 0 +.latch OR OR_sync re clk 0 +.latch NOR NOR_sync re clk 0 +.latch AND AND_sync re clk 0 +.latch NAND NAND_sync re clk 0 + +.end diff --git a/openfpga_flow/benchmarks/test_modes/k4_N4/K4N4_test_modes.v b/openfpga_flow/benchmarks/test_modes/k4_N4/K4N4_test_modes.v new file mode 100644 index 000000000..5826ed571 --- /dev/null +++ b/openfpga_flow/benchmarks/test_modes/k4_N4/K4N4_test_modes.v @@ -0,0 +1,54 @@ +`timescale 1ns / 1ps + +module K4n4_test ( + clk, + a, + b, + c, + XOR, + XNOR, + AND, + NAND, + OR, + NOR, + XOR_sync, + XNOR_sync, + AND_sync, + NAND_sync, + OR_sync, + NOR_sync ); + + input wire clk; + input wire a; + input wire b; + input wire c; + output wire XOR; + output wire XNOR; + output wire AND; + output wire NAND; + output wire OR; + output wire NOR; + output reg XOR_sync; + output reg XNOR_sync; + output reg AND_sync; + output reg NAND_sync; + output reg OR_sync; + output reg NOR_sync; + + assign XOR = a ^ b ^ c; + assign XNOR = !XOR; + assign OR = a || b || c; + assign NOR = !( a || b || c); + assign AND = a && b && c; + assign NAND = !(a && b && c); + + always @(posedge clk) begin + XOR_sync = XOR; + XNOR_sync = XNOR; + OR_sync = OR; + NOR_sync = NOR; + AND_sync = AND; + NAND_sync = NAND; + end + +endmodule diff --git a/openfpga_flow/benchmarks/Test_Modes/test_modes.act b/openfpga_flow/benchmarks/test_modes/k6_N10/K6N10_test_modes.act similarity index 100% rename from openfpga_flow/benchmarks/Test_Modes/test_modes.act rename to openfpga_flow/benchmarks/test_modes/k6_N10/K6N10_test_modes.act diff --git a/openfpga_flow/benchmarks/Test_Modes/test_modes.blif b/openfpga_flow/benchmarks/test_modes/k6_N10/K6N10_test_modes.blif similarity index 100% rename from openfpga_flow/benchmarks/Test_Modes/test_modes.blif rename to openfpga_flow/benchmarks/test_modes/k6_N10/K6N10_test_modes.blif diff --git a/openfpga_flow/benchmarks/Test_Modes/test_modes.v b/openfpga_flow/benchmarks/test_modes/k6_N10/K6N10_test_modes.v similarity index 100% rename from openfpga_flow/benchmarks/Test_Modes/test_modes.v rename to openfpga_flow/benchmarks/test_modes/k6_N10/K6N10_test_modes.v diff --git a/openfpga_flow/tasks/blif_vpr_flow/config/task.conf b/openfpga_flow/tasks/blif_vpr_flow/config/task.conf index c54ce8403..7cadfce2c 100644 --- a/openfpga_flow/tasks/blif_vpr_flow/config/task.conf +++ b/openfpga_flow/tasks/blif_vpr_flow/config/task.conf @@ -25,12 +25,12 @@ arch5=${PATH:OPENFPGA_PATH}/openfpga_flow/arch/template/k6_N10_sram_chain_HC_1IO #arch4=${PATH:OPENFPGA_PATH}/openfpga_flow/arch/template/k8_N10_sram_chain_FC_template.xml [BENCHMARKS] -bench0=${PATH:OPENFPGA_PATH}/openfpga_flow/benchmarks/Test_Modes/test_modes.blif +bench0=${PATH:OPENFPGA_PATH}/openfpga_flow/benchmarks/test_modes/k6_N10/K6N10_test_modes.blif [SYNTHESIS_PARAM] bench0_top = test_modes -bench0_act = ${PATH:OPENFPGA_PATH}/openfpga_flow/benchmarks/Test_Modes/test_modes.act -bench0_verilog = ${PATH:OPENFPGA_PATH}/openfpga_flow/benchmarks/Test_Modes/test_modes.v +bench0_act = ${PATH:OPENFPGA_PATH}/openfpga_flow/benchmarks/test_modes/k6_N10/K6N10_test_modes.act +bench0_verilog = ${PATH:OPENFPGA_PATH}/openfpga_flow/benchmarks/test_modes/k6_N10/K6N10_test_modes.v bench0_chan_width = 300 #[SCRIPT_PARAM_FIX_ROUTE_CHAN_WIDTH] diff --git a/openfpga_flow/tasks/explicit_verilog/config/task.conf b/openfpga_flow/tasks/explicit_verilog/config/task.conf index 0634a32c5..2a640bfae 100644 --- a/openfpga_flow/tasks/explicit_verilog/config/task.conf +++ b/openfpga_flow/tasks/explicit_verilog/config/task.conf @@ -19,12 +19,12 @@ arch1=${PATH:OPENFPGA_PATH}/openfpga_flow/arch/template/k6_N10_sram_chain_HC_tem #arch2=${PATH:OPENFPGA_PATH}/openfpga_flow/arch/template/k6_N10_sram_chain_HC_1IO_template.xml [BENCHMARKS] -bench0=${PATH:OPENFPGA_PATH}/openfpga_flow/benchmarks/Test_Modes/test_modes.blif +bench0=${PATH:OPENFPGA_PATH}/openfpga_flow/benchmarks/test_modes/k6_N10/K6N10_test_modes.blif [SYNTHESIS_PARAM] bench0_top = test_modes -bench0_act = ${PATH:OPENFPGA_PATH}/openfpga_flow/benchmarks/Test_Modes/test_modes.act -bench0_verilog = ${PATH:OPENFPGA_PATH}/openfpga_flow/benchmarks/Test_Modes/test_modes.v +bench0_act = ${PATH:OPENFPGA_PATH}/openfpga_flow/benchmarks/test_modes/k6_N10/K6N10_test_modes.act +bench0_verilog = ${PATH:OPENFPGA_PATH}/openfpga_flow/benchmarks/test_modes/k6_N10/K6N10_test_modes.v bench0_chan_width = 300 [SCRIPT_PARAM_MIN_ROUTE_CHAN_WIDTH_EXPLICIT_MAPPING_COMPACT] diff --git a/openfpga_flow/tasks/single_mode/config/task.conf b/openfpga_flow/tasks/single_mode/config/task.conf new file mode 100644 index 000000000..f7086ab77 --- /dev/null +++ b/openfpga_flow/tasks/single_mode/config/task.conf @@ -0,0 +1,58 @@ +# = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = +# 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] +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=vpr_blif + +[ARCHITECTURES] +arch0=${PATH:OPENFPGA_PATH}/openfpga_flow/arch/template/k4_N4_sram_chain_FC_behavioral_verilog_template.xml + +[BENCHMARKS] +bench0=${PATH:OPENFPGA_PATH}/openfpga_flow/benchmarks/test_modes/k4_N4/K4N4_test_modes.blif + +[SYNTHESIS_PARAM] +bench0_top = K4n4_test +bench0_act = ${PATH:OPENFPGA_PATH}/openfpga_flow/benchmarks/test_modes/k4_N4/K4N4_test_modes.act +bench0_verilog = ${PATH:OPENFPGA_PATH}/openfpga_flow/benchmarks/test_modes/k4_N4/K4N4_test_modes.v +bench0_chan_width = 100 + +#[SCRIPT_PARAM_FIX_ROUTE_CHAN_WIDTH] +#fix_route_chan_width=300 +#vpr_fpga_verilog_include_icarus_simulator= +#vpr_fpga_verilog_formal_verification_top_netlist= +#vpr_fpga_verilog_include_timing= +#vpr_fpga_verilog_include_signal_init= +#vpr_fpga_verilog_print_autocheck_top_testbench= +#vpr_fpga_bitstream_generator= +#vpr_fpga_verilog_print_user_defined_template= +#vpr_fpga_verilog_print_report_timing_tcl= +#vpr_fpga_verilog_print_sdc_pnr= +#vpr_fpga_verilog_print_sdc_analysis= +#vpr_fpga_x2p_compact_routing_hierarchy= +#end_flow_with_test= + +[SCRIPT_PARAM_MIN_ROUTE_CHAN_WIDTH_0] +min_route_chan_width=1.3 +vpr_fpga_verilog_include_icarus_simulator= +vpr_fpga_verilog_formal_verification_top_netlist= +vpr_fpga_verilog_include_timing= +vpr_fpga_verilog_include_signal_init= +vpr_fpga_verilog_print_autocheck_top_testbench= +vpr_fpga_bitstream_generator= +vpr_fpga_verilog_print_user_defined_template= +vpr_fpga_verilog_print_report_timing_tcl= +vpr_fpga_verilog_print_sdc_pnr= +vpr_fpga_verilog_print_sdc_analysis= +#vpr_fpga_verilog_explicit_mapping= +#vpr_fpga_x2p_compact_routing_hierarchy= +end_flow_with_test= diff --git a/openfpga_flow/tasks/tileable_routing/config/task.conf b/openfpga_flow/tasks/tileable_routing/config/task.conf index 3a7f092a6..860a9ba32 100644 --- a/openfpga_flow/tasks/tileable_routing/config/task.conf +++ b/openfpga_flow/tasks/tileable_routing/config/task.conf @@ -18,12 +18,12 @@ fpga_flow=vpr_blif arch0=${PATH:OPENFPGA_PATH}/openfpga_flow/arch/template/k6_N10_sram_chain_HC_tileable_template.xml [BENCHMARKS] -bench0=${PATH:OPENFPGA_PATH}/openfpga_flow/benchmarks/Test_Modes/test_modes.blif +bench0=${PATH:OPENFPGA_PATH}/openfpga_flow/benchmarks/test_modes/k6_N10/K6N10_test_modes.blif [SYNTHESIS_PARAM] bench0_top = test_modes -bench0_act = ${PATH:OPENFPGA_PATH}/openfpga_flow/benchmarks/Test_Modes/test_modes.act -bench0_verilog = ${PATH:OPENFPGA_PATH}/openfpga_flow/benchmarks/Test_Modes/test_modes.v +bench0_act = ${PATH:OPENFPGA_PATH}/openfpga_flow/benchmarks/test_modes/k6_N10/K6N10_test_modes.act +bench0_verilog = ${PATH:OPENFPGA_PATH}/openfpga_flow/benchmarks/test_modes/k6_N10/K6N10_test_modes.v bench0_chan_width = 300 [SCRIPT_PARAM_FIX_ROUTE_CHAN_WIDTH]