def test_get_roi_gen_sites(self): makedb = lambda sites: { "ATILE": { "bits": { "CLB_IO_CLK": { "baseaddr": "0x00400F00", "frames": 28, "height": 2, "offset": 0, "words": 2 } }, "grid_x": 10, "grid_y": 10, "segment": "ASEGMENT", "segment_type": "bram0_l", "sites": sites, "type": "BRAM_INT_INTERFACE_L" } } with setup_database(makedb({})): self.assertListEqual(list(get_roi().gen_sites()), []) with setup_database(makedb({'FOO': 'BAR'})): self.assertListEqual(list(get_roi().gen_sites()), [('ATILE', 'FOO', 'BAR')])
def gen_iobs(): ''' IOB33S: main IOB of a diff pair IOB33M: secondary IOB of a diff pair IOB33: not a diff pair. Relatively rare (at least in ROI...2 of them?) Focus on IOB33S to start ''' for _tile_name, site_name, site_type in util.get_roi().gen_sites( #['IOB33', 'IOB33S', 'IOB33M']): ['IOB33S']): yield site_name, site_type
def gen_bram18(): ''' sample: "sites": { "RAMB18_X0Y50": "FIFO18E1", "RAMB18_X0Y51": "RAMB18E1", "RAMB36_X0Y25": "RAMBFIFO36E1" }, ''' for _tile_name, site_name, _site_type in sorted(util.get_roi().gen_sites( ['RAMB18E1', 'FIFO18E1'])): yield site_name
def gen_bram36(): for tile_name, site_name, _site_type in util.get_roi().gen_sites( ['RAMBFIFO36E1']): yield tile_name, site_name
def gen_slices(): for _tile_name, site_name, _site_type in util.get_roi().gen_sites( ['SLICEL', 'SLICEM']): yield site_name
def gen_sites(): for _tile_name, site_name, _site_type in sorted(util.get_roi().gen_sites( ["MMCME2_ADV"])): yield site_name
def gen_sites(): for tile_name, site_name, _site_type in sorted(util.get_roi().gen_sites( ['RAMB18E1', 'FIFO18E1'])): yield tile_name, site_name
def gen_sites(): for tile_name, site_name, _site_type in util.get_roi().gen_sites( ['MMCME2_ADV']): yield tile_name, site_name
def gen_sites(): # yield ("MONITOR_BOT_X46Y79", "XADC_X0Y0") for tile_name, site_name, _site_type in util.get_roi().gen_sites(['XADC']): yield tile_name, site_name