Beispiel #1
0
    def _impl(self):
        self.tables_tmp = HObjList([
            HashTableIntf()._updateParamsFrom(t.io) for t in self.table_cores
        ])

        for t_io, t in zip(self.tables_tmp, self.table_cores):
            t.io(t_io, exclude={t.io.lookupRes})
            t_io.lookupRes(
                HsBuilder(self, t.io.lookupRes).buff(latency=(1, 2)).end)

        self.tables = list(self.tables_tmp)
        CuckooHashTable._impl(self)
Beispiel #2
0
 def setUp(self):
     SimTestCase.setUp(self)
     self.TABLE_SIZE = 32
     u = self.u = CuckooHashTable([CRC_32, CRC_32])
     u.KEY_WIDTH.set(16)
     u.DATA_WIDTH.set(8)
     u.LOOKUP_KEY.set(True)
     u.TABLE_SIZE.set(self.TABLE_SIZE)
     self.TABLE_CNT = 2
     self.prepareUnit(u)
     self.TABLE_MEMS = [
         getattr(self.model,
                 "tables_%d_inst" % i).table_inst.ram_memory._val.val
         for i in range(self.TABLE_CNT)
     ]
Beispiel #3
0
 def test_comples_stm_ops(self):
     u = CuckooHashTable()
     self.check_consystency(u)
Beispiel #4
0
 def _config(self):
     CuckooHashTable._config(self)
     self.TABLE_CNT = len(self.polynomials)
     self.POLYNOMIALS = Param(tuple(self.polynomials))
Beispiel #5
0
 def __init__(self, polynomials):
     self.polynomials = polynomials
     CuckooHashTable.__init__(self)
Beispiel #6
0
 def test_CuckooHashTable(self):
     u = CuckooHashTable()
     convert(u)