Load bitstream to AG1K series FPGA using CH552
AG1K does not have a built-in data flash;
This design only simulate a USB mass storage drive;
Drag the bitstream file into MSD, the CH552 loads the bitstream into the internal SRAM of AG1K.
- Install Arduino IDE, then install DeqingSun/ch55xduino
- Open this project, choose "CH552 Boards", "USER CODE w/ 148B USB ram", "16MHz 3.3V"
- Upload
- Compile your design <design_name> in Supra;
- Rename <design_name>.bin to SRAM.BIN (should be 46,808 bytes for AG1K; keep filename UPPERCASE);
- Plug your CH552 board to your PC's USB, then drag SRAM.BIN into USB Mass Storage , choose overwrite;
- When loading finished, pin CDONE will be released (HIGH) by AG1K.
This sch. is only used as an example to describe the connection related to this project, for reference only;
Not include other circuits required for normal design (clock, reset, power, etc.);
Pins can be modified except the hardware SPI pins;
Please do check before use.
zh-cn only. Contact AGM for other languages:)
AG1K_Rev1_0.pdf
MANUAL_AG1KLP.pdf
GNU Lesser General Public License v2.1 (same as DeqingSun/ch55xduino)
用 CH552 给 AG1K FPGA 加载比特流
AG1K 没有内置存储器,但是可以通过 SPI 往内置 SRAM 写比特流;所以这个烧写器只是通过模拟 U 盘拖拽烧录的方式工作
(至于为什么不照抄 iCESugar 那种通过跳线选择的是因为……去对比一下这个芯片和拉铁丝的那个的主从模式下的引脚定义就知道了orz
- 安装 Arduino IDE,然后去安装 DeqingSun/ch55xduino
- 下载并打开这个工程,设置板子为 "CH552 Boards", "USER CODE w/ 148B USB ram", "16MHz 3.3V"
- 上传
- 在 Supra 中综合并生成比特流,工程名假设为 <design_name>;
- 重命名工程目录下生成的 <design_name>.bin 为 SRAM.BIN(AG1K 应该有 46,808 字节,注意大写);
- 把 CH552 插入电脑 USB,把 SRAM.BIN 直接丢到 这个模拟出的 U 盘里覆盖;
- 下载完成后 CDONE 会被释放
本图只作为描述和本项目相关电路的连接关系的示例,仅供参考;
不包含正常工作所需的其他电路(如时钟复位电源等);
除了硬件 SPI 相关引脚之外都可以改;
请自行检查验证后再使用,产生的一切问题和我无关。
中文版也不好找就是了(
AG1K_Rev1_0.pdf
MANUAL_AG1KLP.pdf
GNU Lesser General Public License v2.1 (和 DeqingSun/ch55xduino 相同)
我 菜得一批
I very vegetable
照着例程写的这破玩意儿 偶尔能用 偶尔不能
ctrl+c ed from github, sometimes working sometimes boom
这个就做着玩玩 请不要在严肃的场景下使用 造成什么后果和我无关 谢谢茄子
booooom demo kankei nai desu arigatonasu