FPGA Devices as dictionaries of logic types keyed by grid location. Currently only DE10 Nano Cyclone V support.

DE10 Nano

Support for DE10 Nano Cyclone V SoC chip number 5CSEBA6U23I7.

DE10=DE10Class()
DE10
DE10 Nano 5CSEBA6U23I7 from X=1 to X=88, Y=1 to Y=80
MLAB X-coords: [3, 6, 8, 15, 21, 25, 28, 34, 39, 47, 52, 59, 65, 72, 78, 82, 84, 87]
M10K X-coords: [5, 14, 26, 38, 41, 44, 49, 58, 69, 76, 89]
DSP X-coords: [20, 32, 54, 86]
LAB X-coords: else

class DE10Class[source]

DE10Class()

DE10 Nano Chip 5CSEBA6U23I7 as a callable with x, y, n coordinates. With two args x and y, give logic type. With three, give cell type. Also has attributes listing MLAB,LAB,DSP,M10K x-coordinates.

The DE10Nano is indexed by x,y coordinates on the FPGA grid, and returns the type of logic block at that location as follows:

DE10(10,10)
'LAB'

Each x,y coordinate has a third dimension n which returns e.g a LABCELL or FF for combinational logic and flipflops, respectively, and can be called as:

DE10(10,10,0)
'LABCELL'

The different types of logic are stored as attributes of x-locations:

DE10.MLAB
[3, 6, 8, 15, 21, 25, 28, 34, 39, 47, 52, 59, 65, 72, 78, 82, 84, 87]
DE10.M10K
[5, 14, 26, 38, 41, 44, 49, 58, 69, 76, 89]
DE10.DSP
[20, 32, 54, 86]

Finally, locations can be easily assigned with the SLA method, which accepts 3 coordinates and an optional third argument giving the name of the assigned logic, like so:

DE10.SLA(1,1,1)
'set_location_assignment FF_X1_Y1_N1 -to "{0}"\n'
DE10.SLA(1,1,1,'mylogic')
'set_location_assignment FF_X1_Y1_N1 -to "mylogic"\n'

Support is required for other chips. If you can, please contribute with a similar class structure to make this library more user friendly!