diff --git a/.travis/fpga_bitstream_reg_test.sh b/.travis/fpga_bitstream_reg_test.sh index 90044ed8e..dcce57081 100755 --- a/.travis/fpga_bitstream_reg_test.sh +++ b/.travis/fpga_bitstream_reg_test.sh @@ -11,7 +11,7 @@ cd ${TRAVIS_BUILD_DIR} echo -e "FPGA-Bitstream regression tests"; echo -e "Testing bitstream generation only"; -python3 openfpga_flow/scripts/run_fpga_task.py fpga_bitstream/generate_bitstream --debug --show_thread_logs +python3 openfpga_flow/scripts/run_fpga_task.py fpga_bitstream/generate_bitstream/device_auto --debug --show_thread_logs echo -e "Testing loading architecture bitstream from an external file"; python3 openfpga_flow/scripts/run_fpga_task.py fpga_bitstream/load_external_architecture_bitstream --debug --show_thread_logs diff --git a/openfpga_flow/OpenFPGAShellScripts/generate_bitstream_fix_device_example_script.openfpga b/openfpga_flow/OpenFPGAShellScripts/generate_bitstream_fix_device_example_script.openfpga new file mode 100644 index 000000000..9558a5944 --- /dev/null +++ b/openfpga_flow/OpenFPGAShellScripts/generate_bitstream_fix_device_example_script.openfpga @@ -0,0 +1,51 @@ +# Run VPR for the 'and' design +#--write_rr_graph example_rr_graph.xml +vpr ${VPR_ARCH_FILE} ${VPR_TESTBENCH_BLIF} --clock_modeling route --route_chan_width ${OPENFPGA_VPR_ROUTE_CHAN_WIDTH} --device ${OPENFPGA_VPR_DEVICE_LAYOUT} + +# Read OpenFPGA architecture definition +read_openfpga_arch -f ${OPENFPGA_ARCH_FILE} + +# Read OpenFPGA simulation settings +read_openfpga_simulation_setting -f ${OPENFPGA_SIM_SETTING_FILE} + +# Annotate the OpenFPGA architecture to VPR data base +# to debug use --verbose options +link_openfpga_arch --activity_file ${ACTIVITY_FILE} --sort_gsb_chan_node_in_edges + +# Check and correct any naming conflicts in the BLIF netlist +check_netlist_naming_conflict --fix --report ./netlist_renaming.xml + +# Apply fix-up to clustering nets based on routing results +pb_pin_fixup --verbose + +# Apply fix-up to Look-Up Table truth tables based on packing results +lut_truth_table_fixup + +# Build the module graph +# - Enabled compression on routing architecture modules +# - Enabled frame view creation to save runtime and memory +# Note that this is turned on when bitstream generation +# is the ONLY purpose of the flow!!! +build_fabric --compress_routing --frame_view #--verbose + +# Repack the netlist to physical pbs +# This must be done before bitstream generator and testbench generation +# Strongly recommend it is done after all the fix-up have been applied +repack #--verbose + +# Build the bitstream +# - Skip outputting the fabric-independent bitstream to a file +build_architecture_bitstream --verbose #--write_file fabric_independent_bitstream.xml + +# Build fabric-dependent bitstream +build_fabric_bitstream --verbose + +# Write fabric-dependent bitstream +write_fabric_bitstream --file fabric_bitstream.txt --format plain_text +write_fabric_bitstream --file fabric_bitstream.xml --format xml + +# Finish and exit OpenFPGA +exit + +# Note : +# To run verification at the end of the flow maintain source in ./SRC directory diff --git a/openfpga_flow/benchmarks/micro_benchmark/RISC_posedge_clk/ALU.v b/openfpga_flow/benchmarks/micro_benchmark/RISC_posedge_clk/rtl/ALU.v similarity index 100% rename from openfpga_flow/benchmarks/micro_benchmark/RISC_posedge_clk/ALU.v rename to openfpga_flow/benchmarks/micro_benchmark/RISC_posedge_clk/rtl/ALU.v diff --git a/openfpga_flow/benchmarks/micro_benchmark/RISC_posedge_clk/Controller.v b/openfpga_flow/benchmarks/micro_benchmark/RISC_posedge_clk/rtl/Controller.v similarity index 100% rename from openfpga_flow/benchmarks/micro_benchmark/RISC_posedge_clk/Controller.v rename to openfpga_flow/benchmarks/micro_benchmark/RISC_posedge_clk/rtl/Controller.v diff --git a/openfpga_flow/benchmarks/micro_benchmark/RISC_posedge_clk/IR.v b/openfpga_flow/benchmarks/micro_benchmark/RISC_posedge_clk/rtl/IR.v similarity index 100% rename from openfpga_flow/benchmarks/micro_benchmark/RISC_posedge_clk/IR.v rename to openfpga_flow/benchmarks/micro_benchmark/RISC_posedge_clk/rtl/IR.v diff --git a/openfpga_flow/benchmarks/micro_benchmark/RISC_posedge_clk/Memory.v b/openfpga_flow/benchmarks/micro_benchmark/RISC_posedge_clk/rtl/Memory.v similarity index 100% rename from openfpga_flow/benchmarks/micro_benchmark/RISC_posedge_clk/Memory.v rename to openfpga_flow/benchmarks/micro_benchmark/RISC_posedge_clk/rtl/Memory.v diff --git a/openfpga_flow/benchmarks/micro_benchmark/RISC_posedge_clk/Mux_31.v b/openfpga_flow/benchmarks/micro_benchmark/RISC_posedge_clk/rtl/Mux_31.v similarity index 100% rename from openfpga_flow/benchmarks/micro_benchmark/RISC_posedge_clk/Mux_31.v rename to openfpga_flow/benchmarks/micro_benchmark/RISC_posedge_clk/rtl/Mux_31.v diff --git a/openfpga_flow/benchmarks/micro_benchmark/RISC_posedge_clk/Mux_51.v b/openfpga_flow/benchmarks/micro_benchmark/RISC_posedge_clk/rtl/Mux_51.v similarity index 100% rename from openfpga_flow/benchmarks/micro_benchmark/RISC_posedge_clk/Mux_51.v rename to openfpga_flow/benchmarks/micro_benchmark/RISC_posedge_clk/rtl/Mux_51.v diff --git a/openfpga_flow/benchmarks/micro_benchmark/RISC_posedge_clk/PC.v b/openfpga_flow/benchmarks/micro_benchmark/RISC_posedge_clk/rtl/PC.v similarity index 100% rename from openfpga_flow/benchmarks/micro_benchmark/RISC_posedge_clk/PC.v rename to openfpga_flow/benchmarks/micro_benchmark/RISC_posedge_clk/rtl/PC.v diff --git a/openfpga_flow/benchmarks/micro_benchmark/RISC_posedge_clk/RISC_core_mem_top.v b/openfpga_flow/benchmarks/micro_benchmark/RISC_posedge_clk/rtl/RISC_core_mem_top.v similarity index 100% rename from openfpga_flow/benchmarks/micro_benchmark/RISC_posedge_clk/RISC_core_mem_top.v rename to openfpga_flow/benchmarks/micro_benchmark/RISC_posedge_clk/rtl/RISC_core_mem_top.v diff --git a/openfpga_flow/benchmarks/micro_benchmark/RISC_posedge_clk/RISC_core_top.v b/openfpga_flow/benchmarks/micro_benchmark/RISC_posedge_clk/rtl/RISC_core_top.v similarity index 100% rename from openfpga_flow/benchmarks/micro_benchmark/RISC_posedge_clk/RISC_core_top.v rename to openfpga_flow/benchmarks/micro_benchmark/RISC_posedge_clk/rtl/RISC_core_top.v diff --git a/openfpga_flow/benchmarks/micro_benchmark/RISC_posedge_clk/Reg_1bit.v b/openfpga_flow/benchmarks/micro_benchmark/RISC_posedge_clk/rtl/Reg_1bit.v similarity index 100% rename from openfpga_flow/benchmarks/micro_benchmark/RISC_posedge_clk/Reg_1bit.v rename to openfpga_flow/benchmarks/micro_benchmark/RISC_posedge_clk/rtl/Reg_1bit.v diff --git a/openfpga_flow/benchmarks/micro_benchmark/RISC_posedge_clk/Reg_8bit.v b/openfpga_flow/benchmarks/micro_benchmark/RISC_posedge_clk/rtl/Reg_8bit.v similarity index 100% rename from openfpga_flow/benchmarks/micro_benchmark/RISC_posedge_clk/Reg_8bit.v rename to openfpga_flow/benchmarks/micro_benchmark/RISC_posedge_clk/rtl/Reg_8bit.v diff --git a/openfpga_flow/benchmarks/micro_benchmark/RISC_posedge_clk/RISC_testbench.v b/openfpga_flow/benchmarks/micro_benchmark/RISC_posedge_clk/testbench/RISC_testbench.v similarity index 100% rename from openfpga_flow/benchmarks/micro_benchmark/RISC_posedge_clk/RISC_testbench.v rename to openfpga_flow/benchmarks/micro_benchmark/RISC_posedge_clk/testbench/RISC_testbench.v diff --git a/openfpga_flow/benchmarks/micro_benchmark/SAPone/ACC.v b/openfpga_flow/benchmarks/micro_benchmark/SAPone/rtl/ACC.v similarity index 100% rename from openfpga_flow/benchmarks/micro_benchmark/SAPone/ACC.v rename to openfpga_flow/benchmarks/micro_benchmark/SAPone/rtl/ACC.v diff --git a/openfpga_flow/benchmarks/micro_benchmark/SAPone/ADDSUB.v b/openfpga_flow/benchmarks/micro_benchmark/SAPone/rtl/ADDSUB.v similarity index 100% rename from openfpga_flow/benchmarks/micro_benchmark/SAPone/ADDSUB.v rename to openfpga_flow/benchmarks/micro_benchmark/SAPone/rtl/ADDSUB.v diff --git a/openfpga_flow/benchmarks/micro_benchmark/SAPone/BRegister.v b/openfpga_flow/benchmarks/micro_benchmark/SAPone/rtl/BRegister.v similarity index 100% rename from openfpga_flow/benchmarks/micro_benchmark/SAPone/BRegister.v rename to openfpga_flow/benchmarks/micro_benchmark/SAPone/rtl/BRegister.v diff --git a/openfpga_flow/benchmarks/micro_benchmark/SAPone/Controller.v b/openfpga_flow/benchmarks/micro_benchmark/SAPone/rtl/Controller.v similarity index 100% rename from openfpga_flow/benchmarks/micro_benchmark/SAPone/Controller.v rename to openfpga_flow/benchmarks/micro_benchmark/SAPone/rtl/Controller.v diff --git a/openfpga_flow/benchmarks/micro_benchmark/SAPone/IR.v b/openfpga_flow/benchmarks/micro_benchmark/SAPone/rtl/IR.v similarity index 100% rename from openfpga_flow/benchmarks/micro_benchmark/SAPone/IR.v rename to openfpga_flow/benchmarks/micro_benchmark/SAPone/rtl/IR.v diff --git a/openfpga_flow/benchmarks/micro_benchmark/SAPone/MAR.v b/openfpga_flow/benchmarks/micro_benchmark/SAPone/rtl/MAR.v similarity index 100% rename from openfpga_flow/benchmarks/micro_benchmark/SAPone/MAR.v rename to openfpga_flow/benchmarks/micro_benchmark/SAPone/rtl/MAR.v diff --git a/openfpga_flow/benchmarks/micro_benchmark/SAPone/OutputRegister.v b/openfpga_flow/benchmarks/micro_benchmark/SAPone/rtl/OutputRegister.v similarity index 100% rename from openfpga_flow/benchmarks/micro_benchmark/SAPone/OutputRegister.v rename to openfpga_flow/benchmarks/micro_benchmark/SAPone/rtl/OutputRegister.v diff --git a/openfpga_flow/benchmarks/micro_benchmark/SAPone/PC.v b/openfpga_flow/benchmarks/micro_benchmark/SAPone/rtl/PC.v similarity index 100% rename from openfpga_flow/benchmarks/micro_benchmark/SAPone/PC.v rename to openfpga_flow/benchmarks/micro_benchmark/SAPone/rtl/PC.v diff --git a/openfpga_flow/benchmarks/micro_benchmark/SAPone/ROM.v b/openfpga_flow/benchmarks/micro_benchmark/SAPone/rtl/ROM.v similarity index 100% rename from openfpga_flow/benchmarks/micro_benchmark/SAPone/ROM.v rename to openfpga_flow/benchmarks/micro_benchmark/SAPone/rtl/ROM.v diff --git a/openfpga_flow/benchmarks/micro_benchmark/SAPone/SAPone.v b/openfpga_flow/benchmarks/micro_benchmark/SAPone/rtl/SAPone.v similarity index 100% rename from openfpga_flow/benchmarks/micro_benchmark/SAPone/SAPone.v rename to openfpga_flow/benchmarks/micro_benchmark/SAPone/rtl/SAPone.v diff --git a/openfpga_flow/benchmarks/micro_benchmark/SAPone/testSAPone.v b/openfpga_flow/benchmarks/micro_benchmark/SAPone/testbench/testSAPone.v similarity index 100% rename from openfpga_flow/benchmarks/micro_benchmark/SAPone/testSAPone.v rename to openfpga_flow/benchmarks/micro_benchmark/SAPone/testbench/testSAPone.v diff --git a/openfpga_flow/tasks/fpga_bitstream/generate_bitstream/device_48x48/config/task.conf b/openfpga_flow/tasks/fpga_bitstream/generate_bitstream/device_48x48/config/task.conf new file mode 100644 index 000000000..911239184 --- /dev/null +++ b/openfpga_flow/tasks/fpga_bitstream/generate_bitstream/device_48x48/config/task.conf @@ -0,0 +1,35 @@ +# = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = +# 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 +# Runtime of this bitstream generation should not exceed 3 minutes as a QoR requirement +timeout_each_job = 3*60 +fpga_flow=yosys_vpr + +[OpenFPGA_SHELL] +openfpga_shell_template=${PATH:OPENFPGA_PATH}/openfpga_flow/OpenFPGAShellScripts/generate_bitstream_fix_device_example_script.openfpga +openfpga_arch_file=${PATH:OPENFPGA_PATH}/openfpga_flow/openfpga_arch/k6_frac_N10_adder_register_scan_chain_depop50_40nm_openfpga.xml +openfpga_sim_setting_file=${PATH:OPENFPGA_PATH}/openfpga_flow/openfpga_simulation_settings/auto_sim_openfpga.xml +openfpga_vpr_route_chan_width=50 +openfpga_vpr_device_layout=48x48 + +[ARCHITECTURES] +arch0=${PATH:OPENFPGA_PATH}/openfpga_flow/vpr_arch/k6_frac_N10_tileable_adder_register_scan_chain_depop50_40nm.xml + +[BENCHMARKS] +bench0=${PATH:OPENFPGA_PATH}/openfpga_flow/benchmarks/micro_benchmark/SAPone/rtl/* + +[SYNTHESIS_PARAM] +bench0_top = SAPone + +[SCRIPT_PARAM_MIN_ROUTE_CHAN_WIDTH] diff --git a/openfpga_flow/tasks/fpga_bitstream/generate_bitstream/device_96x96/config/task.conf b/openfpga_flow/tasks/fpga_bitstream/generate_bitstream/device_96x96/config/task.conf new file mode 100644 index 000000000..97dcc465b --- /dev/null +++ b/openfpga_flow/tasks/fpga_bitstream/generate_bitstream/device_96x96/config/task.conf @@ -0,0 +1,35 @@ +# = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = +# 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 +# Runtime of this bitstream generation should not exceed 6 minutes as a QoR requirement +timeout_each_job = 6*60 +fpga_flow=yosys_vpr + +[OpenFPGA_SHELL] +openfpga_shell_template=${PATH:OPENFPGA_PATH}/openfpga_flow/OpenFPGAShellScripts/generate_bitstream_fix_device_example_script.openfpga +openfpga_arch_file=${PATH:OPENFPGA_PATH}/openfpga_flow/openfpga_arch/k6_frac_N10_adder_register_scan_chain_depop50_40nm_openfpga.xml +openfpga_sim_setting_file=${PATH:OPENFPGA_PATH}/openfpga_flow/openfpga_simulation_settings/auto_sim_openfpga.xml +openfpga_vpr_route_chan_width=100 +openfpga_vpr_device_layout=96x96 + +[ARCHITECTURES] +arch0=${PATH:OPENFPGA_PATH}/openfpga_flow/vpr_arch/k6_frac_N10_tileable_adder_register_scan_chain_depop50_40nm.xml + +[BENCHMARKS] +bench0=${PATH:OPENFPGA_PATH}/openfpga_flow/benchmarks/micro_benchmark/RISC_posedge_clk/rtl/*.v + +[SYNTHESIS_PARAM] +bench0_top = RISC_core_top + +[SCRIPT_PARAM_MIN_ROUTE_CHAN_WIDTH] diff --git a/openfpga_flow/tasks/fpga_bitstream/generate_bitstream/config/task.conf b/openfpga_flow/tasks/fpga_bitstream/generate_bitstream/device_auto/config/task.conf similarity index 100% rename from openfpga_flow/tasks/fpga_bitstream/generate_bitstream/config/task.conf rename to openfpga_flow/tasks/fpga_bitstream/generate_bitstream/device_auto/config/task.conf