Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure backwards-compatibility of bitstring lsb0 #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/dumpling/Chips/Rosetta.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@
import click
from dumpling.Common.ElfParser import ElfParser
from bitstring import BitArray
bitstring.lsb0 = True #Enables the experimental mode to index LSB with 0 instead of the MSB (see thread https://github.com/scott-griffiths/bitstring/issues/156)
if (int(bitstring.__version__[0]) < 4):
bitstring.set_lsb0(True) #Enables the experimental mode to index LSB with 0 instead of the MSB (see thread https://github.com/scott-griffiths/bitstring/issues/156)
else:
bitstring.lsb0 = True #Enables the experimental mode to index LSB with 0 instead of the MSB (see thread https://github.com/scott-griffiths/bitstring/issues/156)
from dumpling.Common.HP93000 import HP93000VectorWriter
from dumpling.JTAGTaps.PulpJTAGTapRosetta import PULPJTagTapRosetta
from dumpling.Common.VectorBuilder import VectorBuilder
Expand Down
5 changes: 4 additions & 1 deletion src/dumpling/Chips/Siracusa.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@
import click
from dumpling.Common.ElfParser import ElfParser
from bitstring import BitArray
bitstring.lsb0 = True #Enables the experimental mode to index LSB with 0 instead of the MSB (see thread https://github.com/scott-griffiths/bitstring/issues/156)
if (int(bitstring.__version__[0]) < 4):
bitstring.set_lsb0(True) #Enables the experimental mode to index LSB with 0 instead of the MSB (see thread https://github.com/scott-griffiths/bitstring/issues/156)
else:
bitstring.lsb0 = True #Enables the experimental mode to index LSB with 0 instead of the MSB (see thread https://github.com/scott-griffiths/bitstring/issues/156)
from dumpling.Common.HP93000 import HP93000VectorWriter
from dumpling.JTAGTaps.PulpJTAGTap import PULPJtagTap
from dumpling.Common.VectorBuilder import VectorBuilder
Expand Down
5 changes: 4 additions & 1 deletion src/dumpling/Chips/Vega.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@
import click
from dumpling.Common.ElfParser import ElfParser
from bitstring import BitArray
bitstring.lsb0 = True #Enables the experimental mode to index LSB with 0 instead of the MSB (see thread https://github.com/scott-griffiths/bitstring/issues/156)
if (int(bitstring.__version__[0]) < 4):
bitstring.set_lsb0(True) #Enables the experimental mode to index LSB with 0 instead of the MSB (see thread https://github.com/scott-griffiths/bitstring/issues/156)
else:
bitstring.lsb0 = True #Enables the experimental mode to index LSB with 0 instead of the MSB (see thread https://github.com/scott-griffiths/bitstring/issues/156)
from dumpling.Common.HP93000 import HP93000VectorWriter
from dumpling.JTAGTaps.PulpJTAGTapVega import PULPJtagTapVega
from dumpling.Common.VectorBuilder import VectorBuilder
Expand Down
5 changes: 4 additions & 1 deletion src/dumpling/Drivers/JTAG.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@

from dumpling.JTAGTaps.JTAGTap import JTAGTap, JTAGRegister

bitstring.lsb0 = True #Enables the experimental mode to index LSB with 0 instead of the MSB (see thread https://github.com/scott-griffiths/bitstring/issues/156)
if (int(bitstring.__version__[0]) < 4):
bitstring.set_lsb0(True) #Enables the experimental mode to index LSB with 0 instead of the MSB (see thread https://github.com/scott-griffiths/bitstring/issues/156)
else:
bitstring.lsb0 = True #Enables the experimental mode to index LSB with 0 instead of the MSB (see thread https://github.com/scott-griffiths/bitstring/issues/156)
from dumpling.Common.VectorBuilder import VectorBuilder

class JTAGDriver:
Expand Down
5 changes: 4 additions & 1 deletion src/dumpling/JTAGTaps/PulpJTAGTap.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@
from dumpling.Common.VectorBuilder import VectorBuilder
from dumpling.Drivers.JTAG import JTAGTap, JTAGDriver, JTAGRegister
from bitstring import BitArray
bitstring.lsb0 = True #Enables the experimental mode to index LSB with 0 instead of the MSB (see thread https://github.com/scott-griffiths/bitstring/issues/156)
if (int(bitstring.__version__[0]) < 4):
bitstring.set_lsb0(True) #Enables the experimental mode to index LSB with 0 instead of the MSB (see thread https://github.com/scott-griffiths/bitstring/issues/156)
else:
bitstring.lsb0 = True #Enables the experimental mode to index LSB with 0 instead of the MSB (see thread https://github.com/scott-griffiths/bitstring/issues/156)


class PULPJtagTap(JTAGTap):
Expand Down
5 changes: 4 additions & 1 deletion src/dumpling/JTAGTaps/PulpJTAGTapRosetta.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@
from dumpling.JTAGTaps.PulpJTAGTap import PULPJtagTap
import bitstring
from bitstring import BitArray
bitstring.lsb0 = True #Enables the experimental mode to index LSB with 0 instead of the MSB (see thread https://github.com/scott-griffiths/bitstring/issues/156)
if (int(bitstring.__version__[0]) < 4):
bitstring.set_lsb0(True) #Enables the experimental mode to index LSB with 0 instead of the MSB (see thread https://github.com/scott-griffiths/bitstring/issues/156)
else:
bitstring.lsb0 = True #Enables the experimental mode to index LSB with 0 instead of the MSB (see thread https://github.com/scott-griffiths/bitstring/issues/156)


class PULPJTagTapRosetta(PULPJtagTap):
Expand Down
5 changes: 4 additions & 1 deletion src/dumpling/JTAGTaps/PulpJTAGTapVega.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@
from dumpling.Common.VectorBuilder import VectorBuilder
from dumpling.Drivers.JTAG import JTAGTap, JTAGDriver, JTAGRegister
from bitstring import BitArray
bitstring.lsb0 = True #Enables the experimental mode to index LSB with 0 instead of the MSB (see thread https://github.com/scott-griffiths/bitstring/issues/156)
if (int(bitstring.__version__[0]) < 4):
bitstring.set_lsb0(True) #Enables the experimental mode to index LSB with 0 instead of the MSB (see thread https://github.com/scott-griffiths/bitstring/issues/156)
else:
bitstring.lsb0 = True #Enables the experimental mode to index LSB with 0 instead of the MSB (see thread https://github.com/scott-griffiths/bitstring/issues/156)


class PULPJtagTapVega(JTAGTap):
Expand Down
5 changes: 4 additions & 1 deletion src/dumpling/JTAGTaps/RISCVDebugTap.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@
from dumpling.Common.VectorBuilder import VectorBuilder
from dumpling.Drivers.JTAG import JTAGDriver, JTAGRegister, JTAGTap
from bitstring import BitArray
bitstring.lsb0 = True #Enables the experimental mode to index LSB with 0 instead of the MSB (see thread https://github.com/scott-griffiths/bitstring/issues/156)
if (int(bitstring.__version__[0]) < 4):
bitstring.set_lsb0(True) #Enables the experimental mode to index LSB with 0 instead of the MSB (see thread https://github.com/scott-griffiths/bitstring/issues/156)
else:
bitstring.lsb0 = True #Enables the experimental mode to index LSB with 0 instead of the MSB (see thread https://github.com/scott-griffiths/bitstring/issues/156)

class DMIOp(Enum):
NOP = '00'
Expand Down