合作
艺术
美容与健康
工艺
文化与历史
娱乐
环境
食品与饮料
逆向工程
科学
体育
技术
可穿戴设备

English
Youblob (simulation output) · CC0
芯片上的 SRAM:存储在芯片自身内存中的呼吸灯
wafer.space 的模板在其示例设计中附带两个 SRAM 宏,每个 512 字节,并且默认关闭。宏是来自 PDK 的一块成品存储模块:4,096 个静态存储单元,连同其地址译码器和读取电路一次性绘制完成,您可以整块放置,而无需逐个用门电路搭建。
本阶段将其中一个开启。上一阶段的 PWM 调光器现在播放一种图案:微控制器通过焊盘一次性向芯片写入 256 字节,此后芯片自行逐字节读取,每一步作为缓慢呼吸灯的亮度输出。
该内核及其测试平台是针对本蓝图使用 Icarus Verilog 12.0、cocotb 2.1.0 以及 PDK 自身提供的 SRAM 宏仿真模型运行的:输出在 600 个 PWM 周期内都遵循存储的表格。图示为该仿真的原始输出,每个周期一条柱状图。加载该表格的 ESP32 草图已针对本蓝图编译;目前尚无可运行它的实际芯片。
高级
一个夜晚,外加一块芯片
说明
1
1
图案、时序与尺寸
图案、时序与尺寸
正在加载 Jupyter 笔记本…
2
2
每个 4,096 位的含义
每个 4,096 位的含义
嵌入的示意图展示了一位静态存储器如何保持自身状态:由两个反相器构成的环路。本层级中的宏是一个阵列中包含的 4,096 位静态存储器。
3
3
宏的引脚,以及其模型说明的三件事
宏的引脚,以及其模型说明的三件事
gf180mcu_fd_ip_sram__sram512x8m8wm1 可存储 512 字节。其引脚包括:CLK;A,9 位地址;D,待写入的字节;Q,读出的字节。三个控制信号均为低电平有效(active LOW)。CEN 为 0 时开启存储器。GWEN 为 0 时,时钟沿执行写操作;为 1 时执行读操作。WEN 每个数据位对应一位,为 0 时允许该位被写入,因此一次写操作可以只改变字节中的部分位而保留其他位。
阅读 PDK 的仿真模型,可以了解三件值得注意的事。第一,存储器只有在 CEN 从 1 变为 0 之后才能工作;否则模型会打印 "CEN is not reset, memory is not operational",因此内核在复位期间保持 CEN 为 1,复位结束后再将其拉低。第二,读操作会在采样 A 的时钟沿之后,将 mem[A] 输出到 Q,因此数据需要再等一个时钟周期才能就绪。第三,模型中所有字节初始值均为 0。真实芯片并非如此:其 SRAM 上电时保持各单元原先随机落入的状态,因此设计必须先写后读。
模板自带的示例将 CEN 接为 1,因此其两个宏处于关闭状态。其时序文件给出,该宏在典型的 5 V 工艺角下最小时钟周期为 6.6 ns,在慢速的 3.0 V、125 °C 工艺角下为 18.3 ns,两者都远小于模板的 40 ns。
4
4
The core
The core
src/chip_core.sv for the pattern player, with the template's port list unchanged plus one parameter, HOLD_LOG2. Input pad 0 enables, pad 1 selects LOAD mode, pad 2 is the write strobe; bidirectional pads 0 to 7 carry the byte, pad 8 the PWM. The LOAD and strobe pads are passed through two flip-flops before use, a synchroniser: they change whenever the outside world likes, not in step with the chip's clock, and a flip-flop caught mid-change can hover between 0 and 1 for a while. In play mode, each time HOLD_LOG2 periods have passed, the byte the SRAM has been reading becomes the new duty and the address moves on.
chip_core.svsystemverilog
所需工具:
台式电脑5
5
The test
The test
test_pattern.py builds the core with the PDK's SRAM model, gf180mcu_fd_ip_sram__sram512x8m8wm1.v, at the template's 25 MHz and with HOLD_LOG2 = 0 so the whole table plays in 256 periods. It loads the table through the pads the way the ESP32 will, then counts the high clocks in each of 600 PWM periods and requires them to follow the table from exactly one starting point. A second test loads again and checks the new pattern replaced the old.
test_pattern.pypython
所需工具:
台式电脑6
6
打印出的仿真结果
打印出的仿真结果
针对此蓝图,使用 Icarus Verilog 12.0 和 cocotb 2.1.0 运行:
-------- MESSAGE: CEN 刚刚复位,存储器工作正常 ---------
test_pattern.test_plays_the_table PASS (600 个周期,表格恰好在一个偏移量处对齐)
test_pattern.test_reload PASS
TESTS=2 PASS=2 FAIL=0 SKIP=0
为证明测试能够失败,将 WEN 从 8'b0 改为 8'hFF,这是有源低电平引脚的经典错误:所有位被屏蔽,未写入任何内容,表格全为零。两个测试均失败,随后已恢复内核。
第一行是 SRAM 模型自身的消息:根据模型要求,内核在复位后拉低了 CEN。
7
7
Load it from an ESP32
Load it from an ESP32
Once the chip is on its breakout board, this sketch writes the table. Eight GPIOs carry the byte, three more drive LOAD, the strobe and enable, and an LED with a 330 ohm resistor from pad 8 to ground shows the breath. Each level is held for 1 microsecond, 25 of the chip's clocks, so the synchroniser always sees it. The sketch then does nothing: the pattern lives in the chip. It is lost when the chip loses power, so send r over serial to load it again.
The ESP32 is a 3.3 V part and its inputs are not 5 V tolerant. The sketch only drives the chip and never reads from it. The template's default libraries are the 5 V ones; before you connect, check in the I/O library's documentation that 3.3 V is a valid logic high for your chip's inputs, or build with the 3.3 V libraries, as the template's README shows. The sketch compiles for the ESP32 with the Arduino ESP32 core 3.3.12; it has not been run, because the chip does not exist yet.
load_pattern.inocpp
此步骤所需材料:
定制 ASIC 芯片1 个
印制电路板1 个
5 毫米 LED1 个
330 欧姆电阻1 个所需工具:
ESP32 开发板
面包板
跳线
台式电脑8
8
存储或播放不了的图案
存储或播放不了的图案
SRAM 图案故障排除。
Flow
Loading...
9
9
来源与诚实的局限
来源与诚实的局限
**来源**,读取于2026年9月29日:模板所固定提交版本中的 GF180MCU PDK(gf180mcuD,f6eeac7dad085ffcc829ccfd721f7b4ce39edcf7,来自 fossi-foundation ciel 发布版;Apache-2.0):SRAM 模型 gf180mcu_fd_ip_sram__sram512x8m8wm1.v,其用于外形轮廓的 LEF,以及用于最小时钟周期的时序文件;标准单元库的时序文件用于触发器面积。wafer-space/gf180mcu-project-template 仓库(src/chip_core.sv、src/chip_top.sv、README.md、librelane/config.yaml;Apache-2.0)。
**诚实的局限。** 仿真在 chip_core 层级进行,使用 SRAM 自带的模型,但不包括焊盘环、综合或版图,且该模型的时序检查在此并不能说明任何问题。ESP32 草图已编译,但未运行。测试中 HOLD_LOG2 设为 0 以便仿真能够结束;实际芯片中将使用 9,即约 1.3 秒的一次呼吸。
材料
4- 1 个占位符
- 1 个占位符
- 占位符
- 1 个占位符
相关蓝图
这些蓝图共享知识——技术、材料或原理
CC0 公共领域
此蓝图以 CC0 协议发布。你可以自由复制、修改、分发和使用此作品,无需征得许可。
通过购买蓝图中的产品支持创客,他们将获得 创客佣金 (由供应商设定),或创建此蓝图的新版本并将其作为连接包含在你自己的蓝图中以分享收入。



