협업
예술
뷰티 및 웰니스
공예
문화 및 역사
엔터테인먼트
환경
음식 및 음료
역공학
과학
스포츠
기술
웨어러블

Youblob (simulation output) · CC0
Your Own chip_core: An 8-bit PWM Dimmer, Tested Before It Is Silicon
The wafer.space project template arrives with an example design, a 42-bit counter, in src/chip_core.sv. Your own chip starts where you replace it, and a chip cannot be patched after the foundry has made it, so the replacement has to be proven in simulation first.
This rung replaces the counter with an 8-bit PWM dimmer. Eight pads read a brightness from 0 to 255, one pad drives the pulse-width-modulated output, and an input pin enables it. It uses the template's own port list, so it drops into the template unchanged, and it fits even the smallest 0.5x0.5 slot.
Both the core and its cocotb testbench were run for this blueprint with Icarus Verilog 12.0 and cocotb 2.1.0, and all three tests pass. The picture is that simulation's own output.
고급
An evening
안내
1
1
What an 8-bit PWM gives you
What an 8-bit PWM gives you
Jupyter 노트북 불러오는 중…
2
2
The template this core goes into
The template this core goes into
The embedded blueprint sets up the project template. This rung writes the core that goes inside it.
3
3
What chip_core is given
What chip_core is given
In the template, chip_top.sv holds the pad ring and passes the pads to chip_core, which receives the clock, an active-low reset and three groups of signals: input pads, bidirectional pads and analog pads. The numbers of each depend on the slot: the 0.5x0.5 slot has 4 input, 38 bidirectional and 4 analog pads, the full 1x1 slot 12 input, 40 bidirectional and 2 analog.
A bidirectional pad is controlled from inside the core, one bit per pad: bidir_oe enables the output driver, bidir_ie the input buffer, bidir_cs chooses a Schmitt-trigger input, bidir_sl a slow slew rate, and bidir_pu and bidir_pd switch in pull-up and pull-down resistors. The template's example drives every bidirectional pad as an output; this rung turns eight of them into inputs.
4
4
The core
The core
src/chip_core.sv for the dimmer. The port list is the template's, unchanged. Pads 0 to 7 are inputs with Schmitt triggers; pad 8 and above are outputs, with every pad except 8 held low. The template's example also instantiated two SRAM macros; this core does not use them, so they are gone.
chip_core.svsystemverilog
필요한 도구:
데스크톱 컴퓨터5
5
The test that proves it
The test that proves it
A cocotb testbench that drives chip_core directly. It sets six duty values and counts the high clocks over four whole periods (1,024 clocks), checks that disabling the core holds the output low, and checks the pad directions. Run it with python3 test_pwm.py; Icarus Verilog needs -g2012 for the SystemVerilog and a 1 ns / 1 ps timescale for the 20 ns clock.
test_pwm.pypython
필요한 도구:
데스크톱 컴퓨터6
6
What the simulation printed
What the simulation printed
The run for this blueprint, Icarus Verilog 12.0 and cocotb 2.1.0, parameters for the 0.5x0.5 slot:
duty 0: high 0 of 1024 cycles
duty 1: high 4 of 1024 cycles
duty 64: high 256 of 1024 cycles
duty 128: high 512 of 1024 cycles
duty 200: high 800 of 1024 cycles
duty 255: high 1020 of 1024 cycles
TESTS=3 PASS=3 FAIL=0 SKIP=0
Every count is exactly four times the duty value. To check that the test can fail, the comparison in the core was changed from count < duty to count <= duty; the test then failed at once (duty 0 gave 4 high cycles, not 0), and the core was put back.
In the template itself, replace src/chip_core.sv with this file and update the template's own testbench, cocotb/chip_top_tb.py, whose test still expects the counter; make sim then runs it through the pads and the PDK's models.
7
7
A core that will not simulate or will not pass
A core that will not simulate or will not pass
chip_core simulation troubleshooting.
Flow
Loading...
8
8
Sources and honest limits
Sources and honest limits
**Sources**, read 29 September 2026: the wafer-space/gf180mcu-project-template repository (src/chip_core.sv, src/slot_defines.svh, cocotb/chip_top_tb.py; Apache-2.0), whose port list and pad-control signals this core keeps.
**Honest limits.** The simulation is at the chip_core level only, without the pad ring, the PDK's pad and SRAM models, synthesis or a layout. It proves the logic, not the timing or the manufactured chip. The gate-level simulation after LibreLane, which the template runs with make sim-gl, is the next check.
관련 블루프린트
이 블루프린트들은 지식을 공유합니다 — 기술, 재료 또는 원리
CC0 퍼블릭 도메인
이 블루프린트는 CC0로 공개되었습니다. 어떤 목적으로든 자유롭게 복사, 수정, 배포 및 사용할 수 있습니다.
제품 구매를 통해 메이커를 지원하세요. 판매자가 설정한 메이커 커미션 을 받거나, 이 블루프린트의 새로운 반복을 만들어 연결로 포함시킬 수 있습니다.


