OpenFPGA Base¶
- class spydrnet_physical.util.OpenFPGA(grid, netlist=None, verilog_files=None, library='work', top_module='fpga_top', arch_xml=None)[source]¶
This is top-level clas of OpenFPGa which provides methods for different generic netlist restructuring
Attributes:
SC_HEIGHT
CPP
GLOBAL_SCALE
SC_GRID
Returns library
Returns library
Returns top_module
Methods:
Init class with OpenFPGA netlist
This registers the tile generator class to OpenFPGA base class
This registers the tile generator class to OpenFPGA base class
This registers the tile generator class to OpenFPGA base class
proxy function to create_tiles method of tile_creator class
proxy function to create_tiles method of tile_creator class
Proxy fucntion to add placement and shaping information to each instance
This adds pin placment nforamtion to tile instances
This method runs the fpga render class to assign shape and location to each module instance
get_custom_boundary
get_cross_shape_boundary
Save the shaping data
This shows the placement data of each instance on the screen
Show the utilization of the modules
Returns instance current netlist instance map
Get statistics of the top module
Removes direct interconnects from the OpenFPGA netlist
This method creates the group of
grid_io
and neighbouringconnection_box
whichcna be merge.Remove configuration chain from design
Removes undriven/floating nets from the top level
Convert grid_io Input/Output pins to bus structure
Convert grid_clb Input/Output pins to bus structure
Convert sb Input pins to bus structure
Convert cb Input pins to bus structure
Creates feedthrough for
grid_clb
outputs, to convert digonal connections to horizontal and verticalclear_written_modules
write_include_file
Save verilog files
load_grid
This method generates the grid instance information given the cordinate points
This method is used to fix the pin names on the grid modules
This method annotated the area infomration on each definition of the top level module
hierarchy
Adde area information to label
Analyzes utilisation of each module and returns CSS string to highlight in the SVG
- __init__(grid, netlist=None, verilog_files=None, library='work', top_module='fpga_top', arch_xml=None)[source]¶
Init class with OpenFPGA netlist
- Parameters
grid (int, int) – Size of the FPGA grid
netlist (sdn.netlist) – Pass OpenFPGA core netlist
library (str) – library name
top_module (str) – top_module name
- property netlist¶
Returns library
- property library¶
Returns library
- property top_module: spydrnet.ir.Definition¶
Returns top_module
- register_tile_generator(cls, *args, **kwargs)[source]¶
This registers the tile generator class to OpenFPGA base class
- register_config_generator(cls, *args, **kwargs)[source]¶
This registers the tile generator class to OpenFPGA base class
- register_placement_creator(cls, *args, **kwargs)[source]¶
This registers the tile generator class to OpenFPGA base class
- create_placement(*args, **kwargs)[source]¶
Proxy fucntion to add placement and shaping information to each instance
- render_floorplan()[source]¶
This method runs the fpga render class to assign shape and location to each module instance
- show_placement_data(pattern='*', filename=None)[source]¶
This shows the placement data of each instance on the screen
- design_instance_map(pattern='*', quiet=False)[source]¶
Returns instance current netlist instance map
- design_top_stat(pattern='*', quiet=False, filename=None, function=())[source]¶
Get statistics of the top module
- merge_all_grid_ios()[source]¶
This method creates the group of
grid_io
and neighbouringconnection_box
whichcna be merge.Variable
cb_list
,grid_io_list
first creates the list of instances on the periphery of the FPGA, starting from the left bottom corner and going clockwisemerge_list
is a dictionary which creates the group of instances for different unique pairs of the IO and CB blocks
- remove_undriven_nets(pattern='*')[source]¶
Removes undriven/floating nets from the top level
the net name with undriven keyword in the name is considered as floating nets
- create_grid_io_bus(inpad='inpad', outpad='outpad', sort_pins=None)[source]¶
Convert grid_io Input/Output pins to bus structure
# Input Pins right_width_0_height_0_subtile_*__pin_inpad_0_ -> io_right_in left_width_0_height_0_subtile_*__pin_inpad_0_ -> io_left_in top_width_0_height_0_subtile_*__pin_inpad_0_ -> io_top_in bottom_width_0_height_0_subtile_*__pin_inpad_0_ -> io_bottom_in # Output Pins right_width_0_height_0_subtile_*__pin_outpad_0_ -> io_right_out left_width_0_height_0_subtile_*__pin_outpad_0_ -> io_left_out top_width_0_height_0_subtile_*__pin_outpad_0_ -> io_top_out bottom_width_0_height_0_subtile_*__pin_outpad_0_ -> io_bottom_out
- create_grid_clb_bus(pins=None, grid_module='grid_clb')[source]¶
Convert grid_clb Input/Output pins to bus structure
# Input Pins right_width_0_height_0_subtile_*__pin_I_0_ -> grid_right_in left_width_0_height_0_subtile_*__pin_I_0_ -> grid_left_in top_width_0_height_0_subtile_*__pin_I_0_ -> grid_top_in bottom_width_0_height_0_subtile_*__pin_I_0_ -> grid_bottom_in # Output Pins right_width_0_height_0_subtile_*__pin_O_0_ -> grid_right_out left_width_0_height_0_subtile_*__pin_O_0_ -> grid_left_out top_width_0_height_0_subtile_*__pin_O_0_ -> grid_top_out bottom_width_0_height_0_subtile_*__pin_O_0_ -> grid_bottom_out
- create_sb_bus(pins=None)[source]¶
Convert sb Input pins to bus structure
# Input Pins top_left_grid_right_width_0_height_0_subtile_*__pin_O_*_ -> sb_top_l_in top_right_grid_left_width_0_height_0_subtile_*__pin_O_*_ -> sb_top_r_in bottom_left_grid_right_width_0_height_0_subtile_*__pin_O_*_ -> sb_bottom_l_in bottom_right_grid_left_width_0_height_0_subtile_*__pin_O_*_ -> sb_bottom_r_in left_top_grid_bottom_width_0_height_0_subtile_*__pin_O_*_ -> sb_left_t_in left_bottom_grid_top_width_0_height_0_subtile_*__pin_O_*_ -> sb_left_b_in right_top_grid_bottom_width_0_height_0_subtile_*__pin_O_*_ -> sb_right_t_in right_bottom_grid_top_width_0_height_0_subtile_*__pin_O_*_ -> sb_right_b_in
- create_cb_bus(pins=None)[source]¶
Convert cb Input pins to bus structure
right_grid_left_width_0_height_0_subtile_*__pin_I_*_ -> grid_right_in left_grid_right_width_0_height_0_subtile_*__pin_I_*_ -> grid_left_in top_grid_bottom_width_0_height_0_subtile_*__pin_I_*_ -> grid_top_in bottom_grid_top_width_0_height_0_subtile_*__pin_I_*_ -> grid_bottom_in right_grid_left_width_0_height_0_subtile_*__pin_outpad_*_ -> grid_right_in left_grid_right_width_0_height_0_subtile_*__pin_outpad_*_ -> grid_left_in top_grid_bottom_width_0_height_0_subtile_*__pin_outpad_*_ -> grid_top_in bottom_grid_top_width_0_height_0_subtile_*__pin_outpad_*_ -> grid_bottom_in
- create_grid_clb_feedthroughs()[source]¶
Creates feedthrough for
grid_clb
outputs, to convert digonal connections to horizontal and verticalgrid_clb output on each side is feedthrough from connection box as shown in the following example (onle left side feedthroughs are shown)
+-----+ +-----+ | | | | | +--+ | +--+ | SB | | SB | | +-++ | +--+ | | | | | +-----+ | +--+--+ | +------ | +------ +-----+ | | +-----+ | | | | | | | | | | | +--+ CLB | +-------+ CLB | CBX | | | | | | | +-----+ | | +-----+ | | | | | +-----+ | +------ +--+--+ +------ | | | | | | +-++ | +--+ | SB | | SB | | +--+ | +--+ | | | | +-----+ +-----+ Before After feedthrough creations
- save_netlist(patten='*', location='.', sort_print=False, skip_constraints=True, sort_cables=False, sort_instances=False, sort_ports=False, write_blackbox=True)[source]¶
Save verilog files
- get_top_instance(x, y)[source]¶
This method generates the grid instance information given the cordinate points
- fix_grid_pin_names(regex='.*__pin_(.*)_0_', module='grid_*', name_map=None)[source]¶
This method is used to fix the pin names on the grid modules
- Parameters
regex (str) – Regex string used to extract the name of the port