FPGA Devices as dictionaries of logic types keyed by grid location. Currently only DE10 Nano Cyclone V support.
DE10=DE10Class()
DE10
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)
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)
The different types of logic are stored as attributes of x-locations:
DE10.MLAB
DE10.M10K
DE10.DSP
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)
DE10.SLA(1,1,1,'mylogic')
Support is required for other chips. If you can, please contribute with a similar class structure to make this library more user friendly!