Skip to content

Commit

Permalink
devices.json: Fix LFE45U settings
Browse files Browse the repository at this point in the history
Signed-off-by: David Shah <[email protected]>
  • Loading branch information
gatecat committed May 14, 2018
1 parent 21f0035 commit 44a01c0
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 4 deletions.
35 changes: 31 additions & 4 deletions devices.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"idcode": "0x41112043",
"frames": 9470,
"bits_per_frame": 846,
"pad_bits_after_frame": 2,
"pad_bits_before_frame": 0,
"pad_bits_after_frame": 0,
"pad_bits_before_frame": 2,
"fuzz": 1
},
"LFE5U-85F": {
Expand All @@ -43,8 +43,8 @@
"idcode": "0x01112043",
"frames": 9470,
"bits_per_frame": 846,
"pad_bits_after_frame": 2,
"pad_bits_before_frame": 0,
"pad_bits_after_frame": 0,
"pad_bits_before_frame": 2,
"fuzz": 0
},
"LFE5UM-85F": {
Expand All @@ -55,6 +55,33 @@
"pad_bits_after_frame": 0,
"pad_bits_before_frame": 0,
"fuzz": 0
},
"LFE5UM5G-25F": {
"packages": ["csfBGA285", "caBGA256", "caBGA381", "caBGA554", "caBGA756"],
"idcode": "0x81111043",
"frames": 7562,
"bits_per_frame": 592,
"pad_bits_after_frame": 0,
"pad_bits_before_frame": 0,
"fuzz": 0
},
"LFE5UM5G-45F": {
"packages": ["csfBGA285", "caBGA256", "caBGA381", "caBGA554", "caBGA756"],
"idcode": "0x81112043",
"frames": 9470,
"bits_per_frame": 846,
"pad_bits_after_frame": 0,
"pad_bits_before_frame": 2,
"fuzz": 0
},
"LFE5UM5G-85F": {
"packages": ["csfBGA285", "caBGA381", "caBGA554", "caBGA756"],
"idcode": "0x81113043",
"frames": 13294,
"bits_per_frame": 1136,
"pad_bits_after_frame": 0,
"pad_bits_before_frame": 0,
"fuzz": 0
}
}
}
Expand Down
19 changes: 19 additions & 0 deletions libtrellis/examples/ecp5um45_bits.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env python3
"""
This simple example uses PyTrellis to read TESTTILE tile bits, of tile R2C2 in a bitstream
"""
import pytrellis

pytrellis.load_database("../../../prjtrellis-db")
bs = pytrellis.Bitstream.read_bit("../../minitests/ncl/lut.bit")
chip = bs.deserialise_chip()
tile = chip.tiles["R2C2:PLC2"]
tile_bits = tile.cram
bit_offset = tile.info.bit_offset
frame_offset = tile.info.frame_offset

for bit in range(tile_bits.bits()):
for frame in range(tile_bits.frames()):
if tile_bits.bit(frame, bit):
print("({}, {})\t({}, {})".format(bit, frame, bit + bit_offset, frame + frame_offset))

0 comments on commit 44a01c0

Please sign in to comment.