Closed whitequark closed 6 months ago
Any suggestions for such a library?
It's only used here so the change should be simple.
https://github.com/YosysHQ/apicula/blob/fedab4cf9871184c41e10ee6cdc6b306e3eb6a21/apycula/bslib.py#L5
I'm guessing we'll need these parameters, that's the main tricky part https://reveng.sourceforge.io/crc-catalogue/all.htm#crc.cat.crc-16-arc
Actually, these are the current parameters: https://crcmod.sourceforge.net/crcmod.predefined.html#predefined-crc-algorithms
>>> import crcmod.predefined
>>> crc16 = crcmod.predefined.mkPredefinedCrcFun('crc-16')
>>> crc16(b"abcd")
14743
>>> calc = crc.Calculator(crc.Configuration(width=16, polynomial=0x8005, reverse_input=True, reverse_output=True))
>>> calc.checksum(b"abcd")
14743
Thanks!
Right now, Apycula cannot be used with Pyodide:
This is the only problematic dependency AFAICT (numpy is supported).