prga.tools.bitgen.pktchain module

class prga.tools.bitgen.pktchain.PktchainBitstreamGenerator(context)

Bases: prga.tools.bitgen.common.AbstractBitstreamGenerator

Bitstream generator for ‘pktchain’ programming circuitry.

classmethod _int2bitseq(v, bigendian=True)
_none = <object object>
_reversed_crc_lookup = {0: 0, 1: 217, 2: 181, 3: 108, 4: 109, 5: 180, 6: 216, 7: 1, 8: 218, 9: 3, 10: 111, 11: 182, 12: 183, 13: 110, 14: 2, 15: 219, 16: 179, 17: 106, 18: 6, 19: 223, 20: 222, 21: 7, 22: 107, 23: 178, 24: 105, 25: 176, 26: 220, 27: 5, 28: 4, 29: 221, 30: 177, 31: 104, 32: 97, 33: 184, 34: 212, 35: 13, 36: 12, 37: 213, 38: 185, 39: 96, 40: 187, 41: 98, 42: 14, 43: 215, 44: 214, 45: 15, 46: 99, 47: 186, 48: 210, 49: 11, 50: 103, 51: 190, 52: 191, 53: 102, 54: 10, 55: 211, 56: 8, 57: 209, 58: 189, 59: 100, 60: 101, 61: 188, 62: 208, 63: 9, 64: 194, 65: 27, 66: 119, 67: 174, 68: 175, 69: 118, 70: 26, 71: 195, 72: 24, 73: 193, 74: 173, 75: 116, 76: 117, 77: 172, 78: 192, 79: 25, 80: 113, 81: 168, 82: 196, 83: 29, 84: 28, 85: 197, 86: 169, 87: 112, 88: 171, 89: 114, 90: 30, 91: 199, 92: 198, 93: 31, 94: 115, 95: 170, 96: 163, 97: 122, 98: 22, 99: 207, 100: 206, 101: 23, 102: 123, 103: 162, 104: 121, 105: 160, 106: 204, 107: 21, 108: 20, 109: 205, 110: 161, 111: 120, 112: 16, 113: 201, 114: 165, 115: 124, 116: 125, 117: 164, 118: 200, 119: 17, 120: 202, 121: 19, 122: 127, 123: 166, 124: 167, 125: 126, 126: 18, 127: 203, 128: 131, 129: 90, 130: 54, 131: 239, 132: 238, 133: 55, 134: 91, 135: 130, 136: 89, 137: 128, 138: 236, 139: 53, 140: 52, 141: 237, 142: 129, 143: 88, 144: 48, 145: 233, 146: 133, 147: 92, 148: 93, 149: 132, 150: 232, 151: 49, 152: 234, 153: 51, 154: 95, 155: 134, 156: 135, 157: 94, 158: 50, 159: 235, 160: 226, 161: 59, 162: 87, 163: 142, 164: 143, 165: 86, 166: 58, 167: 227, 168: 56, 169: 225, 170: 141, 171: 84, 172: 85, 173: 140, 174: 224, 175: 57, 176: 81, 177: 136, 178: 228, 179: 61, 180: 60, 181: 229, 182: 137, 183: 80, 184: 139, 185: 82, 186: 62, 187: 231, 188: 230, 189: 63, 190: 83, 191: 138, 192: 65, 193: 152, 194: 244, 195: 45, 196: 44, 197: 245, 198: 153, 199: 64, 200: 155, 201: 66, 202: 46, 203: 247, 204: 246, 205: 47, 206: 67, 207: 154, 208: 242, 209: 43, 210: 71, 211: 158, 212: 159, 213: 70, 214: 42, 215: 243, 216: 40, 217: 241, 218: 157, 219: 68, 220: 69, 221: 156, 222: 240, 223: 41, 224: 32, 225: 249, 226: 149, 227: 76, 228: 77, 229: 148, 230: 248, 231: 33, 232: 250, 233: 35, 234: 79, 235: 150, 236: 151, 237: 78, 238: 34, 239: 251, 240: 147, 241: 74, 242: 38, 243: 255, 244: 254, 245: 39, 246: 75, 247: 146, 248: 73, 249: 144, 250: 252, 251: 37, 252: 36, 253: 253, 254: 145, 255: 72}
bits
classmethod crc(seq)
generate_bitstream(fasm, output, args)

Generate bitstream without storing parsed data.

Parameters:
  • input (str of file-like object) –
  • output (str of file-like object) –
  • args (Sequence [str ]) – Remaining arguments other than the ones specified in the common argument parser
classmethod reverse_crc(crc, zeros=0)
set_bits(value, hierarchy=None, inplace=False)

Update bitstream with the specified value and hierarchy. Subclass may implement this method to use AbstractBitstreamGenerator.parse_fasm.

Parameters:
Keyword Arguments:
 

inplace (bool) – If set, value may be modified in place.