YosysHQ / oss-cad-suite-build

Multi-platform nightly builds of open source digital design and verification tools
ISC License
774 stars 70 forks source link

Convert bin bitstream to rbt bitstream #32

Closed liangkangnan closed 2 years ago

liangkangnan commented 2 years ago

Is there any tool can convert bin format bitstream to rbt format bitstream(which generated by Lattice Radiant software)? Thank you.

gatecat commented 2 years ago

No, though if you compared the two it shouldn't be too hard to write a simple python script to do it (although I'm mildly curious about your usecase...)

liangkangnan commented 2 years ago

Thank you. My usecase is: I have a ICE40 FPGA board,but it only support download rbt bitstream file. I want to use oss-cad tools to synth and route.

gatecat commented 2 years ago

What board is this, out of curiosity? Also sounds like you are wanting to go in the other direction then; from bin to rbt?

liangkangnan commented 2 years ago

Oh yes, from bin to rbt. The board use lpc11u35(base on DAPLink) instead of ft2232 as a programmer. The github repo is: https://github.com/EETree-git/ICE40_Training

liangkangnan commented 2 years ago

I have solved the issue. Thank You.

tscmga commented 2 years ago

I have solved the issue. Thank You.

how ? i have the same problem

airskywater commented 1 year ago

@liangkangnan i have the same problem, and i try to write a python script to solve it : https://github.com/airskywater/tillitis-key1/blob/main/hw/application_fpga/tools/bin2rbt/bin2rbt.py but it does not work, could you please help me?

airskywater commented 1 year ago

No, though if you compared the two it shouldn't be too hard to write a simple python script to do it (although I'm mildly curious about your usecase...)

@gatecat I have compared binary bitstream(which generated by Lattice Radiant software) with binary bitstream(which generated by icestorm/yosys/nextpnr), there are many differences for the same verilog file, do you know why? I try to write a python script to solve it : https://github.com/airskywater/tillitis-key1/blob/main/hw/application_fpga/tools/bin2rbt/bin2rbt.py. It works for binary bitstream(which generated by Lattice Radiant software), but it does not work for binary bitstream(which generated by icestorm/yosys/nextpnr), could you please help me? Does it mean there are bugs in icestorm/yosys/nextpnr ?